/* =====================================================================
   BOOKING FORM + POPUP — classes prefixed "bk-" (see js/booking.js)
   ===================================================================== */

.bk-form {
    --bk-green: #22b35e;
    --bk-green-dark: #1a944c;
    --bk-wa: #25d366;
    font-family: "Poppins", sans-serif;
}

.bk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

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

.bk-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f2937;
}

.bk-field label i { width: 16px; margin-right: 4px; color: var(--bk-green); }
.bk-optional { font-weight: 400; color: #9ca3af; }

.bk-field input,
.bk-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    font-family: inherit;
    font-size: 0.92rem;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bk-field input:focus,
.bk-field textarea:focus {
    border-color: var(--bk-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 179, 94, 0.12);
}

.bk-field textarea { resize: vertical; min-height: 80px; }
.bk-field .is-invalid { border-color: #ef4444; background: #fef2f2; }

.bk-error {
    min-height: 0;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #dc2626;
}

.bk-error:empty { display: none; }

.bk-alert {
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid #fca5a5;
    border-radius: 12px;
    background: #fee2e2;
    font-size: 0.88rem;
    color: #7f1d1d;
}

.bk-submit {
    position: relative;
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--bk-wa), var(--bk-green-dark));
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.bk-submit i { font-size: 1.25rem; }
.bk-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45); }
.bk-submit:disabled { opacity: 0.75; cursor: wait; transform: none; }

@keyframes bkSpin { to { transform: rotate(360deg); } }

.bk-submit.is-busy i {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bkSpin 0.8s linear infinite;
}

.bk-submit.is-busy i::before { content: none; }

.bk-note {
    margin: 10px 0 0 !important;
    font-size: 0.78rem;
    text-align: center;
    color: #6b7280;
}

/* Success state replaces the fields */
.bk-form.is-done > :not([data-bk-success]):not(input) { display: none; }

@keyframes bkPop {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

.bk-success { padding: 10px 0 4px; text-align: center; }

.bk-success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bk-wa), var(--bk-green-dark));
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.4);
    color: #fff;
    font-size: 1.8rem;
    animation: bkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bk-success h3 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 700; color: #111827; }
.bk-success p { margin: 0 0 16px; font-size: 0.92rem; color: #4b5563; }

.bk-wa-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 40px;
    background: var(--bk-wa);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.bk-wa-link:hover { color: #fff; background: var(--bk-green-dark); }

/* ---------- Popup ---------- */
.bk-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bk-overlay[hidden] { display: none; }
.bk-overlay.is-open { opacity: 1; }

.bk-modal {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px 28px 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.bk-overlay.is-open .bk-modal { transform: none; }

.bk-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.3s ease;
}

.bk-close:hover { background: #e5e7eb; transform: rotate(90deg); }

.bk-head { margin-bottom: 18px; padding-right: 40px; }

.bk-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 30px;
    background: #eafaf1;
    color: #1e8449;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.bk-head h2 {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
}

.bk-meta {
    margin: 4px 0 0 !important;
    font-size: 0.9rem;
    color: #6b7280;
}

.bk-meta:empty { display: none; }

@media (max-width: 576px) {
    .bk-grid { grid-template-columns: 1fr; }
    .bk-modal { padding: 22px 18px 18px; border-radius: 18px; }
    .bk-head h2 { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bk-overlay,
    .bk-modal { transition: none; }
    .bk-success-icon { animation: none; }
}
