/* ==========================================================================
   Soulful Zodiac — Book an Appointment page
   (loaded after css/style.css, only on appointment.html)
   ========================================================================== */
.bk {
  --bk-blue: #3479d0;
  --bk-blue-dark: #2459a3;
  --bk-blue-soft: #eaf2fc;
  --bk-gold: #c99a2e;
  --bk-ink: #1d2433;
  --bk-muted: #5d6677;
  --bk-line: #e1e7f0;
  --bk-radius: 14px;
  color: var(--bk-ink);
}
.bk *, .bk *::before, .bk *::after { box-sizing: border-box; }
.bk [hidden] { display: none !important; }
.bk :focus-visible { outline: 2px solid var(--bk-blue); outline-offset: 3px; }
.bk-link { color: var(--bk-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bk-link:hover { color: var(--bk-blue-dark); }

/* ---------- Alerts ---------- */
.bk-alert {
  margin: 0 0 28px; padding: 14px 18px; border-radius: 10px;
  background: #fdeceb; border: 1px solid #f3c3bf; color: #8c1d18; font-size: .95rem;
}

/* ---------- Steps ---------- */
.bk-step + .bk-step { margin-top: clamp(44px, 6vw, 68px); }
.bk-step-title { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.bk-step-title h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.25; }
.bk-step-no {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  background: var(--bk-blue); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: .95rem;
}
.bk-step-lead { color: var(--bk-muted); margin: 0 0 22px 52px; }
.bk-loading { color: var(--bk-muted); margin: 0; }

/* ---------- Service cards (radio) ---------- */
.bk-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bk-services.is-single { grid-template-columns: minmax(0, 460px); }
.bk-opt { display: block; position: relative; margin: 0; cursor: pointer; }
.bk-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bk-opt-body {
  height: 100%; display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; background: #fff; border: 1.5px solid var(--bk-line); border-radius: var(--bk-radius);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.bk-opt:hover .bk-opt-body { border-color: #a9c6ec; }
.bk-opt-img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: var(--bk-blue-soft); }
.bk-opt-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-opt-text { display: flex; flex-direction: column; min-width: 0; flex: 1; height: 100%; }
.bk-opt-name { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--bk-ink); padding-right: 26px; }
.bk-opt-with {
  align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px;
  background: #fbf3e0; color: #7a5a12; font-size: .75rem; font-weight: 600;
}
.bk-opt-desc { color: var(--bk-muted); font-size: .85rem; line-height: 1.5; margin: 6px 0 10px; flex: 1; }
.bk-opt-price { font-weight: 700; font-size: 1.05rem; color: var(--bk-blue-dark); }
.bk-opt input:checked + .bk-opt-body {
  border-color: var(--bk-blue); background: #f6f9fe; box-shadow: 0 0 0 3px rgba(52, 121, 208, .18);
}
.bk-opt input:checked + .bk-opt-body::after {
  content: "✓"; position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bk-blue); color: #fff; font-size: .8rem; font-weight: 700; line-height: 24px; text-align: center;
}
.bk-opt input:focus-visible + .bk-opt-body { outline: 2px solid var(--bk-blue); outline-offset: 3px; }

/* ---------- Step 2 + 3 ---------- */
.bk-layout { display: grid; grid-template-columns: minmax(290px, 370px) 1fr; gap: clamp(24px, 4vw, 40px); align-items: start; }
.bk-layout > * { min-width: 0; }
.bk-card {
  margin-top: 20px; padding: clamp(18px, 3vw, 28px);
  background: #fff; border: 1px solid var(--bk-line); border-radius: 18px;
}
.bk-card h3 { font-size: 1.05rem; margin: 0 0 12px; }
.bk-slot-title { margin-top: 22px !important; }

/* Calendar */
#bkCalendar .flatpickr-calendar.inline { box-shadow: none; margin: 0 auto; width: 100%; max-width: 320px; border: 0; font-family: inherit; }
#bkCalendar .flatpickr-innerContainer, #bkCalendar .flatpickr-rContainer,
#bkCalendar .flatpickr-days, #bkCalendar .dayContainer { width: 100%; min-width: 0; max-width: none; }
#bkCalendar .flatpickr-day { max-width: none; border-radius: 10px; }
#bkCalendar .flatpickr-day.today { border-color: var(--bk-blue); }
#bkCalendar .flatpickr-day.selected,
#bkCalendar .flatpickr-day.selected:hover { background: var(--bk-blue); border-color: var(--bk-blue); color: #fff; }
#bkCalendar .flatpickr-current-month { font-size: 1.05rem; font-weight: 600; }

/* Slots */
.bk-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bk-slot {
  padding: 10px 6px; border: 1.5px solid var(--bk-line); border-radius: 10px; background: #fff;
  color: var(--bk-ink); font-family: inherit; font-size: .85rem; font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.bk-slot:hover { border-color: var(--bk-blue); }
.bk-slot.is-selected { background: var(--bk-blue); border-color: var(--bk-blue); color: #fff; }
.bk-slot:disabled { background: #f3f5f9; color: #9aa3b2; text-decoration: line-through; cursor: not-allowed; }
.bk-slot-empty { grid-column: 1 / -1; margin: 0; color: var(--bk-muted); font-size: .9rem; }

/* Summary */
.bk-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 22px; padding: 14px 18px; border-radius: 12px;
  border: 1.5px dashed #a9c6ec; background: #f6f9fe;
}
.bk-summary.is-empty { border-color: var(--bk-line); background: #f8f9fb; }
.bk-sum-label { display: block; font-size: .78rem; color: var(--bk-muted); }
.bk-sum-value { font-weight: 600; color: var(--bk-ink); }
.bk-summary.is-empty .bk-sum-value { font-weight: 400; color: var(--bk-muted); }
.bk-summary a { color: var(--bk-blue); font-weight: 600; font-size: .9rem; }

/* Fields */
.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.bk-field { display: flex; flex-direction: column; gap: 6px; }
.bk-full { grid-column: 1 / -1; }
.bk-field label { font-size: .88rem; font-weight: 600; color: var(--bk-ink); margin: 0; }
.bk-req { color: #c0392b; }
.bk-opt-label { font-weight: 400; color: var(--bk-muted); }
.bk-field input, .bk-field select, .bk-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--bk-line); border-radius: 10px;
  background: #fbfcfe; font: inherit; font-size: .95rem; color: var(--bk-ink);
  transition: border-color .2s, background-color .2s;
}
.bk-field textarea { resize: vertical; min-height: 110px; }
.bk-field input:focus, .bk-field select:focus, .bk-field textarea:focus { outline: none; border-color: var(--bk-blue); background: #fff; }
.bk-field.has-error input, .bk-field.has-error select, .bk-field.has-error textarea { border-color: #c0392b; }
.bk-error { color: #c0392b; font-size: .82rem; margin: 4px 0 0; }
.bk-error:empty { display: none; }

.bk-submit { width: 100%; margin-top: 22px; justify-content: center; }
.bk-submit:disabled { opacity: .7; cursor: wait; }
.bk-note { margin: 10px 0 0; text-align: center; font-size: .82rem; color: var(--bk-muted); }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Success ---------- */
.bk-success {
  max-width: 660px; margin: 0 auto; text-align: center;
  padding: clamp(26px, 5vw, 46px); background: #fff;
  border: 1px solid var(--bk-line); border-top: 4px solid var(--bk-blue); border-radius: 18px;
}
.bk-success:focus { outline: none; }
.bk-success-mark {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--bk-blue); color: #fff; display: grid; place-items: center; font-size: 1.7rem; font-weight: 700;
}
.bk-success h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 10px; }
.bk-success > p { color: var(--bk-muted); }
.bk-success-list { margin: 22px 0; text-align: left; border: 1px solid var(--bk-line); border-radius: 12px; overflow: hidden; }
.bk-success-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 18px; }
.bk-success-list > div + div { border-top: 1px solid var(--bk-line); }
.bk-success-list dt { font-weight: 500; color: var(--bk-muted); }
.bk-success-list dd { margin: 0; font-weight: 600; text-align: right; }
.bk-success-actions { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 22px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bk-services { grid-template-columns: repeat(2, 1fr); }
  .bk-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bk-services { grid-template-columns: 1fr; }
  .bk-grid { grid-template-columns: 1fr; }
  .bk-step-lead { margin-left: 0; }
  .bk-opt-img { width: 60px; height: 60px; }
  .bk-success-list > div { flex-direction: column; gap: 2px; }
  .bk-success-list dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .bk * { transition: none !important; }
}
