/* ========================================= */
/* INLINE BOOKING WIDGET (Sofitel-style)     */
/* ========================================= */

/* Anchor container in the hero section */
#booking-widget-anchor {
    width: 100%;
    position: relative;
    z-index: 100;
    overflow: visible;
}

.booking-widget-container {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease;
}

.booking-widget-container.open {
    max-height: 900px;
    opacity: 1;
    overflow: visible;
    z-index: 200;
}

/* No backdrop needed for inline widget */
.widget-backdrop {
    display: none;
}

/* Wrapper — simple container, no transform */
.booking-widget-wrapper-inner {
    width: 100%;
    position: relative;
    padding: 0;
}

/* The Glass Panel itself */
.booking-widget-glass-panel {
    border-radius: 1.5rem;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(20, 18, 16, 0.82);
    position: relative;
    font-weight: 600;
    overflow: visible;
    color: #fff;
    backdrop-filter: blur(32px) saturate(140%);
    -webkit-backdrop-filter: blur(32px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    margin-top: 1.5rem;
}

.glass-content {
    position: relative;
    z-index: 30;
}

/* Close Button - inline in form row */
.close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 48px;
    height: 56px;
    min-width: 48px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    flex-shrink: 0;
}

.close-btn:hover {
    color: #fff;
    background: transparent;
    transform: scale(1.15);
}

/* Main Forms Row */
.booking-form-header {
    display: flex;
    align-items: flex-end;
    gap: 1.2rem;
    margin-bottom: 0;
}

.form-group-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    text-align: left;
    min-width: 0;
}

/* Give date wrapper more space so full date range displays */
.form-group-wrapper:has(#date-trigger) {
    flex: 1.5;
    min-width: 260px;
}

/* Give guest wrapper more space so the full text displays */
.form-group-wrapper:has(#guest-trigger) {
    flex: 1.4;
    min-width: 220px;
}

.form-group-wrapper label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 0.25rem;
    text-transform: none;
    font-family: 'Instrument Sans', sans-serif;
}

/* Inputs - Sofitel-style white fields */
.b-input-trigger,
.date-inputs-container {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    height: 56px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: none;
}

#guest-display,
#guest-trigger .guest-value {
    color: #1a1a1a !important;
    display: inline-block;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.88rem;
}

.guest-selector-dropdown .guest-value {
    color: #fff !important;
}

.b-input-trigger:hover,
.date-inputs-container:hover,
.b-input-trigger.active,
.date-inputs-container.active {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: none;
}

.date-inputs-container {
    justify-content: flex-start;
    gap: 0.75rem;
    white-space: nowrap;
}

.date-arrow {
    opacity: 0.35;
    font-weight: 300;
    color: #666;
}

.date-trigger-value {
    color: #1a1a1a;
}

/* Search Button - Sofitel Bronze */
.search-btn-gold {
    background: #8b6f4e;
    color: #fff;
    border: none;
    height: 56px;
    padding: 0 2.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 140px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
}

.search-btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.search-btn-gold:hover::before {
    left: 125%;
}

.search-btn-gold:hover {
    background: #7a6043;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Criteria Toggle */
.criteria-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0 0.25rem 0;
    opacity: 1;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.criteria-toggle-btn {
    background: transparent;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    transition: all 0.25s;
    font-family: 'Instrument Sans', sans-serif;
    white-space: nowrap;
}

.criteria-toggle-btn:hover {
    color: #fff;
}

.chevron {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.chevron.open {
    transform: rotate(180deg);
}

/* Expanded Criteria */
.criteria-content {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height 0.4s ease-out, opacity 0.4s ease-out, margin-bottom 0.4s ease-out;
}

.criteria-content.open {
    height: auto;
    opacity: 1;
    margin-bottom: 2rem;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    text-align: left;
}

.criteria-col h4 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Instrument Sans', sans-serif;
}

.criteria-col label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-family: 'Instrument Sans', sans-serif;
}

.b-input-glass {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    height: 52px;
    padding: 0 1rem;
    color: #fff;
    outline: none;
    transition: all 0.3s;
    font-family: 'Instrument Sans', sans-serif;
}

.b-input-glass:focus {
    border-color: rgba(166, 144, 104, 0.8);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ========================================= */
/* LUXURY CALENDAR STYLES                    */
/* ========================================= */

.luxury-calendar-wrapper,
.guest-selector-dropdown {
    z-index: 9999 !important;
    position: absolute;
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
    overflow: visible;
    top: calc(100% + 12px);
    left: 0;
    display: none;
    /* Hidden by default */
}

.luxury-calendar-wrapper.visible,
.guest-selector-dropdown.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guest-selector-dropdown {
    min-width: 320px;
}

.luxury-calendar {
    width: 680px;
    color: #fff;
    padding: 1.5rem;
    user-select: none;
    font-family: 'Instrument Sans', sans-serif;
    position: relative;
}

.calendar-header {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none;
}

.calendar-header>button {
    pointer-events: auto;
}

.month-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.month-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.months-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 0.5rem;
}

.month-view {
    width: 100%;
}

.month-title {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-transform: capitalize;
    z-index: 20;
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.5rem;
}

.weekday {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

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

.day-cell {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.15s;
    position: relative;
    color: #fff;
}

.day-cell.outside {
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    visibility: hidden;
}

.day-cell:not(.selected):not(.outside):not(.disabled):hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.day-cell.disabled {
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    text-decoration: line-through;
}

.day-cell.selected {
    background: #A69068;
    color: #fff;
    border-radius: 0.5rem;
    z-index: 10;
}

.day-cell.in-range.range-middle {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 0;
    width: 100%;
    margin: 0;
}

.day-cell.range-start {
    border-radius: 0.5rem 0 0 0.5rem !important;
    width: 100%;
    margin: 0;
    background: #A69068;
}

.day-cell.range-end {
    border-radius: 0 0.5rem 0.5rem 0 !important;
    width: 100%;
    margin: 0;
    background: #A69068;
}

.day-cell.is-today:not(.selected)::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #A69068;
    border-radius: 50%;
}

.day-cell.selected.is-today::after {
    background: #fff;
}

.calendar-mobile-close-btn {
    display: none;
}

/* ========================================= */
/* GUEST SELECTOR STYLES                     */
/* ========================================= */

.guest-selector-luxury {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 250px;
}

.guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guest-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Instrument Sans', sans-serif;
}

.guest-stepper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stepper-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    line-height: 1;
    padding-bottom: 2px;
}

.stepper-btn:hover:not(:disabled) {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.stepper-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.guest-value {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    color: #fff;
    width: 20px;
    text-align: center;
    font-weight: 500;
}

.guest-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
}

.guest-mobile-close-btn {
    display: none;
}

/* ========================================= */
/* MOBILE OVERRIDES                          */
/* ========================================= */
@media (max-width: 1000px) {

    /* Mobile Modal Overlay - Fixed full screen */
    .booking-widget-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2000;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        max-height: none;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        margin: 0;
    }

    .booking-widget-container.open {
        opacity: 1;
        pointer-events: all;
        /* Allow interaction */
    }

    .booking-widget-wrapper-inner {
        width: 100%;
        max-width: 400px;
        position: relative;
    }

    /* Animate the Panel */
    .booking-widget-glass-panel {
        transform: translateY(20px) scale(0.95);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        margin-top: 0;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        user-select: none;
        -webkit-user-select: none;
        /* Ensure user's close button position works here too */
    }

    .booking-widget-container.open .booking-widget-glass-panel {
        transform: translateY(0) scale(1);
    }

    .close-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.1rem;
    }

    .booking-widget-glass-panel {
        padding: 1.5rem 1rem 1.5rem 1rem;
        border-radius: 1rem;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .booking-form-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .b-input-trigger,
    .date-inputs-container,
    .search-btn-gold {
        height: 52px;
    }

    .criteria-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .search-btn-gold {
        width: 100%;
        margin-top: 0.5rem;
    }

    .close-btn {
        position: absolute;
        top: -0.90rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        /* Increased visibility */
        color: #fff;
        align-self: auto;
        font-size: 1rem;
        padding: 0;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Modal Center Style */
    .luxury-calendar-wrapper,
    .guest-selector-dropdown {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 90vw;
        max-width: 400px;
        z-index: 2200 !important;
        margin: 0;
        background: rgba(20, 20, 20, 0.95) !important;
        backdrop-filter: blur(32px) !important;
        box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.7) !important;
        max-height: 90vh;
        max-height: 90vh;
        overflow-y: auto;
        user-select: none;
        -webkit-user-select: none;
    }

    .luxury-calendar-wrapper.visible,
    .guest-selector-dropdown.visible {
        animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: translate(-50%, -45%) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    .calendar-mobile-close-btn,
    .guest-mobile-close-btn {
        display: flex;
        position: absolute;
        top: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        border-radius: 50%;
        z-index: 9999 !important;
        cursor: pointer;
        padding: 0;
        font-size: 1.2rem;
    }

    .guest-selector-dropdown {
        padding-top: 3.5rem !important;
    }

    .calendar-header {
        position: sticky;
        top: 0;
        padding-top: 1rem;
        padding-bottom: 1rem;
        background: rgba(20, 20, 20, 0.98);
        z-index: 200;
        margin: 0;
        width: 100%;
        left: 0;
        right: 0;
    }

    .luxury-calendar {
        width: 100%;
        padding: 0;
    }

    .months-container {
        grid-template-columns: 1fr;
    }
}

/* Visibility Helpers for Close Button */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

@media (max-width: 1000px) {
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
}
