/* Defaults for desktop search layout updates */
.mobile-search-title {
    display: none;
}
.mobile-search-modal {
    display: none;
}
.guest-pill-half, .room-pill-half {
    display: none;
}
.desktop-guests-display {
    display: flex;
    align-items: center;
    width: 100%;
}

/* ==========================================
   MOBILE APP BOTTOM NAVIGATION BAR STYLING
   ========================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    justify-content: space-around;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 500;
    position: relative;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
    stroke: #64748b;
    transition: transform 0.2s, stroke 0.2s;
}

.nav-item.active {
    color: #1b65f2;
    font-weight: 700;
}

.nav-item.active .nav-icon {
    stroke: #1b65f2;
    transform: scale(1.08);
}

.nav-active-dot {
    display: none;
    width: 4px;
    height: 4px;
    background-color: #1b65f2;
    border-radius: 50%;
    position: absolute;
    top: 3px;
}

.nav-item.active .nav-active-dot {
    display: block;
}

/* ==========================================
   RESPONSIVE LAYOUT MEDIA QUERIES
   ========================================== */
@media (max-width: 768px) {
    /* Enable bottom nav and add bottom padding to body so content isn't hidden */
    .mobile-bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: 60px !important;
    }

    /* Abstract header links and hide desktop menus */
    header, .header-container, .main-header {
        padding: 8px 16px !important;
        height: 50px !important;
    }
    .header-right, .top-nav-links, .header-actions {
        display: none !important;
    }
    
    /* Search lists & filter sidebars */
    .search-results-layout, .details-grid-card {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .filters-sidebar, .details-col-right {
        display: none !important; /* Abstracted side panels on mobile view */
    }

    /* Compress main cards */
    .hotel-card {
        flex-direction: column !important;
        height: auto !important;
    }
    .hotel-card-image {
        width: 100% !important;
        height: 180px !important;
    }
    .hotel-card-actions {
        border-left: none !important;
        border-top: 1px solid #e2e8f0 !important;
        width: 100% !important;
        padding: 12px !important;
    }

    /* Hero search forms */
    .search-inputs-grid {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    .search-btn {
        width: 100% !important;
    }

    /* Detail overview layout */
    .detail-grid {
        grid-template-columns: 1fr !important;
    }
    .right-sidebar-box {
        display: none !important;
    }

    /* Checkout & confirmation boxes */
    .checkout-grid {
        grid-template-columns: 1fr !important;
    }
    .price-summary-panel {
        margin-top: 16px;
    }
    .congrats-section-row {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .congrats-right-buttons {
        align-items: flex-start !important;
    }
}

/* App Banner Responsive Styling */
@media (max-width: 900px) {
    .app-banner {
        margin-top: 40px;
    }
    .app-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 32px 24px;
        overflow: visible;
    }
    .app-banner-text {
        max-width: 100%;
        margin-bottom: 24px;
    }
    .app-banner-text h2 {
        font-size: 26px;
        margin-bottom: 16px;
    }
    .app-benefits {
        margin-bottom: 24px;
    }
    .app-benefits li {
        justify-content: center;
        font-size: 15px;
    }
    .app-banner-actions {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }
    .qr-code {
        display: none !important; /* Hide QR code on mobile/tablets */
    }
    .stats-group {
        width: 100%;
        align-items: center;
    }
    .stats {
        justify-content: center;
        width: 100%;
    }
    .store-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .app-banner-image {
        position: relative;
        right: auto;
        bottom: auto;
        margin: 24px auto -56px auto;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .phone-mockup {
        width: 220px;
        height: 440px;
        transform: scale(0.95);
    }
}

/* Mobile App-like Overlay Modals */
@media (max-width: 768px) {
    /* Full screen Destination Search Modal */
    .mobile-search-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: 200000;
        flex-direction: column;
        animation: slideUp 0.3s ease-out;
    }
    
    .mobile-search-modal.show {
        display: flex;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .mobile-search-header {
        display: flex;
        align-items: center;
        padding: 16px;
        border-bottom: 1px solid #e2e8f0;
    }

    .mobile-search-back {
        background: none;
        border: none;
        color: #1a202c;
        cursor: pointer;
        padding: 4px;
        margin-right: 12px;
        display: flex;
        align-items: center;
    }

    .mobile-search-header h3 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
        color: #1a202c;
    }

    .mobile-search-input-wrapper {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background-color: #f7fafc;
        border-bottom: 1px solid #e2e8f0;
    }

    .mobile-search-input-wrapper .search-icon {
        color: #718096;
        margin-right: 8px;
    }

    .mobile-search-input-wrapper input {
        flex: 1;
        border: none;
        background: transparent;
        font-size: 16px;
        font-weight: 600;
        outline: none;
        color: #1a202c;
    }

    .mobile-clear-btn {
        background: none;
        border: none;
        color: #718096;
        cursor: pointer;
        padding: 4px;
    }

    .mobile-search-suggestions {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
    }

    .suggestion-title {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        color: #a0aec0;
        margin-bottom: 12px;
        letter-spacing: 0.5px;
    }

    .suggestion-item {
        display: flex;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid #edf2f7;
        cursor: pointer;
    }

    .suggestion-icon {
        font-size: 20px;
        margin-right: 16px;
    }

    .suggestion-text {
        display: flex;
        flex-direction: column;
    }

    .suggestion-text .city {
        font-size: 15px;
        font-weight: 600;
        color: #1a202c;
    }

    .suggestion-text .country {
        font-size: 12px;
        color: #718096;
    }

    /* Make Calendar Popover Fullscreen on Mobile */
    .calendar-popover {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
        background-color: #ffffff !important;
        z-index: 200000 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: none;
        flex-direction: column !important;
        overflow-y: auto;
    }

    .calendar-popover.show {
        display: flex !important;
    }

    .mobile-calendar-header {
        display: flex;
        align-items: center;
        padding: 16px;
        border-bottom: 1px solid #e2e8f0;
        background-color: #ffffff;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .mobile-calendar-close-btn {
        background: none;
        border: none;
        color: #1a202c;
        cursor: pointer;
        padding: 4px;
        margin-right: 12px;
        display: flex;
        align-items: center;
    }

    .mobile-calendar-header h3 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
    }

    .calendar-months {
        flex: 1;
        overflow-y: auto;
        flex-direction: column !important;
        padding: 16px;
        gap: 24px;
    }

    .calendar-months .month {
        width: 100% !important;
    }

    .calendar-shortcuts {
        display: none !important; /* Hide desktop shortcuts on mobile */
    }

    .mobile-calendar-apply-wrapper {
        display: block;
        padding: 12px 16px;
        border-top: 1px solid #e2e8f0;
        background-color: #ffffff;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }

    .btn-apply-calendar {
        width: 100%;
        background-color: #E55325 !important;
        color: #ffffff;
        border: none;
        border-radius: 30px !important;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        box-shadow: 0 4px 12px rgba(229, 83, 37, 0.2);
    }

    /* Mobile Calendar Date Range Picker Overrides (Orange Theme) */
    .calendar-popover .days .selected {
        background-color: #E55325 !important;
        color: #ffffff !important;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #E55325 !important;
    }

    .calendar-popover .days .in-range {
        background-color: #fdf2ec !important;
        color: #0f172a !important;
    }

    .calendar-popover .days .in-range::before {
        background-color: #fdf2ec !important;
    }

    .calendar-popover .days .selected.start::before {
        background-color: #fdf2ec !important;
    }

    .calendar-popover .days .selected.end::before {
        background-color: #fdf2ec !important;
    }

    /* Mobile custom search card layout overrides */
    .mobile-search-title {
        display: block !important;
        font-size: 22px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        font-family: 'Inter', sans-serif !important;
        letter-spacing: -0.3px !important;
        margin-top: 4px !important;
        margin-bottom: 18px !important;
        text-align: left !important;
    }
    .mobile-search-title .accent-orange {
        font-style: italic !important;
        color: #E55325 !important;
        font-family: Georgia, serif !important;
        letter-spacing: -0.2px !important;
    }

    .search-box {
        flex-direction: column !important;
        align-items: stretch !important;
        background-color: #ffffff !important;
        border-radius: 28px !important;
        padding: 20px 24px 20px 20px !important;
        box-shadow: 0 10px 28px rgba(30, 41, 59, 0.08) !important;
        border: none !important;
    }

    .search-field {
        background-color: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 30px !important;
        padding: 12px 20px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .search-field:hover {
        background-color: #f1f5f9 !important;
    }

    .search-box .divider {
        display: none !important;
    }

    .search-field.guests {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .guests-input-split {
        display: flex !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .guest-pill-half, .room-pill-half {
        display: flex !important;
        flex: 1 !important;
        align-items: center !important;
        background-color: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 30px !important;
        padding: 12px 20px !important;
        box-sizing: border-box !important;
        transition: background-color 0.2s !important;
    }
    .guest-pill-half:hover, .room-pill-half:hover {
        background-color: #f1f5f9 !important;
    }
    .desktop-guests-display {
        display: none !important;
    }

    .btn-search {
        background-color: #E55325 !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 30px !important;
        width: 100% !important;
        height: 54px !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        letter-spacing: 0.3px !important;
        margin-top: 16px !important;
        margin-left: 0 !important;
        box-shadow: 0 4px 12px rgba(229, 83, 37, 0.2) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .btn-search:hover {
        background-color: #d4481d !important;
    }

    .hero {
        display: none !important;
    }
}
