/* =====================================================================
   Quick Booking (WhatsApp / Email) - popup + inline form
   Used on every page via /js/quick-booking.js. Every field is optional.
   ===================================================================== */

.qb-overlay,
.qb-inline {
    --qb-accent: #e76f51;
    --qb-accent-2: #f4a261;
    --qb-ink: #2c3e50;
    --qb-muted: #66727f;
    --qb-line: #e3e7ec;
    --qb-field: #f8f9fb;
    --qb-wa: #25d366;
    --qb-wa-dark: #128c4b;
    --qb-ok: #2e7d32;
    --qb-err: #c0392b;
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--qb-ink);
}

.qb-overlay[hidden],
.qb-captcha[hidden],
.qb-success[hidden] {
    display: none !important;
}

/* ---------- Popup shell ---------- */
.qb-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 25, 35, 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: qbFade 0.18s ease;
}

.qb-modal {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    animation: qbRise 0.22s ease;
}

html.qb-lock,
html.qb-lock body {
    overflow: hidden !important;
}

.qb-modal:focus {
    outline: none;
}

@keyframes qbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qbRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.qb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.qb-close:hover,
.qb-close:focus-visible {
    background: rgba(255, 255, 255, 0.38);
}

.qb-head {
    padding: 26px 26px 20px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--qb-accent), var(--qb-accent-2));
    border-radius: 18px 18px 0 0;
}

.qb-head h2 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.qb-head p {
    margin: 0 auto 14px;
    max-width: 400px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.qb-chat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--qb-wa-dark) !important;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease;
}

.qb-chat:hover { transform: translateY(-1px); }
.qb-chat i { font-size: 1.15rem; color: var(--qb-wa); }

/* ---------- Form ---------- */
.qb-form {
    padding: 20px 26px 24px;
}

.qb-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--qb-muted);
}

.qb-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--qb-line);
}

.qb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    margin-bottom: 14px;
}

.qb-field { min-width: 0; }
.qb-field--full { grid-column: 1 / -1; }

.qb-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--qb-ink);
}

.qb-field label i {
    width: 15px;
    margin-right: 4px;
    text-align: center;
    color: var(--qb-accent);
}

.qb-form input,
.qb-form select,
.qb-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    font: inherit;
    font-size: 15px;
    color: var(--qb-ink);
    background: var(--qb-field);
    border: 1.5px solid var(--qb-line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.qb-form select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e76f51' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px;
}

.qb-form textarea {
    min-height: 70px;
    resize: vertical;
}

.qb-form input:focus,
.qb-form select:focus,
.qb-form textarea:focus {
    background: #fff;
    border-color: var(--qb-accent);
    box-shadow: 0 0 0 4px rgba(231, 111, 81, 0.13);
}

.qb-form ::placeholder { color: #9aa4ae; }

/* Honeypot (spam trap) - hidden from people */
.qb-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* ---------- Actions ---------- */
.qb-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.qb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.qb-btn i { font-size: 1.15em; }
.qb-btn:hover { transform: translateY(-1px); }
.qb-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }

.qb-btn--wa {
    background: var(--qb-wa);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.qb-btn--wa:hover { background: #1fbd59; }

.qb-btn--mail {
    background: linear-gradient(135deg, var(--qb-accent), var(--qb-accent-2));
    box-shadow: 0 6px 16px rgba(231, 111, 81, 0.32);
}

.qb-btn:focus-visible,
.qb-chat:focus-visible,
.qb-close:focus-visible {
    outline: 3px solid var(--qb-ink);
    outline-offset: 2px;
}

.qb-hint {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    color: var(--qb-muted);
}

.qb-captcha {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    min-height: 65px;
}

.qb-msg {
    margin: 12px 0 0;
    min-height: 1px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.45;
}

.qb-msg.is-ok { color: var(--qb-ok); }
.qb-msg.is-err { color: var(--qb-err); }

.qb-alt {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--qb-line);
    font-size: 13.5px;
    text-align: center;
    color: var(--qb-muted);
}

.qb-alt a {
    color: var(--qb-accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.qb-alt a:hover { text-decoration: underline; }

/* ---------- Success panel ---------- */
.qb-success {
    padding: 34px 26px 30px;
    text-align: center;
}

.qb-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.1);
    color: var(--qb-ok);
    font-size: 28px;
}

.qb-success h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--qb-ink);
}

.qb-success p {
    margin: 0 auto 18px;
    max-width: 380px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--qb-muted);
}

.qb-success .qb-btn {
    width: auto;
    padding: 12px 22px;
    margin: 4px;
}

.qb-link-btn {
    background: none;
    border: 0;
    color: var(--qb-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ---------- Inline variant (booking + contact pages) ---------- */
.qb-inline {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.09);
    overflow: hidden;
}

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

    .qb-modal {
        max-width: none;
        max-height: 94vh;
        max-height: 94dvh;
        border-radius: 18px 18px 0 0;
    }

    .qb-head { padding: 22px 18px 18px; }
    .qb-head h2 { font-size: 1.28rem; padding: 0 30px; }
    .qb-form { padding: 16px 16px 20px; }
    .qb-actions { grid-template-columns: 1fr; }
    .qb-inline { border-radius: 14px; }
}

@media (max-width: 360px) {
    .qb-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .qb-overlay,
    .qb-modal { animation: none; }
    .qb-btn,
    .qb-chat { transition: none; }
}
