/* =========================================================
   Sugu Driving School — Booking form
   booking.css  |  loaded only where partials/booking_widget.php is included
   =========================================================

   Built on the design tokens in style.css (--red, --blue, --grey-*,
   --radius-*, --shadow-*, --transition, --font-head). Nothing here needs
   !important: the previous version fought a third-party calendar's own
   stylesheet, and the calendar is now ours.

   Everything is namespaced under .bk- so it can sit on the homepage next to
   the rest of the page without leaking.
   ========================================================= */

.bk {
  --bk-gap: 1.25rem;
  --bk-line: var(--grey-300);
  --bk-ok: #00875a;
  --bk-ok-light: #e3f5ed;

  max-width: 1180px;
  margin: 0 auto;
  font-family: var(--font-body);
  color: var(--text);
}

.bk *:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}


/* ─────────────────────────────────────────
   1. STEPPER
   ───────────────────────────────────────── */
.bk-stepper {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0.25rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}
.bk-stepper::-webkit-scrollbar { display: none; }

.bk-stepper li { flex: 1 0 auto; }

.bk-stepper button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--grey-500);
  cursor: default;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
/* Only completed steps are navigable — you can go back, not skip forward. */
.bk-stepper li.is-done button { cursor: pointer; color: var(--grey-700); }
.bk-stepper li.is-done button:hover { background: var(--grey-100); }

.bk-stepper li.is-current button {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(211,10,17,.3);
}

.bk-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--grey-200);
  font-size: 0.75rem;
  line-height: 1;
}
.bk-stepper li.is-current .bk-step-num { background: rgba(255,255,255,.25); color: var(--white); }
.bk-stepper li.is-done .bk-step-num { background: var(--bk-ok-light); color: var(--bk-ok); }
.bk-stepper li.is-done .bk-step-num::before {
  content: 'check';
  font-family: 'Material Symbols Outlined';
  font-size: 1rem;
}
.bk-stepper li.is-done .bk-step-num span { display: none; }

/* Below tablet the labels are noise — the numbers carry it. */
@media (max-width: 700px) {
  .bk-stepper .bk-step-label { display: none; }
  .bk-stepper button { padding: 0.6rem 0.4rem; }
}


/* ─────────────────────────────────────────
   2. LAYOUT — main panel + summary rail
   ───────────────────────────────────────── */
.bk-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--bk-gap);
  align-items: start;
}
@media (min-width: 960px) {
  .bk-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}
/* Grid items refuse to shrink past their min-content by default, which lets one
   wide descendant (the calendar) push the whole panel past the viewport. */
.bk-layout > * { min-width: 0; }

.bk-panel {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.15rem;
}
@media (min-width: 480px) { .bk-panel { padding: 1.5rem; } }
@media (min-width: 700px) { .bk-panel { padding: 2.25rem; } }

.bk-step { display: none; }
.bk-step.is-active { display: block; animation: bk-in .35s cubic-bezier(.4,0,.2,1); }
@keyframes bk-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.bk-step-head { margin-bottom: 1.5rem; }
.bk-step-head h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0;
}
.bk-step-head p {
  margin: 0.4rem 0 0;
  color: var(--grey-500);
  font-size: 0.95rem;
}

.bk-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-200);
}
.bk-nav .bk-spacer { margin-right: auto; }
@media (max-width: 480px) {
  .bk-nav { flex-direction: column-reverse; }
  .bk-nav .btn { width: 100%; }
}


/* ─────────────────────────────────────────
   3. STEP 1 — filters + service cards
   ───────────────────────────────────────── */
.bk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.bk-chip {
  padding: 0.45rem 1rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-full);
  background: var(--white);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--grey-700);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-chip:hover { border-color: var(--blue); color: var(--blue); }
.bk-chip[aria-selected="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.bk-services {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .bk-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bk-service {
  position: relative;
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.bk-service:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.bk-service:has(input:checked) {
  border-color: var(--red);
  background: linear-gradient(0deg, var(--red-light) 0%, var(--white) 65%);
  box-shadow: 0 6px 22px rgba(211,10,17,.16);
}
/* Fallback for browsers without :has() — JS also sets this class. */
.bk-service.is-selected {
  border-color: var(--red);
  background: linear-gradient(0deg, var(--red-light) 0%, var(--white) 65%);
  box-shadow: 0 6px 22px rgba(211,10,17,.16);
}
.bk-service input { position: absolute; opacity: 0; pointer-events: none; }

.bk-service-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--grey-100);
}
.bk-service-icon .material-symbols-outlined { font-size: 1.5rem; }

.bk-service-body { flex: 1; min-width: 0; }
.bk-service-body h3 {
  font-family: var(--font-head);
  font-size: 0.98rem;
  line-height: 1.3;
  margin: 0 0 0.2rem;
}
.bk-service-body p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--grey-500);
  line-height: 1.45;
}

.bk-service-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.55rem;
}
.bk-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--red);
}
.bk-price small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--grey-500);
}
.bk-deposit-hint {
  width: 100%;
  font-size: 0.75rem;
  color: var(--grey-500);
}

.bk-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--grey-100);
  color: var(--grey-700);
  font-size: 0.7rem;
  font-weight: 600;
}
.bk-tag .material-symbols-outlined { font-size: 0.85rem; }
.bk-tag-night { background: #1f2a44; color: #cfe1ff; }

.bk-service-check {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  color: var(--red);
  opacity: 0;
  transform: scale(.6);
  transition: all var(--transition);
}
.bk-service:has(input:checked) .bk-service-check,
.bk-service.is-selected .bk-service-check { opacity: 1; transform: none; }

/* Packages are quote-only: they look different and lead to the contact form. */
.bk-package {
  border-style: dashed;
  cursor: default;
}
.bk-package:hover { border-color: var(--grey-400); transform: none; box-shadow: none; }
.bk-package .bk-enquire {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-dark);
  text-decoration: none;
}
.bk-package .bk-enquire:hover { text-decoration: underline; }
.bk-package .bk-enquire .material-symbols-outlined { font-size: 1rem; }

.bk-package-note {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.85rem;
}


/* ─────────────────────────────────────────
   4. FORM FIELDS
   ───────────────────────────────────────── */
.bk-fields { display: grid; gap: 1.1rem; }
@media (min-width: 640px) {
  .bk-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bk-field label,
.bk-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
}
.bk-field .bk-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--grey-500);
}

.bk-field input[type="text"],
.bk-field input[type="email"],
.bk-field input[type="tel"],
.bk-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--grey-300);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.bk-field input:hover, .bk-field textarea:hover { border-color: var(--grey-400); }
.bk-field input:focus, .bk-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-light);
}
.bk-field textarea { resize: vertical; min-height: 5.5rem; }

.bk-field.has-error input,
.bk-field.has-error textarea { border-color: var(--red); }
.bk-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
}
.bk-field.has-error .bk-error { display: block; }

/* The honeypot. Off-screen rather than display:none — some bots skip
   display:none fields, and none of them find this one either way. */
.bk-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bk-check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--grey-100);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.5;
}
.bk-check input { margin-top: 0.15rem; width: 1.05rem; height: 1.05rem; accent-color: var(--red); flex: 0 0 auto; }
.bk-check.has-error { border-color: var(--red); background: var(--red-light); }


/* ─────────────────────────────────────────
   5. STEP 2 — calendar + slots
   ───────────────────────────────────────── */
.bk-datetime { display: grid; gap: 1.75rem; }
@media (min-width: 880px) {
  .bk-datetime { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
}

.bk-cal {
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--white);
}
.bk-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.bk-cal-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
}
.bk-cal-nav {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--grey-100);
  color: var(--grey-700);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-cal-nav:hover:not(:disabled) { background: var(--blue); color: var(--white); }
.bk-cal-nav:disabled { opacity: .35; cursor: not-allowed; }

.bk-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
@media (min-width: 420px) { .bk-cal-grid { gap: 5px; } }
.bk-cal-dow {
  text-align: center;
  padding: 0.35rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bk-day {
  position: relative;
  /* aspect-ratio alone. Pairing it with a min-height gave every cell an
     intrinsic MIN-WIDTH too, and seven of those set a 293px floor that pushed
     the whole booking panel wider than a phone screen. */
  aspect-ratio: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--grey-100);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-day:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--white);
  color: var(--blue-dark);
  transform: translateY(-2px);
}
.bk-day:disabled {
  background: transparent;
  color: var(--grey-400);
  font-weight: 400;
  cursor: not-allowed;
}
.bk-day.is-empty { background: none; border: 0; cursor: default; }
.bk-day.is-selected {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(211,10,17,.3);
}
.bk-day.is-today:not(.is-selected) { border-color: var(--grey-400); }

/* A dot for "this day has room", so availability reads at a glance. */
.bk-day::after {
  content: '';
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bk-ok);
  opacity: 0;
}
.bk-day:not(:disabled):not(.is-empty)::after { opacity: 1; }
.bk-day.is-selected::after { background: var(--white); }

.bk-cal-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--grey-200);
  font-size: 0.72rem;
  color: var(--grey-500);
}
.bk-cal-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.bk-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bk-ok); }
.bk-dot-off { background: var(--grey-400); }

.bk-slots-empty,
.bk-slots-prompt {
  padding: 2rem 1.25rem;
  border: 2px dashed var(--grey-300);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--grey-500);
  font-size: 0.9rem;
}
.bk-slots-prompt .material-symbols-outlined {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--grey-400);
}

.bk-period + .bk-period { margin-top: 1.35rem; }
.bk-period h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--grey-500);
}
.bk-period h4 .material-symbols-outlined { font-size: 1.05rem; }

.bk-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 0.55rem;
}
.bk-slot {
  padding: 0.6rem 0.5rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--grey-700);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-slot small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--grey-500);
}
.bk-slot:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.bk-slot.is-selected {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(58,144,212,.35);
}
/* A time that is taken — by another lesson or the instructor's own calendar.
   Shown in place, greyed and struck through, so a gap in the grid never
   looks like a loading failure. */
.bk-slot.is-blocked,
.bk-slot.is-blocked:hover {
  background: var(--grey-100);
  border-color: var(--grey-200);
  border-style: dashed;
  color: var(--grey-500);
  text-decoration: line-through;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.bk-slot.is-blocked small {
  text-decoration: none;
  color: var(--red);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: 0.6rem;
}

/* ── Repeat this lesson ── */
.bk-repeat {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--grey-100);
}
.bk-repeat-toggle { margin: 0; }
.bk-repeat-toggle small { color: var(--grey-500); font-weight: 400; }
.bk-repeat-opts { margin-top: .85rem; }
.bk-repeat-row-opts { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.bk-repeat-row-opts label { display: flex; gap: .4rem; align-items: center; font-weight: 500; }
.bk-repeat-row-opts select {
  padding: .4rem .6rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-sm, .4rem);
  font-family: inherit;
  font-size: .9rem;
  background: var(--white);
}
.bk-repeat-list { display: grid; gap: .35rem; margin-top: .75rem; }
.bk-repeat-row {
  display: flex; gap: .5rem; align-items: center;
  padding: .45rem .6rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm, .4rem);
  font-size: .88rem;
  cursor: pointer;
}
.bk-repeat-row input { width: auto; margin: 0; }
.bk-repeat-row.is-bad { background: #fff1f1; border-color: #fecaca; color: #991b1b; cursor: default; }
.bk-repeat-row small { color: inherit; opacity: .8; font-size: .78rem; }
.bk-repeat-note { font-size: .8rem; color: var(--grey-500); margin-top: .25rem; }
.bk-repeat-note.is-bad { color: var(--red); }
.bk-done-series { margin: .5rem 0 0 1.2rem; padding: 0; text-align: left; font-size: .9rem; }
.bk-done-series li { margin: .2rem 0; }
.bk-done-series small { color: var(--grey-500); }
.bk-slot.is-selected small { color: rgba(255,255,255,.85); }

/* Skeletons while slots load — steadier than a "Loading…" string. */
.bk-skel {
  height: 3.1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--grey-200) 25%, var(--grey-100) 37%, var(--grey-200) 63%);
  background-size: 400% 100%;
  animation: bk-shimmer 1.3s ease infinite;
}
@keyframes bk-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}


/* ─────────────────────────────────────────
   6. STEP 3 — review
   ───────────────────────────────────────── */
.bk-review {
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bk-review-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--grey-200);
}
.bk-review-row dt {
  flex: 0 0 7.5rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bk-review-row dd { flex: 1; margin: 0; font-size: 0.95rem; font-weight: 600; }
.bk-review-row dd small { display: block; font-weight: 400; color: var(--grey-500); }
.bk-review-edit {
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-dark);
  cursor: pointer;
  text-decoration: underline;
}

.bk-totals { padding: 1.25rem; background: var(--grey-100); }
.bk-total-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  font-size: 0.92rem;
}
.bk-total-line.is-due {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--grey-300);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
}
.bk-total-line.is-due strong { color: var(--red); }
.bk-total-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--grey-500);
  line-height: 1.5;
}


/* ─────────────────────────────────────────
   7. STEP 5 — payment methods
   ───────────────────────────────────────── */
.bk-pay { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }
.bk-pay-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-pay-option:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.bk-pay-option.is-selected {
  border-color: var(--blue);
  background: var(--blue-light);
}
.bk-pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.bk-pay-option .material-symbols-outlined:first-of-type { font-size: 1.7rem; color: var(--blue-dark); }
.bk-pay-body { flex: 1; }
.bk-pay-body strong { display: block; font-family: var(--font-head); font-size: 0.92rem; }
.bk-pay-body small { color: var(--grey-500); font-size: 0.8rem; }
.bk-pay-check { color: var(--blue-dark); opacity: 0; transition: opacity var(--transition); }
.bk-pay-option.is-selected .bk-pay-check { opacity: 1; }

.bk-bank {
  margin-bottom: 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--grey-100);
  border-left: 4px solid var(--blue);
}
.bk-bank pre {
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.87rem;
  color: var(--grey-700);
}

/* ── Deposit vs pay-in-full ── */
.bk-scope {
  display: grid;
  gap: 0.6rem;
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}
.bk-scope legend { padding: 0; margin-bottom: 0.6rem; }

.bk-scope-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-scope-option:hover { border-color: var(--blue); }
.bk-scope-option.is-selected { border-color: var(--red); background: var(--red-light); }
.bk-scope-option input { position: absolute; opacity: 0; pointer-events: none; }
.bk-scope-body { flex: 1; }
.bk-scope-body strong { display: block; font-family: var(--font-head); font-size: 0.9rem; }
.bk-scope-body small { color: var(--grey-500); font-size: 0.78rem; }
.bk-scope-amount {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  color: var(--red);
  white-space: nowrap;
}

/* ── Stripe Payment Element ── */
.bk-card {
  padding: 1.15rem;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  margin-bottom: 1.25rem;
}
.bk-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.76rem;
  color: var(--grey-500);
  line-height: 1.4;
}
.bk-card-head .material-symbols-outlined { font-size: 1rem; color: var(--bk-ok); flex: 0 0 auto; }

/* Stripe's iframe reports its own height; a min-height stops the panel
   collapsing and re-jumping while the element boots. */
#bk-card-element { min-height: 5.5rem; }

.bk-card-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--grey-500);
  font-size: 0.85rem;
}
.bk-card-loading .material-symbols-outlined { animation: bk-spin 1s linear infinite; }
@keyframes bk-spin { to { transform: rotate(360deg); } }

.bk-alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.bk-alert-error { background: var(--red-light); color: var(--red-dark); border-left: 4px solid var(--red); }
.bk-alert-info  { background: var(--blue-light); color: var(--blue-dark); border-left: 4px solid var(--blue); }
.bk-alert:empty { display: none; }


/* ─────────────────────────────────────────
   8. SUMMARY RAIL
   ───────────────────────────────────────── */
.bk-summary {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
@media (min-width: 960px) {
  .bk-summary { position: sticky; top: 100px; }
}

.bk-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 0;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.bk-summary-head .bk-caret { transition: transform var(--transition); }
.bk-summary[data-open="false"] .bk-caret { transform: rotate(-90deg); }
/* On desktop the rail is always open and the header is not a control. */
@media (min-width: 960px) {
  .bk-summary-head { cursor: default; }
  .bk-summary-head .bk-caret { display: none; }
}

.bk-summary-body { padding: 1.25rem; }
@media (max-width: 959px) {
  .bk-summary[data-open="false"] .bk-summary-body { display: none; }
}

.bk-summary-item + .bk-summary-item {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--grey-200);
}
.bk-summary-item dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.2rem;
}
.bk-summary-item dd { margin: 0; font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.bk-summary-item dd small { display: block; font-weight: 400; color: var(--grey-500); }

.bk-summary-money {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--grey-300);
}
.bk-summary-empty { color: var(--grey-500); font-size: 0.88rem; line-height: 1.5; }

.bk-summary-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bk-ok-light);
  color: #05603a;
  font-size: 0.76rem;
  line-height: 1.45;
}
.bk-summary-badge .material-symbols-outlined { font-size: 1.1rem; flex: 0 0 auto; }


/* ─────────────────────────────────────────
   9. STEP 6 — done
   ───────────────────────────────────────── */
.bk-done { text-align: center; padding: 1rem 0 0; }
.bk-done-mark {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--bk-ok-light);
  color: var(--bk-ok);
  animation: bk-pop .5s cubic-bezier(.34,1.56,.64,1);
}
.bk-done-mark .material-symbols-outlined { font-size: 3rem; }
@keyframes bk-pop {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.bk-done h2 { font-family: var(--font-head); font-size: 1.7rem; margin: 0 0 0.6rem; }
.bk-done > p { color: var(--grey-500); max-width: 34rem; margin: 0 auto 1.25rem; line-height: 1.6; }

.bk-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  border: 2px dashed var(--grey-300);
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: .06em;
  margin-bottom: 1.5rem;
}
.bk-ref span:first-child {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--grey-500);
}

.bk-done-panel {
  max-width: 30rem;
  margin: 0 auto 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--grey-100);
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.55;
}
.bk-done-panel pre { margin: 0.5rem 0 0; white-space: pre-wrap; font-family: inherit; color: var(--grey-700); }

.bk-done-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}


/* ─────────────────────────────────────────
   10. CREDENTIALS BOX (reused from the success screen)
   ───────────────────────────────────────── */
.bk-creds {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1.15rem 1.25rem;
  border: 2px solid var(--blue-light);
  border-radius: var(--radius-md);
  background: var(--white);
  text-align: left;
}
.bk-cred-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--grey-300);
  font-size: 0.88rem;
}
.bk-cred-row:last-of-type { border-bottom: 0; }
.bk-cred-label { flex: 0 0 4.5rem; font-weight: 700; color: var(--grey-500); font-size: 0.75rem; text-transform: uppercase; }
.bk-cred-val { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.bk-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-full);
  background: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--grey-700);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-copy:hover { border-color: var(--blue); color: var(--blue-dark); }
.bk-copy.is-copied { background: var(--bk-ok-light); border-color: var(--bk-ok); color: #05603a; }
.bk-copy .material-symbols-outlined { font-size: 0.95rem; }
.bk-cred-note { margin: 0.75rem 0 0; font-size: 0.75rem; color: var(--grey-500); }


/* ─────────────────────────────────────────
   11. MOTION PREFERENCES
   ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bk *,
  .bk *::before,
  .bk *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .bk-service:hover,
  .bk-day:hover:not(:disabled),
  .bk-slot:hover { transform: none; }
  .bk-card-loading .material-symbols-outlined { animation: none; }
}
