/* Mobile Enhancements - Floating Search Button & Popup Modals */

/* Floating Search Button */
.floating-search-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    /* Comment #19: Flat design - solid olive green, no gradients */
    background-color: #6B8E23;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 120, 212, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1060;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: none;
}

.floating-search-btn:hover {
    /* Comment #19: Flat design - lighter green on hover, no gradients */
    transform: none; /* Flat design - no transforms */
    box-shadow: none; /* Flat design - no shadows */
    background-color: #9CAF50; /* Lighter green */
}

.floating-search-btn i {
    font-size: var(--icon-2xl);
    color: white;
    font-weight: 600;
}

/* Dark Theme Support for Floating Search Button */
[data-theme="dark"] .floating-search-btn {
    background: linear-gradient(135deg, #58a6ff 0%, #4c9aff 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .floating-search-btn:hover {
    background: linear-gradient(135deg, #4c9aff 0%, #409cff 100%);
    box-shadow: 0 12px 35px rgba(88, 166, 255, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Mobile Sticky Bottom Navigation (Legacy - now removed) */
.mobile-bottom-nav {
    display: none !important;
}

.mobile-bottom-nav.show {
    transform: translateY(0);
}

.mobile-bottom-nav.hidden {
    transform: translateY(100%);
}

.mobile-nav-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: var(--space-2);
}

.mobile-nav-btn {
    flex: 1;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-1) var(--space-sm);
    text-align: center;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:focus {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-nav-btn .icon {
    font-size: var(--icon-lg);
    margin-bottom: 1px;
}

.mobile-nav-btn .label {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: 1.0;
}

/* Badge for active filters */
.mobile-nav-btn .badge {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: var(--error-color);
    color: white;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    padding: var(--space-1) var(--space-2);
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Enhanced currency button styling */
#mobileCurrencyBtn {
    position: relative;
}

#mobileCurrencyBtn .label {
    font-weight: 600;
    font-size: var(--font-size-xs);
}

#mobileCurrencyBtn:hover .label,
#mobileCurrencyBtn:focus .label {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Currency icon styling */
#mobileCurrencyBtn .icon-fallback {
    color: #28a745;
    font-weight: bold;
}

#mobileCurrencyBtn:hover .icon-fallback,
#mobileCurrencyBtn:focus .icon-fallback {
    color: white;
}

/* Enhanced Mobile Search Popup Modal */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1060;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-search-modal.show {
    opacity: 1;
}

.mobile-search-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 24px 24px 0 0;
    padding: 2rem 1.5rem;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
    border-top: 4px solid #6B8E23; /* Comment #19: Olive green */
}

.mobile-search-modal.show .mobile-search-content {
    transform: translateY(0);
}

/* Dark Theme Support for Mobile Search Modal */
[data-theme="dark"] .mobile-search-content {
    background: linear-gradient(135deg, #2d2d30 0%, #1e1e1e 100%);
    border-top-color: #58a6ff;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}

.mobile-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 120, 212, 0.1);
    position: relative;
}

.mobile-search-header::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    /* Comment #19: Flat design - solid olive green, no gradients */
    background-color: #6B8E23;
    border-radius: 1px;
}

.mobile-search-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-close-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #6c757d;
}

.mobile-close-btn:hover {
    background: #6B8E23; /* Comment #19: Olive green */
    border-color: #6B8E23; /* Comment #19: Olive green */
    color: white;
    transform: scale(1.05);
}

.mobile-close-btn i {
    font-size: var(--icon-xl);
    font-weight: 600;
}


/* Mobile View Toggle */
.mobile-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1060;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-view-modal.show {
    opacity: 1;
}

.mobile-view-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: var(--surface-color);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    min-width: 320px;
    max-width: 90%;
    transition: transform 0.3s ease;
}

.mobile-view-modal.show .mobile-view-content {
    transform: translateX(-50%) translateY(0);
}

.mobile-view-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mobile-view-option {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    font-weight: 500;
}

.mobile-view-option:hover,
.mobile-view-option.active {
    border-color: var(--primary-color);
    background: rgba(0, 120, 212, 0.1);
    color: var(--primary-color);
}

.mobile-view-option .icon {
    font-size: var(--icon-xl);
}

/* Enhanced Mobile Form Styles */
.mobile-form-group {
    margin-bottom: 1.5rem;
}

.mobile-form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.mobile-form-label i {
    color: #6B8E23; /* Comment #19: Olive green */
    font-size: 1.1rem;
}

/* Input with icon container */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-form-control {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    color: #1a202c;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-form-control:focus {
    border-color: #6B8E23; /* Comment #19: Olive green */
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
    outline: none;
    background: #fbfcfd;
}

.input-icon {
    position: absolute;
    right: 1rem;
    color: #6c757d;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

.mobile-form-control:focus + .input-icon {
    color: #6B8E23; /* Comment #19: Olive green */
}

.mobile-date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mobile-guest-nights {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0.75rem;
}

.mobile-search-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 120, 212, 0.1);
}

.mobile-search-btn {
    flex: 2;
    /* Comment #19: Flat design - solid olive green, no gradients */
    background-color: #6B8E23;
    color: white;
    border: none;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.3);
    cursor: pointer;
}

.mobile-search-btn:hover {
    background: linear-gradient(135deg, #106ebe 0%, #0ea5e9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
}

.mobile-clear-btn {
    flex: 1;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.mobile-clear-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
    transform: translateY(-1px);
}



/* Mobile Room Card Optimizations */
@media (max-width: 768px) {
    /* Room cards full width on mobile - ALWAYS list view */
    #roomsList {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-4);
        padding: 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Ensure room cards display properly on mobile */
    #roomsList .col-12 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-bottom: 1rem !important;
    }
    
    #roomsList > div,
    #roomsList > .col-md-6,
    #roomsList > .col-lg-4,
    #roomsList > .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    /* Force all room cards to mobile-optimized layout */
    .room-card-clean,
    .mobile-room-card {
        background: var(--surface-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
        transition: all var(--transition-fast);
        margin: 0 0 var(--space-2) 0;
        width: 100%;
        display: block !important;
    }
    
    /* Override any list view specific styling on mobile */
    #roomsList.rooms-list .room-card-clean,
    #roomsList.rooms-list .mobile-room-card {
        display: block !important;
        width: 100% !important;
        margin: 0 0 16px 0 !important;
    }
    
    .mobile-room-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }
    
    /* Mobile room image */
    .mobile-room-image {
        position: relative;
        height: 200px;
        overflow: hidden;
    }
    
    .mobile-room-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-room-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(0, 120, 212, 0.9);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: var(--font-size-xs);
        font-weight: 600;
        backdrop-filter: blur(10px);
    }
    
    .mobile-availability-badge {
        position: absolute;
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        border-radius: 16px;
        font-size: var(--font-size-xs);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-availability-badge.available {
        background: rgba(16, 124, 16, 0.9);
        color: white;
    }
    
    .mobile-availability-badge.limited {
        background: rgba(247, 99, 12, 0.9);
        color: white;
    }
    
    .mobile-availability-badge.unavailable {
        background: rgba(209, 52, 56, 0.9);
        color: white;
    }
    
    /* Mobile room content */
    .mobile-room-content {
        padding: 16px;
    }
    
    .mobile-room-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }
    
    .mobile-room-title {
        font-size: var(--icon-lg);
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
        line-height: 1.3;
    }
    
    .mobile-room-price {
        text-align: right;
    }
    
    .mobile-price-amount {
        font-size: var(--icon-xl);
        font-weight: 700;
        color: var(--primary-color);
        margin: 0;
        line-height: 1.2;
    }
    
    .mobile-price-unit {
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    /* Mobile room features */
    .mobile-room-features {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2);
        margin: 10px 0;
        padding: 10px;
        background: var(--background-color);
        border-radius: 8px;
    }
    
    .mobile-feature-item {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        padding: 6px 2px;
        text-align: center;
        gap: var(--space-1);
    }
    
    .mobile-feature-icon {
        font-size: var(--font-size-sm);
        color: var(--primary-color);
    }
    
    .mobile-feature-label {
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
        font-weight: 500;
        line-height: 1.1;
    }
    
    /* Mobile amenities */
    .mobile-room-amenities {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
        margin: 12px 0;
    }
    
    .mobile-amenity-badge {
        background: var(--border-color);
        color: var(--text-primary);
        padding: 4px 8px;
        border-radius: 12px;
        font-size: var(--font-size-xs);
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: var(--space-1);
    }
    
    .mobile-amenity-badge .icon {
        font-size: var(--font-size-xs);
    }
    
    /* Mobile room actions */
    .mobile-room-actions {
        display: flex;
        gap: var(--space-2);
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .mobile-view-btn {
        flex: 1;
        background: var(--border-color);
        color: var(--text-primary);
        border: none;
        border-radius: 8px;
        padding: 12px;
        font-size: var(--font-size-sm);
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .mobile-view-btn:hover {
        background: var(--text-secondary);
        color: white;
    }
    
    .mobile-book-btn {
        flex: 2;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px;
        font-size: var(--font-size-sm);
        font-weight: 600;
        transition: all 0.2s ease;
    }
    
    .mobile-book-btn:hover {
        background: var(--secondary-color);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 120, 212, 0.25);
    }
    
    /* Rate selection on mobile */
    .mobile-rate-selection {
        margin: 12px 0;
    }
    
    .mobile-rate-select {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        background: var(--surface-color);
        color: var(--text-primary);
        font-size: var(--font-size-sm);
        font-weight: 500;
    }
    
    .mobile-rate-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
        outline: none;
    }
    
    /* Rate benefits on mobile */
    .mobile-rate-benefits {
        margin: 8px 0;
        padding: 8px 12px;
        background: rgba(16, 124, 16, 0.05);
        border-left: 3px solid var(--success-color);
        border-radius: 0 8px 8px 0;
    }
    
    .mobile-benefits-title {
        font-size: var(--font-size-xs);
        font-weight: 600;
        color: var(--success-color);
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }
    
    .mobile-benefits-list {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .mobile-benefit-item {
        font-size: var(--font-size-xs);
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: var(--space-1);
        background: rgba(16, 124, 16, 0.1);
        padding: 3px 6px;
        border-radius: 10px;
    }
}

/* Hide desktop elements on mobile */
@media (max-width: 768px) {
    /* Hide desktop search panel */
    .search-panel {
        display: none !important;
    }
    
    /* Desktop filter section removed */
    
    /* Hide only the sidebar container on mobile, not all col-lg-3 content */
    .col-lg-3 {
        display: none !important;
    }
    
    /* Full width for room results */
    .col-lg-9 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    /* Show floating search button on mobile */
    /* Floating search button removed per user request
    .floating-search-btn {
        display: flex;
    }
    */

    /* Remove body padding since no bottom nav */
    body {
        padding-bottom: 0;
    }
    
    /* Extra padding when in calendar view to ensure content is accessible */
    /* ENHANCED MOBILE CALENDAR VIEW - Better spacing and readability */
    #calendarView {
        padding: 1rem 0.5rem !important;
        margin-bottom: 2rem !important;
    }

    /* Main content area adjustments for calendar */
    .container {
        padding-bottom: 20px;
    }

    /* Mobile calendar specific optimizations */
    #calendarView .calendar-row-layout {
        padding: 1rem !important;
        gap: 1.5rem !important;
        border-radius: 16px !important;
    }

    #calendarView .calendar-grid-panel {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }

    #calendarView .calendar-details-panel {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }
    
    /* Don't override main content padding - use default 76px */
    
    /* Hide floating action button on mobile when we have bottom nav */
    
    /* Optimize room cards for mobile */
    .room-card-clean {
        margin-bottom: 16px;
    }
    
    /* Better mobile spacing and layout */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Fix row alignment on mobile */
    .container .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* Ensure consistent column spacing */
    .container .col-lg-9 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Simple mobile typography */
    .pricing-controls h5 {
        font-size: var(--text-base);
    }

    .pricing-controls .small {
        font-size: var(--text-xs);
    }
    
    /* Mobile-specific styling for pricing controls header */
    .pricing-controls {
        background: var(--surface-color);
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-3) !important;
        padding: var(--space-2) var(--space-3) !important;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
    }
    
    /* ULTRA-COMPACT pricing controls on mobile - updated layout */
    .pricing-controls .row {
        display: block !important; /* Reset to block for precise control */
        gap: 0.25rem;
        margin: 0;
        width: 100%;
    }

    /* Stack all elements vertically by default */
    .pricing-controls .col,
    .pricing-controls .col-auto {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.25rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Show all controls - don't hide any */
    .pricing-controls .col-auto:nth-child(n+4) {
        display: block !important; /* Show tax toggle and currency */
    }

    /* EXCEPTION: Tax toggle and Currency selector share one row */
    .pricing-controls .col-auto:nth-child(3), /* Tax Toggle */
    .pricing-controls .col-auto:nth-child(4)  /* Currency Selector */ {
        display: inline-block !important;
        width: calc(50% - 0.125rem) !important;
        vertical-align: top !important;
        margin-bottom: 0.25rem !important;
    }

    /* Add spacing between tax toggle and currency */
    .pricing-controls .col-auto:nth-child(3) {
        margin-right: 0.25rem !important;
    }

    .pricing-controls .col-auto:nth-child(4) {
        margin-left: 0 !important;
    }
    
    /* Mobile legend styling */
    .pricing-controls .col-12 {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .pricing-controls .d-flex.align-items-center.justify-content-center {
        flex-wrap: wrap;
        justify-content: flex-start !important;
        gap: 12px !important;
    }
    
    .pricing-controls .status-indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        display: inline-block;
    }
    
    .pricing-controls .status-available {
        background-color: #16a085;
    }
    
    .pricing-controls .status-limited {
        background-color: #f39c12;
    }
    
    .pricing-controls .status-unavailable {
        background-color: #e74c3c;
    }
    
    .pricing-controls small {
        font-size: 11px !important;
        color: var(--text-secondary);
    }
    
    /* List view is the only view option now (grid/calendar removed) */
    .mobile-view-option[data-view="list"] {
        display: block !important;
    }
    
    /* Hide desktop list view button on mobile */
    button[data-view="list"] {
        display: none !important;
    }
    
    /* Mobile view switching */
    #calendarView {
        margin-top: 0 !important;
        margin-bottom: 80px !important; /* Extra space for bottom navigation */
        max-height: calc(100vh - 140px) !important; /* Reserve space for header and bottom nav */
        overflow-y: auto !important; /* Allow scrolling within calendar */
    }
    
    /* Ensure calendar view properly shows on mobile */
    #calendarView.mobile-calendar-active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }
    
    /* Calendar navigation removed */
    
    /* Calendar container adjustments for mobile */
    #calendarView .calendar-row-layout {
        padding-bottom: 20px !important; /* Extra padding for bottom nav */
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Calendar details panel mobile scrolling */
    #calendarView .calendar-details-panel {
        max-height: 60vh !important;
        overflow-y: auto !important;
        margin-bottom: 10px !important;
    }
    
    /* Ensure rooms list hides properly when calendar is active */
    #roomsList.mobile-calendar-hidden {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    /* Mobile search results header should hide in calendar view */
    #mobileSearchResultsHeader.calendar-hidden {
        display: none !important;
    }
    
    /* Enhanced mobile search results header */
    .mobile-search-results-header {
        background: var(--surface-color);
        border-radius: 12px;
        margin-bottom: 16px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border: 1px solid var(--border-color);
    }
    
    .mobile-results-count {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        margin-bottom: 12px;
    }
    
    .mobile-results-count h5 {
        margin: 0;
        font-size: 16px !important;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .mobile-results-count .icon-fallback {
        color: var(--primary-color);
        font-size: 16px;
    }
    
    /* Mobile legend (availability status) styling */
    .mobile-availability-legend {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .mobile-legend-title {
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    .mobile-legend-items {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-3);
        justify-content: flex-start;
    }
    
    .mobile-legend-item {
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }
    
    .mobile-legend-indicator {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        display: inline-block;
    }
    
    .mobile-legend-indicator.available {
        background-color: #16a085;
    }
    
    .mobile-legend-indicator.limited {
        background-color: #f39c12;
    }
    
    .mobile-legend-indicator.unavailable {
        background-color: #e74c3c;
    }
    
    .mobile-legend-text {
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
        font-weight: 500;
    }
}

/* Dark theme support for mobile elements */
@media (max-width: 768px) {
    /* Dark theme floating search button */
    [data-theme="dark"] .floating-search-btn {
        /* Comment #19: Flat design - solid olive green, no gradients */
        background-color: #6B8E23 !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 8px 25px rgba(88, 166, 255, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    [data-theme="dark"] .floating-search-btn:hover {
        background: linear-gradient(135deg, #7cc7ff 0%, #58a6ff 100%) !important;
        box-shadow: 0 12px 35px rgba(88, 166, 255, 0.7), 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    }

    /* Dark theme mobile search modal */
    [data-theme="dark"] .mobile-search-content {
        background: #1a1a1a !important;
        border-top-color: #58a6ff !important;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4) !important;
    }

    [data-theme="dark"] .mobile-search-title {
        color: #ffffff !important;
    }

    [data-theme="dark"] .mobile-search-header {
        border-bottom-color: rgba(88, 166, 255, 0.2) !important;
    }

    [data-theme="dark"] .mobile-search-header::before {
        background: linear-gradient(90deg, #58a6ff 0%, #7cc7ff 100%) !important;
    }

    [data-theme="dark"] .mobile-close-btn {
        background: #333333 !important;
        border-color: #555555 !important;
        color: #ffffff !important;
    }

    [data-theme="dark"] .mobile-close-btn:hover {
        background: #58a6ff !important;
        border-color: #58a6ff !important;
    }

    [data-theme="dark"] .mobile-form-label {
        color: #ffffff !important;
    }

    [data-theme="dark"] .mobile-form-control {
        background: #2a2a2a !important;
        border-color: #555555 !important;
        color: #ffffff !important;
    }

    [data-theme="dark"] .mobile-form-control:focus {
        background: #333333 !important;
        border-color: #58a6ff !important;
        box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.2) !important;
    }

    [data-theme="dark"] .input-icon {
        color: #b3b3b3 !important;
    }

    [data-theme="dark"] .mobile-form-control:focus + .input-icon {
        color: #58a6ff !important;
    }

    [data-theme="dark"] .mobile-search-actions {
        border-top-color: rgba(88, 166, 255, 0.2) !important;
    }

    [data-theme="dark"] .mobile-clear-btn {
        background: #333333 !important;
        border-color: #555555 !important;
        color: #ffffff !important;
    }

    [data-theme="dark"] .mobile-clear-btn:hover {
        background: #404040 !important;
        border-color: #666666 !important;
    }

    [data-theme="dark"] .mobile-search-results-header,
    [data-theme="dark"] .pricing-controls {
        background: #282a33 !important;
        border-color: #4a4d57 !important;
        color: #e5e5e5 !important;
    }
    
    [data-theme="dark"] .mobile-legend-title,
    [data-theme="dark"] .mobile-legend-text {
        color: #b3b3b3 !important;
    }
    
    [data-theme="dark"] .mobile-bottom-nav {
        background: rgba(40, 42, 51, 0.95) !important;
        border-top-color: #4a4d57 !important;
    }
    
    [data-theme="dark"] .mobile-nav-btn {
        background: #282a33 !important;
        color: #e5e5e5 !important;
        border-color: #4a4d57 !important;
    }
    
    [data-theme="dark"] .mobile-nav-btn:hover {
        background: var(--primary-color) !important;
        color: white !important;
    }
    
    [data-theme="dark"] .mobile-search-content,
    [data-theme="dark"] .mobile-view-content {
        background: #282a33 !important;
        color: #e5e5e5 !important;
    }
    
    [data-theme="dark"] .mobile-form-control {
        background: #3c3f47 !important;
        border-color: #4a4d57 !important;
        color: #e5e5e5 !important;
    }
    
    
    [data-theme="dark"] .mobile-check-item {
        background: #3c3f47 !important;
        border-color: #4a4d57 !important;
        color: #e5e5e5 !important;
    }
    
    [data-theme="dark"] .mobile-room-card {
        background: #282a33 !important;
        color: #e5e5e5 !important;
    }
    
    [data-theme="dark"] .mobile-room-features {
        background: #3c3f47 !important;
    }
    
    [data-theme="dark"] .mobile-amenity-badge {
        background: #4a4d57 !important;
        color: #e5e5e5 !important;
    }
}

/* Landscape phone and small tablets */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-search-content {
        max-height: 95vh;
    }
    
    .mobile-bottom-nav {
        padding: 6px 12px 4px;
    }
    
    .mobile-nav-btn {
        padding: 6px 4px;
        gap: 1px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 16px;
    }
    
    .mobile-nav-btn .label {
        font-size: var(--font-size-xs);
    }
    
    body {
        padding-bottom: 55px !important;
    }
    
    /* Use default padding for landscape too */
}

/* Very small screens */
@media (max-width: 480px) {
    .mobile-search-content {
        padding: 12px;
        width: 100%;
    }
    
    .mobile-date-inputs,
    .mobile-guest-nights {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    
    .mobile-amenity-checks {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    
    .mobile-room-features {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-1);
        padding: 8px;
    }
    
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
}

/* Show list view on larger screens (tablet landscape and desktop) */
@media (min-width: 1024px), (min-width: 768px) and (orientation: landscape) and (min-height: 600px) {
    /* Show list view on desktop and tablet landscape */
    .mobile-view-option[data-view="list"] {
        display: flex !important;
    }

    button[data-view="list"] {
        display: inline-block !important;
    }
}

/* CSS Performance Optimizations */
.room-card-clean,
.mobile-room-card,
.fluent-card {
    contain: layout style paint;
    will-change: transform;
    transform: translateZ(0);
}

.mobile-bottom-nav {
    contain: layout style paint;
    will-change: transform;
}

/* Optimize backdrop filters */
.mobile-bottom-nav,
.header-nav {
    backdrop-filter: blur(10px);
}

/* Additional mobile container fixes */
@media (max-width: 768px) {
    /* Fix room list container on mobile */
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .container .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure room cards are visible and properly spaced */
    #roomsList .fluent-card {
        margin: 0 0 1rem 0 !important;
        width: 100% !important;
        display: block !important;
    }

    /* Force list view layout on mobile */
    #roomsList.rooms-list {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Fix any hidden elements */
    #roomsList .col-12.mb-4 {
        display: block !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
    }

    /* Ensure proper mobile viewport */
    body {
        overflow-x: hidden !important;
    }

    /* Fix amenities section on mobile */
    .col-md-4 .p-3.bg-white {
        padding: 1rem !important;
    }

    .col-md-4 .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}