/* ============================================================================
   booking.css — visual system for the multi-step booking flow.

   Built entirely on base.css tokens (high-contrast black + white + red, with
   gold as a premium micro-accent). The top block is the shared scaffolding the
   shell documents in _integration-contract.md (.bk-steps, .bk-options,
   .bk-dates, .bk-times, .bk-summary, .bk-confirm, .bk-nav, .bk-mine); the lower
   block adds the premium refinements the BOOKING module's richer flow needs.
   Owned by the Booking module; safe to drop into #booking-root.
   ========================================================================== */

/* ---- Stepper / progress ---- */
.bk-steps { display: flex; align-items: center; gap: 8px; margin-bottom: var(--sp-6); }
.bk-steps__item { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--line);
  position: relative; overflow: hidden; }
.bk-steps__item::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--c-red);
  transition: width var(--t-slow) var(--ease-out); }
.bk-steps__item.is-done::after { width: 100%; }
.bk-steps__item.is-active::after { width: 50%; }
.bk-steplabel { font-family: var(--font-head); font-size: 12px; font-weight: var(--fw-semi);
  letter-spacing: .12em; text-transform: uppercase; color: var(--c-red); margin-bottom: 6px; }

/* ---- Step container with slide transition ---- */
.bk-step { animation: bkStepIn var(--t-slow) var(--ease-out); }
@keyframes bkStepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.bk-step h2 { margin-bottom: var(--sp-2); }
.bk-step__sub { color: var(--text-soft); margin-bottom: var(--sp-5); }

/* ---- Option cards (session type) ---- */
.bk-options { display: grid; gap: var(--sp-3); }
.bk-option {
  display: flex; align-items: center; gap: var(--sp-4); text-align: left;
  padding: var(--sp-4) var(--sp-5); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); transition: all var(--t-fast) var(--ease-out); width: 100%;
}
.bk-option:hover { border-color: var(--c-gray-lt); transform: translateY(-2px); }
.bk-option[aria-selected="true"] { border-color: var(--c-red); box-shadow: 0 0 0 3px rgba(231,29,29,.10); }
.bk-option__ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--surface-2); display: grid; place-items: center; }
.bk-option[aria-selected="true"] .bk-option__ic { background: var(--c-red); color: #fff; }
.bk-option__ic .ic { width: 24px; height: 24px; }
.bk-option__main { flex: 1; min-width: 0; }
.bk-option__title { font-family: var(--font-head); font-weight: var(--fw-semi); font-size: 16px; }
.bk-option__sub { font-size: 13px; color: var(--text-soft); margin-top: 2px; line-height: 1.4; }
.bk-option__meta { font-family: var(--font-head); font-size: 12px; font-weight: var(--fw-semi); color: var(--c-ink); }
.bk-option__check { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; color: #fff; transition: all var(--t-fast) var(--ease-spring); }
.bk-option[aria-selected="true"] .bk-option__check { background: var(--c-red); border-color: var(--c-red); }
.bk-option__check .ic { width: 14px; height: 14px; opacity: 0; transition: opacity var(--t-fast); }
.bk-option[aria-selected="true"] .bk-option__check .ic { opacity: 1; }

/* ---- Date grid ---- */
.bk-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.bk-month__label { font-family: var(--font-head); font-weight: var(--fw-semi); font-size: 16px; }
.bk-dow { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 6px; }
.bk-dow span { text-align: center; font-size: 11px; font-weight: var(--fw-semi); color: var(--text-soft);
  letter-spacing: .04em; }
.bk-dates { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.bk-date { aspect-ratio: 1; border-radius: var(--r-sm); display: grid; place-items: center;
  font-family: var(--font-head); font-size: 14px; font-weight: var(--fw-med); color: var(--c-ink);
  transition: all var(--t-fast) var(--ease-out); position: relative; }
.bk-date:hover:not([disabled]) { background: var(--surface-2); }
.bk-date[disabled] { color: var(--c-gray-lt); pointer-events: none; }
.bk-date.is-empty { visibility: hidden; }
.bk-date[aria-selected="true"] { background: var(--c-red); color: #fff; box-shadow: var(--sh-red); }
.bk-date.is-today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--c-red); }
.bk-date[aria-selected="true"].is-today::after { background: #fff; }

/* ---- Time slots ---- */
.bk-times { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: var(--sp-5); }
.bk-time { padding: 12px 8px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-family: var(--font-head); font-size: 14px; font-weight: var(--fw-med); text-align: center;
  transition: all var(--t-fast) var(--ease-out); }
.bk-time:hover:not([disabled]) { border-color: var(--c-gray-lt); }
.bk-time[disabled] { opacity: .4; pointer-events: none; }
.bk-time[aria-selected="true"] { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }

/* ---- Summary / confirmation ---- */
.bk-summary { background: var(--surface-2); border-radius: var(--r-lg); padding: var(--sp-5); margin-bottom: var(--sp-5); }
.bk-summary__row { display: flex; align-items: flex-start; gap: var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.bk-summary__row:first-child { border-top: 0; padding-top: 0; }
.bk-summary__ic { flex: 0 0 auto; color: var(--c-red); }
.bk-summary__ic .ic { width: 20px; height: 20px; }
.bk-summary__k { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .06em; }
.bk-summary__v { font-family: var(--font-head); font-weight: var(--fw-semi); font-size: 15px; margin-top: 1px; }

/* ---- Confirmation screen ---- */
.bk-confirm { text-align: center; padding: var(--sp-6) 0 var(--sp-4); }
.bk-confirm__badge { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto var(--sp-5);
  background: rgba(231,29,29,.10); display: grid; place-items: center; position: relative; }
.bk-confirm__badge .ic { width: 44px; height: 44px; color: var(--c-red); }
.bk-confirm__badge::after { content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(231,29,29,.18); animation: pulseRing 1.8s var(--ease-out) infinite; }
@keyframes pulseRing { 0%{ transform: scale(.85); opacity: .8; } 100%{ transform: scale(1.25); opacity: 0; } }
.bk-confirm h2 { margin-bottom: var(--sp-3); }
.bk-confirm__sub { color: var(--text-soft); max-width: 32ch; margin: 0 auto var(--sp-6); }

/* ---- Footer nav for the flow ---- */
.bk-nav { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); }
.bk-nav .btn { flex: 1; }

/* ---- "My bookings" list ---- */
.bk-mine { display: grid; gap: var(--sp-3); }
.bk-mine__card { display: flex; gap: var(--sp-4); align-items: center; padding: var(--sp-4);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.bk-mine__date { flex: 0 0 auto; width: 54px; text-align: center; }
.bk-mine__date .d { font-family: var(--font-display); font-weight: var(--fw-light); font-size: 24px; color: var(--c-red); line-height: 1; }
.bk-mine__date .m { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); margin-top: 2px; }
.bk-mine__main { flex: 1; min-width: 0; }
.bk-mine__title { font-family: var(--font-head); font-weight: var(--fw-semi); font-size: 15px; }
.bk-mine__sub { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }

/* ============================================================================
   PREMIUM REFINEMENTS — added for the Booking module's full flow.
   ========================================================================== */

/* Generic chevron-flip helper (used on Back button + prev-month arrow). */
.bk-nav .flip, .bk-month .flip { transform: rotate(180deg); }

/* Make the nav buttons line up their icon + label nicely. */
.bk-nav .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bk-nav .btn .ic { width: 17px; height: 17px; }
.bk-nav .btn[data-back] { flex: 0 0 auto; padding-inline: var(--sp-5); }
.bk-nav .btn[data-next] { flex: 1; }

/* ---- Option card: price/meta column, "best for" line, featured (free) ---- */
.bk-option__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.bk-option__price { font-family: var(--font-head); font-weight: var(--fw-semi); font-size: 14px; color: var(--c-ink); }
.bk-option__side .bk-option__meta { color: var(--text-soft); font-weight: var(--fw-med); }
.bk-option__side .bk-option__check { margin-top: 4px; }
.bk-option__best { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  font-family: var(--font-head); font-size: 11px; font-weight: var(--fw-semi); letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-soft); }
.bk-option__best .ic { width: 13px; height: 13px; color: var(--c-gold); }
.bk-option[aria-selected="true"] .bk-option__best { color: var(--c-red); }
.bk-option[aria-selected="true"] .bk-option__best .ic { color: var(--c-red); }

.bk-option--featured { border-color: rgba(250,183,0,.55); background:
  linear-gradient(180deg, rgba(255,208,78,.10), rgba(255,208,78,0) 60%), var(--surface); }
.bk-option--featured .bk-option__ic { background: rgba(250,183,0,.16); color: var(--c-gold-dark, #A77A00); }
.bk-option--featured[aria-selected="true"] { border-color: var(--c-red);
  background: var(--surface); box-shadow: 0 0 0 3px rgba(231,29,29,.10); }
.bk-option--featured[aria-selected="true"] .bk-option__ic { background: var(--c-red); color: #fff; }

/* ---- Tags ---- */
.bk-tag { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px;
  border-radius: var(--r-pill); font-family: var(--font-head); font-size: 10.5px; font-weight: var(--fw-semi);
  letter-spacing: .06em; text-transform: uppercase; }
.bk-tag--gold { background: var(--c-gold); color: #4a3500; }
.bk-tag--muted { background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--line); }

/* ---- Calendar wrapper card ---- */
.bk-cal { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5) var(--sp-4) var(--sp-4);
  background: var(--surface); }
.bk-cal .iconbtn { width: 38px; height: 38px; border-radius: var(--r-md); }
.bk-cal .iconbtn:hover:not([disabled]) { background: var(--surface-2); }
.bk-cal .iconbtn[disabled] { opacity: .25; pointer-events: none; }
.bk-cal .iconbtn .ic { width: 18px; height: 18px; }
.bk-hint { font-size: 12px; color: var(--text-soft); margin-top: var(--sp-3); text-align: center; }

/* ---- Time slots, grouped by part of day ---- */
.bk-timegroup { margin-top: var(--sp-4); }
.bk-timegroup__label { font-family: var(--font-head); font-size: 12px; font-weight: var(--fw-semi);
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 2px; }
.bk-timegroup .bk-times { margin-top: 8px; }
.bk-time[aria-selected="true"] { background: var(--c-ink); color: #fff; border-color: var(--c-ink);
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); transform: translateY(-1px); }

/* ---- Summary variants ---- */
.bk-summary--review { margin-top: var(--sp-2); }
.bk-summary__txt { display: flex; flex-direction: column; min-width: 0; }
.bk-summary--confirm { border: 1px solid var(--line); }

/* ---- Details step extras ---- */
.field__opt { color: var(--text-soft); font-weight: var(--fw-reg, 400); text-transform: none; letter-spacing: 0; }
textarea.field__input { resize: vertical; min-height: 84px; font-family: var(--font-body); line-height: 1.6; }
.field__input.is-invalid { border-color: var(--c-red); box-shadow: 0 0 0 3px rgba(231,29,29,.12);
  animation: bkShake .4s var(--ease-out); }
@keyframes bkShake { 0%,100%{ transform: translateX(0); } 20%{ transform: translateX(-5px); }
  40%{ transform: translateX(5px); } 60%{ transform: translateX(-3px); } 80%{ transform: translateX(3px); } }
.bk-fineprint { display: flex; align-items: center; gap: 8px; margin: var(--sp-2) 0 0;
  font-size: 12.5px; color: var(--text-soft); }
.bk-fineprint .ic { width: 16px; height: 16px; color: var(--c-red); flex: 0 0 auto; }

/* ---- Confirmation: eyebrow, action stack, in-app text link ---- */
.bk-confirm__eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--sp-3);
  font-family: var(--font-head); font-size: 12px; font-weight: var(--fw-semi); letter-spacing: .14em;
  text-transform: uppercase; color: var(--c-red); }
.bk-confirm__eyebrow .ic { width: 15px; height: 15px; color: var(--c-gold); }
.bk-confirm__badge .ic { stroke-width: 2; animation: bkCheckPop .55s var(--ease-spring) .05s both; }
@keyframes bkCheckPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bk-confirm__actions { display: grid; gap: 10px; margin-top: var(--sp-2); }
.bk-confirm__actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bk-confirm__actions .btn .ic { width: 17px; height: 17px; }
.bk-confirm__row { display: flex; gap: 10px; }
.bk-confirm__row .btn { flex: 1; }
.bk-textlink { display: block; width: 100%; margin-top: var(--sp-2); padding: 10px;
  background: none; border: 0; font-family: var(--font-head); font-size: 13.5px; font-weight: var(--fw-med);
  color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  transition: color var(--t-fast); }
.bk-textlink:hover { color: var(--c-ink); }

/* ---- "My bookings": header, section labels, multi-action cards ---- */
.bk-mine__head { margin-bottom: var(--sp-5); align-items: center; }
.bk-mine__new { padding: 11px 18px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.bk-mine__new .ic { width: 15px; height: 15px; }
.bk-mine__section { font-family: var(--font-head); font-size: 12px; font-weight: var(--fw-semi);
  letter-spacing: .1em; text-transform: uppercase; color: var(--c-red);
  margin: var(--sp-5) 0 var(--sp-3); }
.bk-mine__section:first-of-type { margin-top: 0; }
.bk-mine__section--muted { color: var(--text-soft); }
.bk-mine__card { transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.bk-mine__card:hover { transform: translateY(-2px); box-shadow: var(--sh-1); }
.bk-mine__sub { display: inline-flex; align-items: center; gap: 6px; }
.bk-mine__sub .ic { width: 14px; height: 14px; color: var(--c-red); opacity: .85; }
.bk-mine__act { flex: 0 0 auto; display: flex; gap: 2px; }
.bk-mine__act .iconbtn { width: 40px; height: 40px; border-radius: var(--r-md); }
.bk-mine__act .iconbtn:hover { background: var(--surface-2); }
.bk-mine__act .iconbtn .ic { width: 19px; height: 19px; }
.bk-mine--past .bk-mine__card { opacity: .82; }
.bk-mine__card.is-cancelled .bk-mine__date .d { color: var(--text-soft); }
.bk-mine__card.is-cancelled .bk-mine__title { text-decoration: line-through; text-decoration-color: var(--c-gray-lt); }

/* ---- Empty state ---- */
.bk-empty { padding: var(--sp-8) var(--sp-4); }
.bk-empty__ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-2); margin-bottom: var(--sp-4); }
.bk-empty__ic .ic { width: 30px; height: 30px; color: var(--c-red); }
.bk-empty .btn { display: inline-flex; align-items: center; gap: 8px; }
.bk-empty .btn .ic { width: 16px; height: 16px; }

/* ---- Manage sheet ---- */
.bk-manage__actions { display: grid; gap: 10px; margin-top: var(--sp-2); }
.bk-manage__actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bk-manage__actions .btn .ic { width: 17px; height: 17px; }
.bk-danger { color: var(--c-red); }
.bk-danger:hover { background: rgba(231,29,29,.08); border-color: rgba(231,29,29,.4); }

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .bk-step, .bk-confirm__badge::after, .bk-confirm__badge .ic, .field__input.is-invalid { animation: none !important; }
  .bk-mine__card, .bk-option, .bk-time { transition: none !important; }
}
