/* ==========================================================
   Booking options shared by the WhatsApp popup and the booking
   page: guests, seating preference, extras, occasion.
   Light theme here; /booking/booking.css re-themes them for the
   dark booking form.
   ========================================================== */

.bdd-label {
    display: block;
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a94a6;
}

/* Inputs and selects */
.bdd-input,
.bdd-select {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    font: inherit;
    font-size: 16px; /* 16px stops iOS zooming in on focus */
    line-height: 1.35;
    color: #0f172a;
    background-color: #f8fafc;
    border: 2px solid #e3e8ef;
    border-radius: 14px;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.bdd-select {
    padding-right: 46px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M0 0h12L6 8z' fill='%238a94a6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px 8px;
}

.bdd-input:hover,
.bdd-select:hover {
    border-color: #d3dbe6;
}

.bdd-input:focus,
.bdd-select:focus {
    border-color: #1e3a8a;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.bdd-input::placeholder {
    color: #9aa4b5;
    opacity: 1;
}

textarea.bdd-input {
    min-height: 76px;
    resize: vertical;
}

input[type="date"].bdd-input {
    min-height: 50px;
}

/* Guests: adults / children / infants steppers */
.bdd-guests {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bdd-guest {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    background: #f8fafc;
    border: 2px solid #e3e8ef;
    border-radius: 14px;
}

.bdd-guest-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #334155;
}

.bdd-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.bdd-step {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #1e3a8a;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bdd-step:hover:not(:disabled) {
    border-color: #1e3a8a;
    background: #eef2fb;
}

.bdd-step:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.bdd-step-value {
    flex: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
}

/* Seating preference: two selectable cards */
.bdd-seats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bdd-seat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 15px 18px;
    font: inherit;
    text-align: left;
    color: #0f172a;
    background: #f8fafc;
    border: 2px solid #e3e8ef;
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.bdd-seat:hover {
    border-color: #c9d3e2;
}

.bdd-seat[aria-pressed="true"] {
    background: #f1f4fa;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

.bdd-seat-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
}

.bdd-seat-note {
    font-size: 14px;
    line-height: 1.3;
    color: #8a94a6;
}

/* Extras: toggle chips with icon + price */
.bdd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bdd-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 15px 8px 13px;
    font: inherit;
    font-size: 15px;
    line-height: 1.2;
    color: #374151;
    background: #ffffff;
    border: 1.5px solid #e3e8ef;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.bdd-chip:hover {
    border-color: #c9d3e2;
}

.bdd-chip-icon {
    flex: none;
    width: 19px;
    height: 19px;
    color: #8a94a6;
}

.bdd-chip-price {
    font-weight: 700;
    color: #6b7280;
}

.bdd-chip[aria-pressed="true"] {
    color: #1e3a8a;
    background: #eef2fb;
    border-color: #1e3a8a;
}

.bdd-chip[aria-pressed="true"] .bdd-chip-icon,
.bdd-chip[aria-pressed="true"] .bdd-chip-price {
    color: #1e3a8a;
}

.bdd-step:focus-visible,
.bdd-seat:focus-visible,
.bdd-chip:focus-visible {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* ==========================================================
   WhatsApp booking popup
   Everything is scoped and spelled out so page stylesheets
   (global a, img, * resets) can't leak in.
   ========================================================== */

html.wab-locked,
html.wab-locked body {
    overflow: hidden !important;
}

.wab-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    color: #0f172a;
    text-align: left;
    letter-spacing: normal;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wab-overlay.is-open {
    opacity: 1;
}

.wab-overlay[hidden],
.wab-overlay [hidden] {
    display: none !important;
}

.wab-overlay *,
.wab-overlay *::before,
.wab-overlay *::after {
    box-sizing: border-box;
}

.wab-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    outline: none;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.22s ease;
}

.wab-overlay.is-open .wab-dialog {
    transform: none;
}

/* Header */
.wab-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #eef1f5;
}

.wab-head-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: #25d366;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.35);
}

.wab-head-icon svg {
    width: 25px;
    height: 25px;
}

.wab-head-text {
    flex: 1;
    min-width: 0;
}

.wab-title {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.wab-desc {
    margin: 4px 0 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.wab-close {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: -4px -8px 0 0;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.wab-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.wab-close svg {
    width: 22px;
    height: 22px;
}

/* Scrolling form body */
.wab-body {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 18px 22px 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.wab-field {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.wab-row {
    display: flex;
    gap: 14px;
}

.wab-row > .wab-field {
    flex: 1 1 0;
    min-width: 0;
}

/* Selected tour */
.wab-tour {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 10px;
    background: #f8fafc;
    border: 2px solid #e3e8ef;
    border-radius: 16px;
}

.wab-tour-img {
    display: block;
    flex: none;
    width: 68px;
    max-width: none;
    height: 54px;
    object-fit: cover;
    background: #e2e8f0;
    border-radius: 11px;
}

.wab-tour-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.wab-tour-name {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.wab-tour-meta {
    font-size: 13.5px;
    line-height: 1.35;
    color: #64748b;
}

.wab-tour-change {
    flex: none;
    margin: 0;
    padding: 7px 14px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e3a8a;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
}

.wab-tour-change:hover {
    border-color: #1e3a8a;
}

/* Footer: total + send */
.wab-foot {
    flex: none;
    padding: 14px 22px 18px;
    background: #ffffff;
    border-top: 1px solid #eef1f5;
}

.wab-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.wab-total-text {
    min-width: 0;
}

.wab-total-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a94a6;
}

.wab-total-note {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: #64748b;
}

.wab-total-amount {
    flex: none;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
    color: #0f172a;
}

.wab-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 14px 18px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff !important;
    text-decoration: none !important;
    background: #15803d;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 10px 22px -8px rgba(21, 128, 61, 0.65);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.wab-send:hover {
    background: #166534;
    transform: translateY(-1px);
}

.wab-send svg {
    flex: none;
    width: 21px;
    height: 21px;
}

.wab-foot-note {
    margin: 10px 0 0;
    padding: 0;
    font-size: 12.5px;
    text-align: center;
    color: #8a94a6;
}

/* After sending */
.wab-done {
    flex: 1 1 auto;
    padding: 34px 26px 28px;
    overflow-y: auto;
    text-align: center;
}

.wab-done-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #15803d;
    background: #dcfce7;
    border-radius: 50%;
}

.wab-done-icon svg {
    width: 30px;
    height: 30px;
}

.wab-done-title {
    margin: 0 0 8px;
    padding: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
}

.wab-done-text {
    max-width: 380px;
    margin: 0 auto 22px;
    padding: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #475569;
}

.wab-back {
    margin: 14px 0 0;
    padding: 6px 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

.wab-close:focus-visible,
.wab-tour-change:focus-visible,
.wab-send:focus-visible,
.wab-back:focus-visible {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* Phones: bottom sheet */
@media (max-width: 560px) {
    .wab-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .wab-dialog {
        max-width: none;
        max-height: 94vh;
        max-height: 94dvh;
        border-radius: 22px 22px 0 0;
        transform: translateY(32px);
    }

    .wab-head {
        padding: 16px 16px 12px;
    }

    .wab-head-icon {
        width: 42px;
        height: 42px;
    }

    .wab-title {
        font-size: 18px;
    }

    .wab-desc {
        font-size: 13px;
    }

    .wab-body {
        padding: 16px 16px 2px;
    }

    .wab-row {
        flex-direction: column;
        gap: 0;
    }

    .wab-foot {
        padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .bdd-guests {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bdd-guest {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px 8px 14px;
    }

    .bdd-stepper {
        width: 132px;
    }

    .bdd-seat {
        padding: 12px 14px;
    }

    .bdd-seat-title {
        font-size: 15px;
    }

    .bdd-seat-note {
        font-size: 13px;
    }

    .bdd-chip {
        font-size: 14px;
        padding: 7px 13px 7px 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wab-overlay,
    .wab-dialog,
    .wab-send,
    .bdd-seat,
    .bdd-chip,
    .bdd-step {
        transition: none;
    }

    .wab-dialog,
    .wab-send:hover {
        transform: none;
    }
}
