

.booking-widget-container {
    max-width: 400px;
    margin: auto;
}

.booking-widget {
    background: white;
    
    padding: 0px;
    position: relative;
}


.price-display {
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}


.original-price {
    font-size: 22px;
    font-weight: 600;
    color: #717171;
    text-decoration: line-through;
}


.current-price {
    font-size: 22px;
    font-weight: 600;
    color: #222222;
}


.price-period {
    font-size: 16px;
    color: #717171;
    font-weight: 400;
}


.date-inputs-container {
    margin-bottom: 16px;
}


.date-input-group {
    display: flex;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.2s ease;
}


.date-input-group:hover {
    border-color: #222222;
}


.date-input-group.active {
    border-color: #222222;
    box-shadow: 0 0 0 2px rgba(34, 34, 34, 0.1);
}


.date-input-wrapper {
    flex: 1;
    position: relative;
}


.date-input-wrapper:first-child {
    border-right: 1px solid #b0b0b0;
}


.date-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #222222;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 12px 0;
    margin: 0;
}


.date-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 400;
    color: #222222;
    padding: 0 12px 14px;
    background: transparent;
    cursor: pointer;
}


.date-input::placeholder {
    color: #717171;
}


.date-input-wrapper:hover {
    background-color: #f7f7f7;
}

.clear-date-widget-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    color: #c7c7c7;
    cursor: pointer;
    font-weight: 300;
    padding: 0;
    line-height: 1;
}
.clear-date-widget-btn:hover {
    color: #717171;
}

/* Calendar Overlay - Exact Airbnb Style */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


.calendar-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    max-width: 1050px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
}


/* Nights Summary Section */
.nights-summary-section {
    flex: 0 0 280px;
    background: white;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #ebebeb;
    text-align: left;
}

.summary-content-center {
    margin-top: auto;
    margin-bottom: auto;
}

.popup-logo {
    margin-bottom: 24px;
}

.total-amount-display {
    font-size: 16px;
    font-weight: 400;
    color: #222222;
    margin-top: 8px;
}

.nights-count {
    font-size: 32px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 8px;
    line-height: 1.2;
}


.date-range-text {
    font-size: 16px;
    color: #717171;
    line-height: 1.4;
}


/* Calendar Section */
.calendar-section {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}


/* Calendar Date Inputs */
.calendar-date-inputs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}


.calendar-input-group {
    flex: 1;
    position: relative;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 12px 16px;
    background: white;
}


.calendar-input-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #222222;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}


.calendar-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 400;
    color: #222222;
    background: transparent;
    cursor: pointer;
}


.calendar-input::placeholder {
    color: #717171;
}


.clear-input-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #717171;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}


.clear-input-btn:hover {
    background-color: #f0f0f0;
}


/* Calendar Navigation */
.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}


.nav-arrow {
    background: none;
    border: none;
    font-size: 18px;
    color: #222222;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color: 0.2s ease;
}


.nav-arrow:hover {
    background-color: #f0f0f0;
}


.month-headers {
    display: flex;
    gap: 80px;
    flex: 1;
    justify-content: space-around;
}


.month-header {
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    text-align: center;
}


/* Calendar Grid */
.calendar-grid-container {
    display: flex;
    gap: 40px;
    flex: 1;
}


.month-calendar {
    flex: 1;
}


.weekday-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 8px;
}


.weekday-header {
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #717171;
}


.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}


.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    color: #222222;
    padding: 4px;
}


.calendar-day:hover {
    background-color: #f0f0f0;
}


.calendar-day.other-month {
    color: #dddddd;
    cursor: not-allowed;
}


.calendar-day.unavailable {
    background-color: #FFEBEE;
    color: #C2185B;
    cursor: not-allowed;
    text-decoration: none;
    border-radius: 50%;
}


.calendar-day.past {
    color: #dddddd;
    cursor: not-allowed;
}


.calendar-day.selected-start {
    background-color: #222222;
    color: white;
}


.calendar-day.selected-end {
    background-color: #222222;
    color: white;
}


.calendar-day.in-range {
    background-color: #f0f0f0;
    border-radius: 0;
}


.calendar-day.range-start {
    background-color: #222222;
    color: white;
    border-radius: 50% 0 0 50%;
}


.calendar-day.range-end {
    background-color: #222222;
    color: white;
    border-radius: 0 50% 50% 0;
}


.calendar-day.range-start.range-end {
    border-radius: 50%;
}


.calendar-day-price {
    font-size: 10px;
    font-weight: 100;
    color: #717171;
    margin-top: 2px;
    line-height: 1;
}


.calendar-day.selected-start .calendar-day-price,
.calendar-day.selected-end .calendar-day-price,
.calendar-day.range-start .calendar-day-price,
.calendar-day.range-end .calendar-day-price {
    color: rgba(255, 255, 255, 0.8);
}


.calendar-day.other-month .calendar-day-price,
.calendar-day.past .calendar-day-price {
    color: #dddddd;
}

.calendar-day.unavailable .calendar-day-price {
    color: #C2185B;
}


/* Calendar Footer */
.calendar-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ebebeb;
}

.calendar-footer-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.footer-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}


.clear-dates-btn {
    background: none;
    color: #222222;
    text-decoration: underline;
}


.clear-dates-btn:hover {
    background-color: #f0f0f0;
}


.close-btn {
    background-color: #222222;
    color: white;
    padding: 12px 24px;
}


.close-btn:hover {
    background-color: #000000;
}


.reserve-section {
    text-align: center;
}


.reserve-btn {
    width: 100%;
    background: #f6840a !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reserve-btn:hover, .reserve-btn:active {
    background: black !important;
    color: white !important;
    transform: scale(1.02);
}


.reserve-btn:disabled {
    background: #f6840a !important;
    color: white !important;
    cursor: not-allowed;
    transform: none;
}


.no-charge-text {
    margin: 8px 0 0;
    font-size: 14px;
    color: #717171;
    font-weight: 400;
}


.loading-price {
    opacity: 0.6;
}


.error-message {
    color: #e61e4d;
    font-size: 12px;
}


/* Guest Input Styles */
.guest-input-container {
    margin-bottom: 16px;
}


.guest-input-group {
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    background: white;
    transition: border-color 0.2s ease;
    position: relative;
    padding: 14px 12px 14px;
    cursor: pointer;
}


.guest-input-group:hover {
    border-color: #222222;
}


.guest-input-group.active {
    border-color: #222222;
    box-shadow: 0 0 0 2px rgba(34, 34, 34, 0.1);
}


.guest-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #222222;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}


.guest-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 400;
    color: #222222;
    background: transparent;
    cursor: pointer;
    padding: 0;
}


.guest-input::placeholder {
    color: #717171;
}


.guest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dddddd;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 16px;
    z-index: 10;
    margin-top: 8px;
}


.guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ebebeb;
}


.guest-row:last-child {
    border-bottom: none;
}


.guest-type {
    display: flex;
    flex-direction: column;
}


.guest-category {
    font-size: 16px;
    font-weight: 600;
    color: #222222;
}


.guest-description {
    font-size: 14px;
    color: #717171;
}


.guest-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}


.guest-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #b0b0b0;
    border-radius: 50%;
    background: white;
    color: #717171;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}


.guest-btn:hover {
    border-color: #222222;
}


.guest-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.guest-value {
    font-size: 16px;
    font-weight: 400;
    color: #222222;
    min-width: 20px;
    text-align: center;
}

.policy-links {
    text-align: left;
}

.policy-links a {
    font-size: 10px;
    color: #717171;
    text-decoration: none;
}

.policy-links a:hover {
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 992px) { /* Covers tablets and mobile */
    .calendar-popup {
        flex-direction: column;
        max-width: 95vw;
        max-height: 90vh; /* Adjusted height */
        overflow: scroll; /* Prevent scrolling of the whole popup */
    }

    .calendar-section {
        overflow: visible; /* Content will now fit, no scroll needed */
        flex-shrink: 1; 
        padding: 15px 20px; /* Reduced padding */
    }

    .calendar-date-inputs, .calendar-navigation {
        margin-bottom: 15px; /* Reduced vertical spacing */
    }

    .calendar-day {
        height: 42px; /* Set a fixed height to make cells smaller */
        font-size: 13px;
    }

    .calendar-day-price {
        font-size: 9px;
    }

    .nights-summary-section {
        flex: 0 0 auto;
        padding: 15px 20px;
        text-align: center;
        border-right: none;
        border-bottom: 1px solid #ebebeb;
        justify-content: center;
        background: white;
    }

    .popup-property-info, .popup-vendor-info {
        display: none;
    }

    .nights-summary-section .summary-content-center {
        display: block;
        margin: 0;
    }
    
    .nights-summary-section .policy-links {
        text-align: center;
        margin-top: 8px; /* Reduced margin */
    }
    
    .nights-count {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .date-range-text {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .total-amount-display {
        font-size: 14px;
        font-weight: 600;
    }

    .calendar-grid-container {
        flex-direction: column; /* Stack months vertically */
        gap: 20px;
    }

    /* Hide the second calendar and its header on smaller screens */
    #nextMonthHeader,
    .calendar-grid-container .month-calendar:last-child {
        display: none;
    }

    .month-headers {
        justify-content: center;
    }
}

/* Specific override for landscape mobile where height is limited */
@media (max-width: 992px) and (orientation: landscape) and (max-height: 550px) {
    .calendar-popup {
        flex-direction: row; /* Side-by-side is better for landscape */
        overflow-y: hidden; /* Parent doesn't scroll */
    }

    .nights-summary-section {
        flex: 0 0 220px; /* Revert this from 280px */
        border-bottom: none;
        border-right: 1px solid #ebebeb;
        background: white; /* revert from f7f7f7 */
        padding: 20px;
    }
    
    .popup-property-info, .popup-vendor-info {
        display: none;
    }

    .calendar-section {
        overflow-y: auto; /* The calendar itself scrolls */
    }

    .calendar-grid-container {
        flex-direction: row; /* Show months side-by-side again */
    }

    #nextMonthHeader,
    .calendar-grid-container .month-calendar:last-child {
        display: block;
    }
    
    .month-headers {
        gap: 40px; /* Add some gap back */
        justify-content: space-around;
    }
}

/* Desktop-specific adjustments to prevent scrolling */
@media (min-width: 993px) {
    .calendar-day {
        max-height: 44px;
    }
}
