/* Custom styles for the Hotel Booking Application */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* Header and Footer */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand img {
    /*filter: brightness(0) invert(1); /* Makes the logo white to match navbar text */
    transition: transform 0.3s ease;
    width:100px;
    height:auto;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

footer {
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.social-icons a {
    font-size: 1.2rem;
    margin-right: 10px;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 4px;
    padding: 8px 16px;
}

.btn-primary {
    background-color: #2c6fd1;
    border-color: #2c6fd1;
}

.btn-primary:hover {
    background-color: #1a5cbf;
    border-color: #1a5cbf;
}

/* Form Controls */
.form-control {
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Datepicker styling */
.flatpickr-calendar {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Room display */
.room-image {
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* Availability calendar */
.calendar-day {
    text-align: center;
    padding: 10px;
    border: 1px solid #dee2e6;
}

.calendar-day.available {
    background-color: #d4edda;
    color: #155724;
}

.calendar-day.booked {
    background-color: #f8d7da;
    color: #721c24;
}

/* Media queries */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem;
    }
    
    h1.display-4 {
        font-size: 2.5rem;
    }
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fix for placeholder images to prevent infinite reloading loop */
img.card-img-top[onerror] {
    min-height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Add a specific style for placeholder fallback */
.placeholder-img {
    background-color: #f5f5f5;
    color: #666;
    text-align: center;
    padding: 40px 0;
    font-weight: bold;
}

/* Admin Panel Styles */
.sidebar {
    min-height: 100vh;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    color: #333;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .fa-2x {
    opacity: 0.7;
}

/* Table Enhancements */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e9ecef;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Enhancements */
@media (max-width: 992px) {
    .sidebar {
        position: static !important;
        transform: none !important;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    footer,
    .btn,
    .modal {
        display: none !important;
    }
    
    .col-md-9.ms-sm-auto.col-lg-10.px-md-4 {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Accessibility Improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Success and Error States */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d1f2eb;
    color: #0c5460;
    border-left: 4px solid #20c997;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Room Card Specific Styles */
.room-card {
    transition: all 0.3s ease;
    height: 100%;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.room-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.room-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badge Enhancements */
.badge {
    font-size: 0.75em;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
