/* =========================================================================
   KAAYA GLOW - MODERN BOOKING UI (layer over bk-booking.css / kg-schedule.css)
   Loaded after the originals on book-appointment.php, client-agreement.php
   (same card shell), booking-confirmation.php and the Book Now popup.
   Only restyles - markup/behaviour live in the PHP/JS files.
   ========================================================================= */
:root {
    --bm-green-900: #0b2b26;
    --bm-green-700: #235347;
    --bm-green-500: #3f7d68;
    --bm-sage: #8eb69b;
    --bm-mint: #eaf6ed;
    --bm-mint-2: #f5fbf6;
    --bm-line: #d5e9db;
    --bm-ink: #10302a;
    --bm-muted: #5a7a70;
    --bm-danger: #b3413c;
    --bm-danger-bg: #fdf1f0;
    --bm-radius: 14px;
    --bm-shadow: 0 30px 70px -28px rgba(5, 31, 32, .45);
}

/* ---------- Page shell ---------- */
.bk-section { padding: 120px 0 130px; }
.bk-section-overlay {
    background:
        radial-gradient(900px 520px at 12% 0%, rgba(142, 182, 155, .28), transparent 60%),
        linear-gradient(180deg, rgba(5, 31, 32, .86) 0%, rgba(5, 31, 32, .66) 50%, rgba(5, 31, 32, .88) 100%);
}
.bk-card {
    border-radius: 28px;
    grid-template-columns: .74fr 1.26fr;
    box-shadow: var(--bm-shadow);
    background: #fff;
}
.bk-info { background: linear-gradient(180deg, var(--bm-mint) 0%, #dcefe1 100%); }
.bk-visual { min-height: 340px; border-radius: 0; }
.bk-visual-shade { background: linear-gradient(180deg, rgba(5,31,32,.18) 0%, rgba(5,31,32,.12) 35%, rgba(5,31,32,.9) 100%); }
.bk-lotus-badge { border-radius: 16px; width: 48px; height: 48px; background: rgba(255,255,255,.18); }
.bk-info-heading.bk-info-heading--book { font-size: 40px; }

/* steps become a tidy vertical timeline on the info panel */
.bk-info-body { padding: 26px 28px 30px; gap: 20px; }
.bk-steps { grid-template-columns: 1fr; gap: 10px; counter-reset: bkstep; }
.bk-step {
    flex-direction: row; text-align: left; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: 16px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(35,83,71,.1);
    box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 18px -14px rgba(5,31,32,.4);
    transition: transform .3s ease, box-shadow .3s ease;
}
.bk-step:hover { transform: translateX(3px); }
.bk-step-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--bm-green-700); color: #fff; flex: 0 0 auto; }
.bk-step-icon svg { width: 17px; height: 17px; }
.bk-step-text strong { font-size: 13.5px; }
.bk-step-text small { font-size: 12px; }
.bk-login-notice { border-radius: 16px; background: rgba(255,255,255,.7); }

/* ---------- Form column ---------- */
.bk-form-col { padding: 46px 52px 50px; background: #fff; }
.bk-form-head { margin-bottom: 26px; }
.bk-form-eyebrow {
    display: inline-block; font: 700 11px/1 var(--kg-body-font); letter-spacing: .16em; text-transform: uppercase;
    color: var(--bm-green-700); background: var(--bm-mint); padding: 7px 12px; border-radius: 999px;
}
.bk-form-title {
    font-family: var(--kg-heading-font); font-weight: 700; font-size: 36px; line-height: 1.1;
    color: var(--bm-green-900); margin: 14px 0 6px;
}
.bk-form-sub { margin: 0; font-size: 13px; color: var(--bm-muted); }
.bk-required { color: var(--bm-danger) !important; font-weight: 700; }

/* numbered section headers */
.bk-form { counter-reset: bkSec; }
.bk-form .bk-form-section-label {
    counter-increment: bkSec;
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; letter-spacing: .12em; color: var(--bm-green-900);
    border-top: 0; padding-top: 6px; margin: 30px 0 18px;
}
.bk-form .bk-form-section-label::before {
    content: counter(bkSec);
    width: 26px; height: 26px; border-radius: 9px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bm-green-700); color: #fff; font: 700 12px/1 var(--kg-body-font); letter-spacing: 0;
}
.bk-form .bk-form-section-label::after { content: ''; flex: 1; height: 1px; background: var(--bm-line); }
.bk-form .bk-form-section-label:first-of-type { margin-top: 0; padding-top: 0; }
.bk-form .kg-schedule .bk-form-section-label { margin-top: 30px; }

/* ---------- Fields ---------- */
.bk-field { margin-bottom: 20px; gap: 7px; }
.bk-field label, .bk-form .kg-booking-field label { font-size: 12.5px; font-weight: 600; color: var(--bm-ink); }
.bk-field input[type="text"], .bk-field input[type="tel"], .bk-field input[type="email"],
.bk-field textarea, .bk-field select.kg-schedule-select, .bk-form .kg-select-trigger {
    min-height: 52px;
    background-color: var(--bm-mint-2);
    border: 1.5px solid var(--bm-line);
    border-radius: var(--bm-radius);
    color: var(--bm-ink);
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.bk-field textarea { min-height: 104px; padding-top: 14px; }
.bk-field input:hover, .bk-field textarea:hover, .bk-field select.kg-schedule-select:hover, .bk-form .kg-select-trigger:hover { border-color: var(--bm-sage); }
.bk-field input:focus, .bk-field textarea:focus, .bk-field select.kg-schedule-select:focus,
.bk-form .kg-select-trigger.is-open, .bk-form .kg-select-trigger:focus-visible {
    background-color: #fff; border-color: var(--bm-green-500); box-shadow: 0 0 0 4px rgba(63, 125, 104, .16); outline: none;
}
.bk-form .kg-select-panel { border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(5,31,32,.4); border: 1px solid var(--bm-line); }

/* field-level error state */
.bk-field-msg { display: none; margin: 0; font: 600 12.5px/1.4 var(--kg-body-font); color: var(--bm-danger); }
.bk-field.has-error .bk-field-msg { display: block; }
.bk-field.has-error input, .bk-field.has-error select.kg-schedule-select, .bk-field.has-error textarea {
    border-color: var(--bm-danger); background-color: var(--bm-danger-bg);
}
.bk-field.has-error input:focus, .bk-field.has-error select.kg-schedule-select:focus { box-shadow: 0 0 0 4px rgba(179, 65, 60, .15); }
.bk-form .kg-booking-field.has-error .kg-select-trigger { border-color: var(--bm-danger); background-color: var(--bm-danger-bg); }
.bk-field.has-error .kg-cal { border-color: var(--bm-danger); }
.kg-field-error, .kg-schedule [data-kg-date-error] { color: var(--bm-danger); font: 600 12.5px/1.4 var(--kg-body-font); margin: 4px 0 0; }

/* ---------- Alerts ---------- */
.bk-alert { align-items: flex-start; border-radius: 16px; padding: 16px 18px; }
.bk-alert[hidden] { display: none; }
.bk-alert svg { margin-top: 2px; }
.bk-alert-body { flex: 1; min-width: 0; }
.bk-alert-list { margin: 8px 0 0; padding-left: 18px; }
.bk-alert-list li { margin: 3px 0; }
.bk-alert-list a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.bk-alert-error { background: var(--bm-danger-bg); border-color: rgba(179,65,60,.3); color: #8f3232; }
.bk-alert-success { background: var(--bm-mint); color: var(--bm-green-700); border: 1px solid rgba(35,83,71,.25); }

/* ---------- Consent status card ---------- */
.bk-consent {
    display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
    padding: 16px 18px; margin: 0 0 24px; border-radius: 18px;
    background: var(--bm-mint); border: 1px solid var(--bm-line);
}
.bk-consent-icon { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--bm-green-700); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.bk-consent-icon svg { width: 20px; height: 20px; }
.bk-consent-body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bk-consent-title { font: 700 13.5px/1.3 var(--kg-body-font); color: var(--bm-ink); }
.bk-consent-meta { font: 400 12.5px/1.5 var(--kg-body-font); color: var(--bm-muted); }
.bk-consent-meta b { color: var(--bm-ink); }
.bk-consent-reasons { margin: 6px 0 0; padding-left: 18px; font: 500 12.5px/1.5 var(--kg-body-font); color: #7a4a12; }
.bk-consent-hint { font: 600 12.5px/1.5 var(--kg-body-font); color: #7a4a12; margin-top: 2px; }
.bk-consent--changed { background: #fff8ea; border-color: #f0d9a8; }
.bk-consent--changed .bk-consent-icon { background: #fdeccb; color: #9a5b00; }
.bk-consent-btn {
    align-self: center; white-space: nowrap; text-decoration: none;
    padding: 10px 18px; border-radius: 999px; font: 700 12.5px/1 var(--kg-body-font); letter-spacing: .03em;
    background: var(--bm-green-700); color: #fff; transition: background .25s ease, transform .25s ease;
}
.bk-consent-btn:hover { background: var(--bm-green-900); transform: translateY(-1px); }
.bk-consent-btn--ghost { background: #fff; color: var(--bm-green-700); border: 1.5px solid var(--bm-line); }
.bk-consent-btn--ghost:hover { background: var(--bm-mint-2); color: var(--bm-green-900); }

/* ---------- Provider caption, calendar, time slot ---------- */
.kg-schedule-hint { font: 400 12px/1.5 var(--kg-body-font); color: var(--bm-muted); }
.kg-cal {
    max-width: 440px; padding: 18px 18px 14px; border-radius: 20px;
    background: #fff; border: 1.5px solid var(--bm-line);
    box-shadow: 0 14px 32px -24px rgba(5,31,32,.4);
}
.kg-cal-head { margin-bottom: 12px; }
.kg-cal-title { font: 700 16px/1 var(--kg-heading-font); font-size: 19px; color: var(--bm-green-900); letter-spacing: .01em; }
.kg-cal-nav { width: 36px; height: 36px; background: var(--bm-mint-2); border-color: var(--bm-line); color: var(--bm-green-700); }
.kg-cal-nav:hover:not(:disabled) { background: var(--bm-mint); border-color: var(--bm-sage); }
.kg-cal-dow, .kg-cal-grid { gap: 6px; }
.kg-cal-dow span { color: var(--bm-muted); }
.kg-cal-day { border-radius: 50%; min-height: 40px; border-width: 0; position: relative; }
/* AVAILABLE: clearly highlighted */
.kg-cal-day--avail {
    background: #d7efdf; color: var(--bm-green-900); font-weight: 700;
    box-shadow: inset 0 0 0 1.5px rgba(63,125,104,.55);
}
.kg-cal-day--avail::after {
    content: ''; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 50%; background: var(--bm-green-500);
}
.kg-cal-day--avail:hover { background: #bfe5cc; transform: translateY(-1px); }
/* UNAVAILABLE: greyed out and inert */
.kg-cal-day--off {
    background: #f1f2f2; color: #b4b9b8; font-weight: 500; box-shadow: none;
    text-decoration: none; cursor: not-allowed; opacity: .85;
}
.kg-cal-day--today { box-shadow: inset 0 0 0 1.5px var(--bm-green-700); }
.kg-cal-day--sel, .kg-cal-day--sel:hover {
    background: linear-gradient(145deg, var(--bm-green-500), var(--bm-green-700)); color: #fff;
    box-shadow: 0 8px 16px -8px rgba(35,83,71,.7);
}
.kg-cal-day--sel::after { background: #fff; }
.kg-cal-legend { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--bm-line); }
.kg-cal-dot { border-radius: 50%; }
.kg-cal-dot--avail { background: #d7efdf; border: 1.5px solid rgba(63,125,104,.6); }
.kg-cal-dot--off { background: #f1f2f2; border: 1px solid #d9dcdb; }
.kg-cal-dot--sel { background: var(--bm-green-700); }
.kg-cal-picked { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: var(--bm-mint-2); font-size: 13px; }
.kg-cal-picked.is-set { background: var(--bm-mint); color: var(--bm-green-900); }

/* ---------- Notes, disclaimer, submit ---------- */
.bk-booking-note { border-radius: 12px; border-left-width: 3px; background: var(--bm-mint-2); }
.bk-disclaimer { border-radius: 16px; }
.bk-submit {
    min-height: 56px; border-radius: 16px; font-size: 13.5px; letter-spacing: .06em;
    background: linear-gradient(135deg, var(--bm-green-700) 0%, var(--bm-green-900) 100%);
    box-shadow: 0 18px 34px -18px rgba(11,43,38,.8);
}
.bk-submit:hover { background: linear-gradient(135deg, var(--bm-green-500) 0%, var(--bm-green-700) 100%); box-shadow: 0 22px 38px -16px rgba(35,83,71,.75); }
.bk-submit:focus-visible { outline: 3px solid rgba(63,125,104,.4); outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .bk-section { padding: 76px 0 90px; }
    .bk-card { border-radius: 24px; grid-template-columns: 1fr; }
    .bk-steps { grid-template-columns: repeat(3, 1fr); }
    .bk-step { flex-direction: column; text-align: center; padding: 14px 8px; }
    .bk-form-col { padding: 34px 28px 38px; }
    .bk-form-title { font-size: 30px; }
}
@media (max-width: 560px) {
    .bk-section { padding: 56px 0 70px; }
    .bk-card { border-radius: 20px; }
    .bk-form-col { padding: 28px 18px 32px; }
    .bk-form-title { font-size: 27px; }
    .bk-steps { grid-template-columns: 1fr; }
    .bk-step { flex-direction: row; text-align: left; padding: 11px 14px; }
    .bk-consent-btn { width: 100%; text-align: center; }
    .kg-cal { padding: 14px 10px 12px; }
    .kg-cal-dow, .kg-cal-grid { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .bk-step, .bk-consent-btn, .kg-cal-day { transition: none !important; }
}

/* Round 20: week strip / time-slot chips use the modern palette + rounding */
.kg-wk-day--sel, .kg-wk-day--sel:hover, .kg-slot--sel, .kg-slot--sel:hover { background: linear-gradient(145deg, var(--bm-green-500, #3f7d68), var(--bm-green-700, #235347)); border-color: transparent; color: #fff; }
.kg-week-days { border-radius: 14px; border-color: var(--bm-line, #d6d6d6); }
.kg-wk-day { border-right-color: var(--bm-line, #d6d6d6); }
.kg-slot { border-radius: 999px; }
.kg-slot--ok { background: #d7efdf; border-color: rgba(63,125,104,.4); color: var(--bm-green-900, #123); }
.kg-slot--ok:hover { background: #bfe5cc; }
.kg-slot--off { background: #f1f2f2; color: #b4b9b8; border-color: #e5e7e7; }
.kg-slots-msg { background: var(--bm-mint-2, #f4f4f1); border-radius: 12px; }
