/* ============================================================
   KAIROS HALO — public booking flow (book.html)
   ------------------------------------------------------------
   Only the pieces the shared design system (kairos-halo.css) doesn't
   already provide: appointment-type cards, the date calendar, the
   time-slot grid and the confirmation summary. Everything else reuses
   .kh-intake-wrap / .kh-progress / .kh-opt / .kh-success. Tuned to be
   excellent around 390px: large tap targets, single-column forms.
   ============================================================ */

.bk-wrap { max-width: 640px; margin: 0 auto; }

/* Step visibility */
.bk-step { display: none; }
.bk-step.is-active { display: block; animation: bkFade 0.25s ease; }
@keyframes bkFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bk-lead {
  color: var(--h-muted); font-size: 0.94rem; line-height: 1.55;
  margin: -6px 0 20px;
}

/* ---- Loading + inline status ---- */
.bk-loading {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  color: var(--h-muted); font-family: var(--disp); letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.76rem; padding: 34px 0;
}
.bk-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(217, 164, 65, 0.25); border-top-color: var(--h-gold-bright);
  animation: bkSpin 0.7s linear infinite;
}
@keyframes bkSpin { to { transform: rotate(360deg); } }

.bk-alert {
  border: 1px solid rgba(255, 139, 127, 0.5); background: rgba(255, 139, 127, 0.08);
  color: #ffb3a8; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px;
  font-size: 0.9rem; line-height: 1.5;
}
.bk-alert--info {
  border-color: var(--h-line-strong); background: rgba(217, 164, 65, 0.07); color: var(--h-text);
}
.bk-empty { color: var(--h-muted); font-size: 0.92rem; padding: 20px 0; text-align: center; }

/* ---- Step 1: appointment-type cards ---- */
.bk-types { display: grid; gap: 12px; }
.bk-type {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--h-panel); color: var(--h-text);
  border: 1px solid var(--h-line-strong); border-radius: 10px;
  padding: 18px 18px; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.bk-type:hover { border-color: var(--h-gold); transform: translateY(-2px); }
.bk-type:focus-visible { outline: none; border-color: var(--h-gold-bright); box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.2); }
.bk-type.is-selected {
  border-color: var(--h-gold-bright);
  box-shadow: 0 0 0 1px var(--h-gold-bright), 0 0 22px rgba(255, 207, 92, 0.18);
  background: linear-gradient(180deg, rgba(217, 164, 65, 0.12), rgba(9, 7, 5, 0.4));
}
.bk-type-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  color: var(--h-text); margin-bottom: 5px;
}
.bk-type.is-selected .bk-type-name { color: var(--h-gold-bright); }
.bk-type-desc { color: var(--h-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 12px; }
.bk-type-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--disp); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.68rem; color: var(--h-gold); background: rgba(217, 164, 65, 0.1);
  border: 1px solid var(--h-line); border-radius: 999px; padding: 5px 11px;
}
.bk-chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ---- Step 2: calendar ---- */
.bk-cal { border: 1px solid var(--h-line); border-radius: 12px; padding: 16px; background: rgba(9, 7, 5, 0.4); }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bk-cal-title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--h-text); }
.bk-cal-nav {
  width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
  background: var(--h-panel); border: 1px solid var(--h-line-strong); color: var(--h-gold);
  font-size: 1.1rem; display: grid; place-items: center; transition: border-color 0.15s, color 0.15s;
}
.bk-cal-nav:hover:not(:disabled) { border-color: var(--h-gold); color: var(--h-gold-bright); }
.bk-cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.bk-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.bk-cal-dow span {
  text-align: center; font-family: var(--disp); text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.64rem; color: var(--h-muted-dim);
}
.bk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bk-day {
  aspect-ratio: 1 / 1; min-height: 42px; border-radius: 8px; cursor: pointer;
  background: var(--h-panel); border: 1px solid var(--h-line);
  color: var(--h-text); font-family: var(--sans); font-size: 0.92rem;
  display: grid; place-items: center; position: relative;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.bk-day:hover:not(:disabled) { border-color: var(--h-gold); color: var(--h-gold-bright); }
.bk-day:focus-visible { outline: none; border-color: var(--h-gold-bright); box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.2); }
.bk-day.is-empty { background: none; border-color: transparent; cursor: default; }
.bk-day:disabled:not(.is-empty) { color: var(--h-muted-dim); opacity: 0.4; cursor: not-allowed; background: rgba(0, 0, 0, 0.25); }
.bk-day.is-available::after {
  content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--h-gold);
}
.bk-day.is-selected {
  border-color: var(--h-gold-bright); color: #14100a; font-weight: 700;
  background: linear-gradient(180deg, var(--h-gold-bright), var(--h-gold-deep));
}
.bk-day.is-selected::after { background: #14100a; }
.bk-cal-legend { margin-top: 12px; display: flex; gap: 16px; font-size: 0.76rem; color: var(--h-muted); }
.bk-cal-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--h-gold); margin-right: 6px; vertical-align: middle; }

/* ---- Step 3: time slots ---- */
.bk-slot-date { color: var(--h-gold); font-family: var(--disp); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.74rem; margin-bottom: 14px; }
.bk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bk-slot {
  min-height: 48px; cursor: pointer; border-radius: 8px;
  background: var(--h-panel); border: 1px solid var(--h-line-strong);
  color: var(--h-text); font-family: var(--sans); font-size: 0.92rem;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.bk-slot:hover { border-color: var(--h-gold); color: var(--h-gold-bright); }
.bk-slot:focus-visible { outline: none; border-color: var(--h-gold-bright); box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.2); }
.bk-slot.is-selected {
  border-color: var(--h-gold-bright); color: #14100a; font-weight: 700;
  background: linear-gradient(180deg, var(--h-gold-bright), var(--h-gold-deep));
}

/* ---- Confirmation summary ---- */
.bk-summary {
  border: 1px solid var(--h-line); border-radius: 12px; overflow: hidden;
  margin-bottom: 22px; background: rgba(9, 7, 5, 0.4);
}
.bk-summary-row {
  display: grid; grid-template-columns: 34% 1fr; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--h-line); align-items: baseline;
}
.bk-summary-row:last-child { border-bottom: none; }
.bk-summary-row dt {
  font-family: var(--disp); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.68rem; color: var(--h-muted);
}
.bk-summary-row dd { color: var(--h-text); font-size: 0.96rem; line-height: 1.45; }
.bk-summary-row dd strong { color: var(--h-gold-bright); font-weight: 600; }

/* ---- What happens next ---- */
.bk-next-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 12px; text-align: left; max-width: 440px; margin-inline: auto; }
.bk-next-list li { display: flex; gap: 12px; color: var(--h-muted); font-size: 0.92rem; line-height: 1.5; }
.bk-next-list li span {
  flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--h-line-strong); color: var(--h-gold-bright);
  font-family: var(--disp); font-size: 0.8rem; font-weight: 600;
}

/* ---- Step navigation buttons ---- */
.bk-actions { display: flex; gap: 12px; margin-top: 24px; }
.bk-actions .h-btn { flex: 1; justify-content: center; }
.bk-actions .bk-btn-back {
  flex: 0 0 auto; background: transparent; border-color: var(--h-line-strong); color: var(--h-muted);
}
.bk-actions .bk-btn-back:hover { color: var(--h-gold); border-color: var(--h-gold); }
.bk-status { text-align: center; margin-top: 14px; font-size: 0.88rem; min-height: 1em; color: var(--h-gold); }
.bk-status.err { color: #ff8b7f; }

@media (max-width: 420px) {
  .bk-slots { grid-template-columns: repeat(2, 1fr); }
  .bk-cal { padding: 12px; }
  .bk-day { min-height: 40px; font-size: 0.88rem; }
  .bk-summary-row { grid-template-columns: 1fr; gap: 3px; padding: 12px 14px; }
  .bk-actions { flex-direction: column-reverse; }
  .bk-actions .h-btn, .bk-actions .bk-btn-back { width: 100%; }
}
