﻿@media (max-width: 767px) {
    .custom-calendar-container {
        width: 95%;
        max-width: 95%;
        border-radius: 16px;
    }

    .calendar-months {
        flex-direction: column;
        gap: 20px;
    }

    .date-inputs-row {
        flex-direction: column;
        gap: 12px;
    }

    .month-title {
        font-size: 16px;
    }

    .flexibility-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .flex-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .custom-calendar-container {
        width: 98%;
        max-height: 90vh;
    }

    .custom-calendar-body {
        padding: 12px;
    }

    .month-title {
        font-size: 15px;
    }

    .search-calendar-day {
        font-size: 13px;
    }
}
/* Large Desktops (1400px and up) */
@media (min-width: 1400px) {
    .search-container {
        padding: 0 40px;
    }
}

/* Standard Laptops (1200px - 1399px) */
@media (max-width: 1399px) {
    .search-container {
        padding: 0 30px;
    }
}

/* Small Laptops (992px - 1199px) */
@media (max-width: 1199px) {
    .search-bar {
        padding: 18px 25px;
    }

    .search-group {
        flex: 1 1 140px;
    }

    .separator {
        height: 60px;
    }
}

/* Surface Pro 7 Landscape (912px - 991px) */
@media (max-width: 991px) and (min-height: 600px) {
    .search-bar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .search-group {
        flex: 1 1 30%;
        min-width: 30%;
        max-width: 30%;
    }

    .guests-group {
        flex: 1 1 40% !important;
    }

    .separator {
        display: none;
    }

    .search-bar button {
        width: auto;
        flex: 1 1 100%;
        margin-top: 15px;
    }
}

/* Tablets (768px - 911px) */
@media (max-width: 911px) {
    .search-bar {
        flex-direction: column;
        border-radius: 20px;
        padding: 15px;
        gap: 10px;
    }

    .search-group {
        max-width: 100%;
        min-width: 100%;
    }

    .search-bar button {
        width: 100%;
        height: 48px;
        margin-top: 10px;
    }

    .dropdown-content {
        width: 100%;
        max-width: 100vw;
        left: 0;
        right: 0;
    }
}

/* Surface Pro 7 Portrait (600px - 767px) */
@media (max-width: 767px) and (orientation: portrait) {
    .search-bar {
        padding: 18px;
    }

    .search-group {
        min-width: 100%;
    }

    .search-bar input,
    .search-bar select {
        font-size: 16px;
    }
}

/* Large Phones (576px - 599px) */
@media (max-width: 599px) {
    .search-container {
        padding: 0 15px;
    }

    .search-bar {
        padding: 12px;
        border-radius: 15px;
    }

    .dropdown-content {
        width: calc(100vw - 24px);
        left: -12px;
    }

    html[dir="rtl"] .dropdown-content {
        left: auto;
        right: -12px;
    }
}

/* Small Phones (375px - 575px) */
@media (max-width: 575px) {
    .search-bar label {
        font-size: 13px;
    }

    .search-bar input,
    .search-bar select {
        font-size: 15px;
    }

    .counter-btn {
        width: 32px;
        height: 32px;
    }
}

/* Extra Small Phones (under 374px) */
@media (max-width: 374px) {
    .search-container {
        padding: 0 10px;
    }

    .search-bar {
        padding: 10px;
    }

        .search-bar button {
            height: 44px;
            font-size: 14px;
        }
}

/* High DPI/Retina Displays */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
    .search-bar {
        border-width: 0.5px;
    }

    .separator {
        height: 65px;
    }

    .search-bar button {
        padding: 0 18px;
    }

    .search-icon {
        width: 24px;
        height: 24px;
    }
}

/* Touch Device Specific Styles */
@media (pointer: coarse) {
    .counter-btn, .search-group, .search-bar button {
        min-height: 44px;
    }

    .search-bar input,
    .search-bar select {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* Reduce the size of check-in and check-out buttons */
.custom-calendar-modal .nav-btn {
    padding: 4px 8px; /* Smaller padding */
    font-size: 12px; /* Smaller font size */
    min-width: 28px; /* Reduce button width */
    height: 28px; /* Reduce button height */
}

.date-input-group {
    flex: 1;
    padding: 8px; /* Reduce padding */
}

    .date-input-group label {
        font-size: 12px; /* Smaller font size */
        margin-bottom: 4px; /* Reduce spacing */
    }

    .date-input-group input {
        padding: 6px 10px; /* Reduce input padding */
        font-size: 14px; /* Smaller font size */
        height: 32px; /* Reduce input height */
    }

/* Set the background color of the entire calendar window to grey */
.custom-calendar-modal .custom-calendar-container {
    background-color: #d3d3d3; /* Light grey background */
}

/* Keep the background of the two calendar months white */
.custom-calendar-modal .calendar-month {
    background-color: white; /* White background for calendar months */
    border-radius: 16px; /* Optional: Add rounded corners */
    padding: 10px; /* Optional: Add padding for spacing */
}

/* Custom Calendar Modal Styles - Scoped to Search Bar */
.search-bar ~ .custom-calendar-modal,
.custom-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    /* Reset any inherited styles */
    font-family: inherit;
    line-height: normal;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
    margin-top: 0px;
}

    .search-bar ~ .custom-calendar-modal .custom-calendar-overlay,
    .custom-calendar-modal .custom-calendar-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .search-bar ~ .custom-calendar-modal .custom-calendar-container,
    .custom-calendar-modal .custom-calendar-container {
        background: white;
        border-radius: 20px;
        width: 90%;
        max-width: 800px;
        max-height: 90vh;
        overflow: auto;
        position: relative;
        z-index: 10001;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        /* Reset inherited styles that might affect calendar */
        color: #333 !important;
        font-family: inherit;
        line-height: normal;
        text-decoration: none !important;
        text-transform: none !important;
    }

.custom-calendar-header {
    padding: 12px 24px 10px;
    margin: 0px;
}

.date-inputs-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

.date-input-group {
    flex: 1;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

    .date-input-group label {
        position: absolute;
        top: 8px;
        left: 12px;
        font-size: 11px;
        font-weight: 600;
        color: #207d9c;
        background: white;
        padding: 0 4px;
        z-index: 2;
        line-height: 1;
    }

    .date-input-group input {
        width: 100%;
        padding: 30px 16px 12px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
        font-weight: bold;
        color: #000;
        background: #f8f9fa;
        line-height: 1.2;
        box-sizing: border-box;
    }

.custom-calendar-body {
    padding: 24px;
    background-color: #f0eeea;
}

.calendar-months {
    display: flex;
    gap: 40px;
    margin-bottom: 5px;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.calendar-month {
    flex: 1;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.nav-spacer {
    width: 40px;
    height: 36px;
}

.month-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 16px;
    flex: 1;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.nav-btn {
    background: none !important;
    border: none !important;
    font-size: 22px !important;
    color: #207d9c !important;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}

    .nav-btn:hover {
        background-color: rgba(32, 125, 156, 0.1) !important;
    }

.calendar-grid {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Nights Display */
.nights-display {
    text-align: center;
    padding: 12px 24px;
    margin: 16px 0 8px 0;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #b3d9ff;
}

.nights-info {
    color: #000 !important;
    font-size: 16px;
    font-weight: 500;
}

    .nights-info #nightsCount {
        color: #000 !important;
        font-size: 20px;
        font-weight: 700;
    }

    .nights-info #nightsLabel {
        color: #000 !important;
        font-weight: 500;
    }

/* Mobile Month Navigation - Hidden on Desktop */
.mobile-month-nav {
    display: none;
}

/* Search Calendar specific styles - scoped to custom calendar modal */
.custom-calendar-modal .search-calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.custom-calendar-modal .search-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666 !important;
    padding: 8px 4px;
    background: transparent !important;
    text-decoration: none !important;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-calendar-modal .search-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.custom-calendar-modal .search-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    color: #333 !important; /* Force dark text color */
    background-color: transparent !important; /* Ensure transparent background by default */
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .custom-calendar-modal .search-calendar-day:hover:not(.disabled):not(.empty) {
        background-color: #e0f2f1 !important;
        color: #333 !important;
    }

    .custom-calendar-modal .search-calendar-day.other-month {
        color: #ccc !important;
    }

    .custom-calendar-modal .search-calendar-day.today {
        border: 2px solid #00838f !important;
        color: #00838f !important;
        font-weight: 600;
        background-color: transparent !important;
    }

    .custom-calendar-modal .search-calendar-day.selected {
        background-color: #00838f !important;
        color: white !important;
        font-weight: 600;
        border-radius: 16px !important;
        margin: 3px !important;
    }

    .custom-calendar-modal .search-calendar-day.in-range {
        background-color: #b2ebf2 !important;
        color: #207d9c !important;
        border-radius: 16px !important;
        margin: 3px !important;
    }

    .custom-calendar-modal .search-calendar-day.weekend {
        color: #333 !important
    }

    .custom-calendar-modal .search-calendar-day.disabled {
        color: #ccc !important;
        cursor: not-allowed;
        background-color: #f5f5f5 !important;
    }

        .custom-calendar-modal .search-calendar-day.disabled:hover {
            background-color: #f5f5f5 !important;
            color: #ccc !important;
        }

.flexibility-section {
    padding-top: 5px !important; /* Reduced padding */
    margin-top: 5px !important; /* Reduced margin */
    padding: 0 24px; /* Add horizontal padding */
}

.flexibility-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.flex-btn {
    padding: 8px 12px !important;
    border: 2px solid #207d9c !important;
    background: white !important;
    color: #207d9c !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex: 1 !important;
    min-width: 0 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

    .flex-btn::before {
        content: none !important;
        display: none !important;
    }

    .flex-btn:hover {
        border-color: #006064 !important;
        background-color: #f0f8f8 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 4px rgba(0, 96, 100, 0.1) !important;
    }

    .flex-btn.active {
        background-color: #207d9c !important;
        color: white !important;
        border-color: #207d9c !important;
        box-shadow: 0 2px 8px rgba(0, 96, 100, 0.2) !important;
    }

.custom-calendar-footer {
    padding: 8px 16px !important; /* Decreased padding */
    border-top: 1px solid #e0e0e0 !important;
    display: flex !important;
    justify-content: flex-end !important; /* Always right-align buttons */
    align-items: center !important;
    gap: 12px !important; /* Direct gap between buttons */
    margin: 0 !important; /* Set margin to zero */
    background-color: #f0eeea;
    position: relative !important; /* For absolute positioning of nights display */
}

    /* Desktop footer nights display */
    .custom-calendar-footer .nights-display {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        padding: 0;
        background: none;
        border: none;
        border-radius: 0;
        text-align: left;
        display: block;
    }

/* Hide header nights display on desktop */
.custom-calendar-header .nights-display {
    display: none !important;
}

.custom-calendar-footer .nights-info {
    color: #000 !important;
    font-size: 16px;
    font-weight: 500;
}

    .custom-calendar-footer .nights-info #nightsCountFooter {
        color: #000 !important;
        font-size: 16px;
        font-weight: 700;
    }

    .custom-calendar-footer .nights-info #nightsLabelFooter {
        color: #000 !important;
        font-weight: 500;
    }

.clear-btn {
    background: none !important;
    border: none !important;
    color: #7f0f20 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    text-decoration: underline !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
    font-weight: 600 !important;
}

    .clear-btn:hover {
        color: #7f0f20 !important;
        background-color: #f8d7da !important;
        text-decoration: none !important;
    }

.done-btn {
    background-color: #207d9c !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
}

    .done-btn:hover {
        background-color: #207d9c !important;
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-calendar-container {
        width: 95%;
        max-width: 95vw;
        max-height: 90vh;
        border-radius: 16px;
        margin: 10px;
        background: white;
    }

    .custom-calendar-header {
        padding: 16px 20px;
        border-bottom: 1px solid #e0e0e0;
        background: white;
        border-radius: 16px 16px 0 0;
    }

    .custom-calendar-body {
        padding: 20px 16px;
        background: white;
    }

    .calendar-months {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    /* Hide complex desktop month headers on mobile */
    .calendar-month .month-header {
        display: none;
    }
    /* Show and style mobile month navigation */
    .mobile-month-nav {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding: 16px 20px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-nav-btn {
        width: 44px;
        height: 44px;
        background: none !important;
        border: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        border-radius: 0;
        transition: none;
    }

        .mobile-nav-btn span {
            font-size: 20px;
            font-weight: bold;
            color: #333;
        }

        .mobile-nav-btn:hover {
            background: none !important;
        }

    .mobile-month-title {
        flex: 1;
        text-align: center;
        font-size: 18px;
        font-weight: 700;
        color: #2c3e50;
        margin: 0 16px;
    }
    /* Style the single calendar */
    .calendar-month#month1 {
        width: 100%;
        background: transparent;
        border-radius: 0;
        padding: 0;
    }
    /* Modern Mobile Navigation Header */
    .month-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding: 12px 16px;
        width: 100%;
        box-sizing: border-box;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        position: relative;
        min-height: 56px;
    }
    /* Month title - centered and prominent */
    .month-title {
        font-size: 18px;
        margin: 0;
        font-weight: 700;
        text-align: center;
        color: #2c3e50 !important;
        display: block !important;
        visibility: visible !important;
        flex: 1;
        line-height: 1.2;
        padding: 0 8px;
    }
    /* Previous button - left aligned */
    .calendar-month#month1 .prev-btn {
        position: static;
        order: 1;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        font-size: 20px !important;
        background: none !important;
        border: none !important;
        color: #333 !important;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: none;
        box-shadow: none;
        flex-shrink: 0;
        font-weight: bold !important;
    }
    /* Next button - right aligned (replacing nav-spacer) */
    .calendar-month#month1 .nav-spacer {
        position: static;
        order: 3;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none !important;
        border: none !important;
        cursor: pointer;
        flex-shrink: 0;
        transition: none;
        box-shadow: none;
    }

        .calendar-month#month1 .nav-spacer::after {
            content: ">";
            font-size: 20px !important;
            color: #333 !important;
            font-weight: bold !important;
            line-height: 1;
        }

        .calendar-month#month1 .nav-spacer:hover {
            background: none !important;
            border: none !important;
            transform: none;
            box-shadow: none;
        }

            .calendar-month#month1 .nav-spacer:hover::after {
                color: #333 !important;
            }

    .calendar-grid {
        width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .custom-calendar-modal .search-calendar-days {
        gap: 2px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }

    .custom-calendar-modal .search-calendar-day {
        min-height: 44px;
        max-height: 44px;
        min-width: 44px;
        max-width: 100%;
        font-size: 16px;
        border-radius: 12px;
        margin: 0 !important;
        padding: 0 !important;
        font-weight: 500;
        box-sizing: border-box !important;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
        /* Fix selected and highlighted day overflow */
        .custom-calendar-modal .search-calendar-day.selected {
            background-color: #00838f !important;
            color: white !important;
            font-weight: 600;
            border-radius: 12px !important;
            margin: 0 !important;
            padding: 0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .custom-calendar-modal .search-calendar-day.in-range {
            background-color: #b2ebf2 !important;
            color: #207d9c !important;
            border-radius: 12px !important;
            margin: 0 !important;
            padding: 0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .custom-calendar-modal .search-calendar-day.today {
            border: 2px solid #00838f !important;
            color: #00838f !important;
            font-weight: 600;
            background-color: transparent !important;
            margin: 0 !important;
            padding: 0 !important;
            box-sizing: border-box !important;
        }

    .custom-calendar-modal .search-day-header {
        padding: 12px 4px;
        font-size: 12px;
        font-weight: 700;
    }
    /* Mobile nights display for 768px */
    .custom-calendar-header .nights-display {
        display: block !important;
        padding: 12px 16px;
        margin: 12px 0;
        background: #f0f8ff;
        border-radius: 8px;
        border: 1px solid #b3d9ff;
        text-align: left;
    }
    /* Hide footer nights display on mobile */
    .nights-display-footer {
        display: none;
    }

    .nights-info {
        color: #000 !important;
        font-size: 16px;
        font-weight: 500;
    }

        .nights-info #nightsCount {
            color: #000 !important;
            font-size: 20px;
            font-weight: 700;
        }

        .nights-info #nightsLabel {
            color: #000 !important;
            font-weight: 500;
        }

    .date-inputs-row {
        flex-direction: column;
        gap: 16px;
    }

    .date-input-group {
        width: 100%;
    }

        .date-input-group input {
            padding: 32px 20px 14px;
            font-size: 16px;
            border-radius: 12px;
            min-height: 56px;
            box-sizing: border-box;
        }

        .date-input-group label {
            top: 10px;
            left: 20px;
            font-size: 12px;
        }

    .flexibility-section {
        padding: 20px 16px 16px;
        margin-top: 20px;
        border-top: 1px solid #e0e0e0;
        background: white;
    }

    .flexibility-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        box-sizing: border-box;
    }

    .flex-btn {
        font-size: 11px !important;
        padding: 8px 6px !important;
        border-radius: 20px !important;
        min-height: 40px !important;
        border: 2px solid #207d9c !important;
        background: white !important;
        color: #207d9c !important;
        flex: 0 0 calc(33.333% - 5.33px) !important; /* 3 buttons per row with gap */
        max-width: calc(33.333% - 5.33px) !important;
        min-width: 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }


    .custom-calendar-footer {
        padding: 16px 20px !important;
        border-top: 1px solid #e0e0e0 !important;
        background: white;
        border-radius: 0 0 16px 16px;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 12px !important;
    }
        /* Hide footer nights display on mobile */
        .custom-calendar-footer .nights-display {
            display: none !important;
        }

    .clear-btn {
        font-size: 16px !important;
        padding: 12px 20px !important;
        min-height: 44px !important;
    }

    .done-btn {
        font-size: 16px !important;
        padding: 14px 28px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 480px) {
    .custom-calendar-container {
        width: 100%;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
        background: white;
    }

    .custom-calendar-header {
        padding: 20px 16px;
        border-radius: 0;
    }

    .custom-calendar-body {
        padding: 16px 12px;
        background: white;
    }
    /* Hide complex desktop month headers on mobile */
    .calendar-month .month-header {
        display: none;
    }
    /* Show and style mobile month navigation for 480px */
    .mobile-month-nav {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding: 12px 16px;
        background: #f8f9fa;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #e0e0e0;
    }

    .mobile-nav-btn {
        width: 48px;
        height: 48px;
        background: none !important;
        border: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        border-radius: 0;
    }

        .mobile-nav-btn span {
            font-size: 24px;
            font-weight: bold;
            color: #333;
        }

        .mobile-nav-btn:hover {
            background: none !important;
        }

    .mobile-month-title {
        flex: 1;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin: 0 12px;
    }
    /* Clean up calendar months for mobile */
    .calendar-month#month2 {
        display: none;
    }

    .calendar-month#month1 {
        background: transparent;
        border-radius: 0;
        padding: 0;
    }

    .custom-calendar-modal .search-calendar-day {
        min-height: 40px;
        max-height: 40px;
        min-width: 40px;
        max-width: 100%;
        font-size: 14px;
        color: #333 !important;
        border-radius: 10px;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
        /* Fix overflow for selected/highlighted days at 480px */
        .custom-calendar-modal .search-calendar-day.selected {
            background-color: #00838f !important;
            color: white !important;
            font-weight: 600;
            border-radius: 10px !important;
            margin: 0 !important;
            padding: 0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .custom-calendar-modal .search-calendar-day.in-range {
            background-color: #b2ebf2 !important;
            color: #207d9c !important;
            border-radius: 10px !important;
            margin: 0 !important;
            padding: 0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .custom-calendar-modal .search-calendar-day.today {
            border: 2px solid #00838f !important;
            color: #00838f !important;
            font-weight: 600;
            background-color: transparent !important;
            margin: 0 !important;
            padding: 0 !important;
            box-sizing: border-box !important;
        }

    .custom-calendar-modal .search-day-header {
        font-size: 11px;
        color: #666 !important;
        padding: 10px 2px;
        font-weight: 600;
    }
    /* Mobile nights display for 480px */
    .nights-display {
        padding: 10px 12px;
        margin: 8px 0;
        background: #f0f8ff;
        border-radius: 6px;
        border: 1px solid #b3d9ff;
    }

    .nights-info {
        color: #000 !important;
        font-size: 14px;
        font-weight: 500;
    }

        .nights-info #nightsCount {
            color: #000 !important;
            font-size: 18px;
            font-weight: 700;
        }

        .nights-info #nightsLabel {
            color: #000 !important;
            font-weight: 500;
        }

    .custom-calendar-modal .search-calendar-days {
        gap: 1px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }

    .date-input-group input {
        padding: 30px 16px 12px;
        font-size: 16px;
        min-height: 52px;
    }

    .date-input-group label {
        top: 8px;
        left: 16px;
        font-size: 11px;
    }

    .flexibility-section {
        padding: 16px 12px 12px;
        margin-top: 16px;
        background: white;
    }

    .flexibility-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        justify-content: center;
        align-items: stretch;
        box-sizing: border-box;
    }

    .flex-btn {
        font-size: 11px !important;
        padding: 6px 8px !important;
        border-radius: 18px !important;
        min-height: 36px !important;
        border: 2px solid #207d9c !important;
        background: white !important;
        color: #207d9c !important;
        font-weight: 500 !important;
        text-align: center;
        white-space: nowrap;
        flex: 0 1 auto;
        min-width: 0;
        max-width: calc(50% - 3px);
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .custom-calendar-footer {
        padding: 16px !important;
        border-radius: 0;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .clear-btn {
        font-size: 14px !important;
        padding: 10px 16px !important;
        min-height: 40px !important;
    }

    .done-btn {
        font-size: 14px !important;
        padding: 12px 24px !important;
        min-height: 40px !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 375px) {
    .custom-calendar-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        background: white;
    }

    .custom-calendar-header {
        padding: 16px 12px;
    }

    .custom-calendar-body {
        padding: 12px 8px;
        background: white;
    }

    .month-title {
        font-size: 15px;
        margin: 0;
    }

    .nav-btn {
        padding: 4px;
        margin: 0;
        min-width: 24px;
        height: 24px;
        font-size: 12px !important;
        background: none !important;
        border: none !important;
        color: #207d9c !important;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .nav-btn:hover {
            background: rgba(32, 125, 156, 0.1) !important;
            color: #207d9c !important;
        }

    .custom-calendar-modal .search-calendar-day {
        min-height: 36px;
        min-width: 36px;
        font-size: 13px;
        border-radius: 8px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .custom-calendar-modal .search-calendar-days {
        gap: 1px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .date-input-group input {
        padding: 28px 12px 10px;
        font-size: 15px;
        min-height: 48px;
    }

    .date-input-group label {
        top: 6px;
        left: 12px;
        font-size: 10px;
    }

    .flexibility-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 0;
        justify-content: center;
        align-items: stretch;
        box-sizing: border-box;
    }

    .flex-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        border-radius: 16px !important;
        min-height: 32px !important;
        border: 2px solid #207d9c !important;
        background: white !important;
        color: #207d9c !important;
        font-weight: 500 !important;
        text-align: center;
        white-space: nowrap;
        flex: 0 1 auto;
        min-width: 0;
        max-width: calc(50% - 2px);
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .custom-calendar-footer {
        padding: 12px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .clear-btn {
        font-size: 13px !important;
        padding: 8px 12px !important;
        min-height: 36px !important;
    }

    .done-btn {
        font-size: 13px !important;
        padding: 10px 20px !important;
        min-height: 36px !important;
        border-radius: 8px !important;
    }
}

/* Touch-friendly enhancements */
@media (pointer: coarse) {
    .custom-calendar-modal .search-calendar-day {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .nav-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .flex-btn {
        min-height: 44px !important;
        touch-action: manipulation;
    }

    .clear-btn, .done-btn {
        min-height: 44px !important;
        touch-action: manipulation;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .custom-calendar-container {
        max-height: 95vh;
        overflow-y: auto;
    }

    .calendar-months {
        padding: 0;
    }

    .calendar-month#month2 {
        display: none;
    }

    .date-inputs-row {
        flex-direction: row;
        gap: 12px;
    }

    .flexibility-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        justify-content: center;
        align-items: stretch;
        box-sizing: border-box;
    }

    .flex-btn {
        font-size: 12px !important;
        padding: 8px 6px !important;
        border-radius: 16px !important;
        min-height: 36px !important;
        border: 2px solid #207d9c !important;
        background: white !important;
        color: #207d9c !important;
        font-weight: 500 !important;
        text-align: center;
        white-space: nowrap;
        flex: 0 1 auto;
        min-width: 0;
        max-width: calc(33.33% - 4px);
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.mobile-title {
    font-size: 1.5rem; /* adjust size */
    font-weight: 600;
    color: #011722; /* same as your headings */
    margin-left: 0;
}
.custom-calendar-footer  .rtl-nights-display {
    left: auto;
    right: 16px;
}