/* Floating Booking Bar - appears once the hero booking widget scrolls out of view */
.fbw {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 9990;
    width: calc(100% - 32px);
    max-width: 780px;
    transform: translate(-50%, calc(100% + 48px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    font-family: inherit;
}

.fbw.fbw--visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.fbw-bar,
.fbw-mobile {
    color: #ffffff;
    background: rgba(18, 18, 18, 0.78);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.28),
        0 2px 8px rgba(0, 0, 0, 0.18),
        inset 0 1px rgba(255, 255, 255, 0.12);
}

/* ---------- Desktop / tablet bar ---------- */
.fbw-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 24px;
    border-radius: 999px;
}

.fbw-mobile {
    display: none;
}

.fbw-dates {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 2;
    min-width: 0;
    padding: 6px 4px;
    border-radius: 999px;
    cursor: pointer;
}

.fbw-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
}

.fbw-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fbw-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.6);
}

.fbw-value {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    white-space: nowrap;
}

.fbw-arrow {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
}

.fbw-date-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: 0;
    padding: 0;
}

.fbw-divider {
    width: 1px;
    height: 34px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.fbw-guests {
    flex: 1;
    align-items: center;
    padding: 0 12px;
}

.fbw-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fbw-counter-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fbw-counter-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.26);
    transform: scale(1.08);
}

.fbw-counter-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.fbw-counter-btn svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
}

.fbw-counter-value {
    min-width: 18px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.fbw-submit {
    flex-shrink: 0;
    padding: 15px 28px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #141414;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.fbw-submit:hover {
    background: #f1ece4;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.fbw-submit:focus-visible,
.fbw-counter-btn:focus-visible,
.fbw-summary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Keep the date picker above the floating bar */
.flatpickr-calendar.open {
    z-index: 10000;
}

/* ---------- Mobile dock ---------- */
@media (max-width: 768px) {
    .fbw {
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        transform: translateY(110%);
    }

    .fbw.fbw--visible {
        transform: translateY(0);
    }

    .fbw-bar {
        display: none;
    }

    .fbw-mobile {
        display: block;
        border-radius: 20px 20px 0 0;
        border-bottom: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    .fbw-mobile-row {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .fbw-summary {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 4px 0;
        background: transparent;
        border: 0;
        color: #ffffff;
        text-align: left;
        cursor: pointer;
    }

    .fbw-summary-text {
        display: flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fbw-chevron {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        transition: transform 0.25s ease;
    }

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

    .fbw-mobile .fbw-submit {
        padding: 13px 22px;
    }

    .fbw-sheet-inner {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-bottom: 12px;
        margin-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .fbw-sheet-dates {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.07);
        cursor: pointer;
    }

    .fbw-sheet-guests {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fbw,
    .fbw-submit,
    .fbw-counter-btn,
    .fbw-chevron {
        transition: none;
    }
}
