/* Booking widget — shared by the home page (#book) and manage.html.
   Uses the site's tokens (--bg, --ink, --green, --lav, --mint, --r, --ease…). */

#booker, #resched { scroll-margin-top: 90px; }
.bk-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.bk-head .lead { margin-top: 1.2rem; }
/* The site's grey is too light on lavender and mint; a darker one keeps WCAG AA contrast. */
#book .label, #book .lead { color: #55554F; }
.bk-side { --muted: #56564F; }
.bk-trust { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.bk-trust span { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; font-weight: 500; color: var(--ink);
  background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 100px; padding: .5rem .9rem; }
.bk-trust svg { width: 15px; height: 15px; color: var(--green); }

.bk { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; background: #fff; border-radius: var(--r);
  box-shadow: 0 50px 90px -60px rgba(32,31,28,.45), 0 0 0 1px var(--line); overflow: hidden; min-height: 560px; }
.bk-main { padding: clamp(1.4rem, 3.4vw, 2.6rem); min-width: 0; }
.bk-side { background: var(--mint); padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: 1.2rem; }

/* stepper */
.bk-steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.8rem; counter-reset: s; flex-wrap: wrap; }
.bk-steps li { counter-increment: s; display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; font-weight: 500; color: var(--muted);
  padding: .45rem .85rem .45rem .5rem; border-radius: 100px; background: var(--bg); }
.bk-steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); font-size: .75rem; }
.bk-steps li.is-on { color: var(--ink); background: var(--lav); }
.bk-steps li.is-on::before { background: var(--ink); color: #fff; border-color: var(--ink); }
.bk-steps li.is-done::before { content: "✓"; background: var(--green); border-color: var(--green); color: #fff; }

.bk-h { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-bottom: .4rem; outline: none; }
.bk-sub { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.bk-back { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; padding: .3rem 0; margin-bottom: 1rem;
  font: 500 .9rem 'Inter', sans-serif; color: var(--muted); cursor: pointer; }
.bk-back:hover { color: var(--ink); }
.bk-back svg { width: 16px; height: 16px; }

/* session types */
.bk-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.bk-type { position: relative; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--bg); border: 1.5px solid transparent;
  border-radius: 20px; padding: 1.4rem 1.4rem 1.3rem; display: flex; flex-direction: column; gap: .7rem;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); }
.bk-type:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -30px rgba(32,31,28,.5); background: #fff; border-color: var(--line); }
.bk-type[aria-checked="true"] { border-color: var(--green); background: #fff; }
.bk-type:focus-visible, .bk-day:focus-visible, .bk-time:focus-visible, .bk-btn:focus-visible, .bk-seg label:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.bk-type-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.bk-type h4 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.bk-price { flex: none; font-size: .82rem; font-weight: 600; padding: .3rem .65rem; border-radius: 100px; background: var(--butter); }
.bk-price.is-free { background: var(--mint-2); }
.bk-type p { color: var(--muted); font-size: .93rem; line-height: 1.55; }
.bk-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .84rem; color: var(--ink); margin-top: auto; padding-top: .3rem; }
.bk-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.bk-meta svg { width: 15px; height: 15px; color: var(--green); }

/* calendar + times */
.bk-pick { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); align-items: start; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.bk-month { font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.bk-nav { display: flex; gap: .4rem; }
.bk-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink);
  transition: background .2s, color .2s; }
.bk-nav button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.bk-nav button:disabled { opacity: .3; cursor: default; }
.bk-nav svg { width: 16px; height: 16px; }
.bk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bk-dow { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: .3rem 0 .5rem; }
.bk-day { position: relative; aspect-ratio: 1; min-height: 40px; border: 0; border-radius: 12px; background: transparent; font: 500 .95rem 'Inter', sans-serif;
  color: #B5B4AD; cursor: default; display: grid; place-items: center; }
.bk-day.is-open { color: var(--ink); background: var(--lav); cursor: pointer; font-weight: 600; transition: background .2s, color .2s, transform .2s var(--ease); }
.bk-day.is-open:hover { background: var(--lav-2); }
.bk-day.is-open::after { content: ""; position: absolute; bottom: 18%; width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.bk-day.is-today { box-shadow: inset 0 0 0 1.5px var(--line); }
.bk-day[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bk-day[aria-pressed="true"]::after { background: var(--butter); }
.bk-day.is-pad { visibility: hidden; }
.bk-cal-foot { margin-top: .9rem; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.bk-cal-foot svg { width: 14px; height: 14px; }

.bk-times-h { font-weight: 600; font-size: 1.02rem; margin-bottom: .2rem; }
.bk-times-sub { font-size: .84rem; color: var(--muted); margin-bottom: 1rem; }
.bk-period { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 1rem 0 .5rem; }
.bk-period:first-of-type { margin-top: 0; }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .5rem; }
.bk-time { min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: 600 .95rem 'Inter', sans-serif; color: var(--ink); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s, color .2s, transform .2s var(--ease); }
.bk-time:hover { border-color: var(--green); color: var(--green); }
.bk-time[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.bk-times-empty { background: var(--bg); border-radius: 16px; padding: 1.4rem; color: var(--muted); font-size: .93rem; }
.bk-times-scroll { max-height: 400px; overflow: auto; padding: 2px; margin: -2px; overscroll-behavior: contain; }

/* form */
.bk-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.bk-form .full { grid-column: 1 / -1; }
.bk-field label, .bk-legend { display: block; font-size: .84rem; font-weight: 500; margin-bottom: .45rem; }
.bk-field .opt { color: var(--muted); font-weight: 400; }
.bk-field input, .bk-field textarea { width: 100%; font: 400 1rem 'Inter', sans-serif; color: var(--ink); background: var(--bg); border: 1.5px solid transparent;
  border-radius: 12px; padding: .85rem 1rem; transition: border-color .2s, background .2s; }
.bk-field textarea { min-height: 96px; resize: vertical; }
.bk-field input:focus, .bk-field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.bk-field input[aria-invalid="true"] { border-color: #C2410C; }
.bk-hint { font-size: .8rem; color: var(--muted); margin-top: .4rem; line-height: 1.5; }
.bk-seg { display: flex; gap: .5rem; flex-wrap: wrap; border: 0; padding: 0; }
.bk-seg label { flex: 1 1 140px; display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-radius: 12px; background: var(--bg); border: 1.5px solid transparent;
  cursor: pointer; font-size: .95rem; font-weight: 500; transition: border-color .2s, background .2s; }
.bk-seg input { accent-color: var(--green); width: 18px; height: 18px; }
.bk-seg label:has(input:checked) { border-color: var(--green); background: #fff; }
.bk-consent { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.bk-consent a { color: var(--green); }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 52px; padding: 0 1.6rem; border-radius: 100px; border: 0;
  background: var(--ink); color: #fff; font: 500 1rem 'Inter', sans-serif; cursor: pointer; text-decoration: none;
  transition: background .25s var(--ease), transform .25s var(--ease), opacity .2s; }
.bk-btn:hover:not(:disabled) { background: var(--green); transform: translateY(-2px); }
.bk-btn:disabled { opacity: .45; cursor: not-allowed; }
.bk-btn.is-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.bk-btn.is-ghost:hover:not(:disabled) { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.bk-btn.is-danger { background: #9A3412; }
.bk-btn.is-danger:hover:not(:disabled) { background: #7C2D12; }
.bk-btn svg { width: 18px; height: 18px; }
.bk-btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: bkspin .8s linear infinite; }
@keyframes bkspin { to { transform: rotate(360deg); } }
.bk-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.6rem; }

.bk-error { background: #FFF1EA; color: #9A3412; border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; margin-top: 1rem; }
.bk-error:empty { display: none; }

/* summary */
.bk-side-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.bk-sum { display: grid; gap: .9rem; }
.bk-sum-row { display: grid; grid-template-columns: 34px 1fr; gap: .8rem; align-items: start; }
.bk-sum-ic { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--green); }
.bk-sum-ic svg { width: 17px; height: 17px; }
.bk-sum-k { font-size: .76rem; color: var(--muted); }
.bk-sum-v { font-weight: 600; font-size: .98rem; line-height: 1.35; }
.bk-sum-v.is-empty { color: #5F5F58; font-weight: 400; font-style: italic; }
.bk-sum-local { font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: .15rem; }
.bk-side-cta { margin-top: auto; display: grid; gap: .7rem; }
.bk-side-cta .bk-btn { width: 100%; }
.bk-side-note { font-size: .8rem; color: var(--muted); line-height: 1.55; }
.bk-side-note a { color: inherit; }

/* done */
.bk-done-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.bk-done { max-width: 560px; }
.bk-next { background: var(--mint); border-radius: 20px; padding: 1.6rem 1.6rem 1.4rem; }
.bk-next ol { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; counter-reset: n; }
.bk-next li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; gap: .8rem; font-size: .93rem; color: var(--muted); line-height: 1.55; }
.bk-next li::before { content: counter(n); width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 600; color: var(--green); font-size: .85rem; }
.bk-next b { color: var(--ink); font-weight: 600; }
.bk-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green); display: grid; place-items: center; margin-bottom: 1.4rem; }
.bk-tick svg { width: 30px; height: 30px; color: #fff; stroke-dasharray: 30; stroke-dashoffset: 30; animation: bkdraw .6s .15s var(--ease) forwards; }
@keyframes bkdraw { to { stroke-dashoffset: 0; } }
.bk-done .bk-h { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.bk-done-list { margin: 1.4rem 0 0; padding: 1.2rem 1.3rem; background: var(--bg); border-radius: 16px; display: grid; gap: .55rem; font-size: .96rem; }
.bk-done-list b { font-weight: 600; }

/* closed / loading */
.bk-closed { grid-column: 1 / -1; padding: clamp(2rem, 5vw, 3.5rem); display: grid; place-items: center; text-align: center; }
.bk-closed .bk-h { margin-bottom: .8rem; }
.bk-closed p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.6rem; }
.bk-skel { background: linear-gradient(90deg, var(--bg) 0%, #fff 50%, var(--bg) 100%); background-size: 200% 100%; animation: bkskel 1.4s linear infinite; border-radius: 16px; }
@keyframes bkskel { to { background-position: -200% 0; } }

.bk-step[hidden] { display: none; }
.bk-step { animation: bkin .45s var(--ease); }
@keyframes bkin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1080px) {
  .bk-pick { grid-template-columns: 1fr; }
  .bk-times-scroll { max-height: none; }
}
@media (max-width: 900px) {
  .bk { grid-template-columns: 1fr; }
  .bk-done-wrap { grid-template-columns: 1fr; }
  .bk-side { order: -1; padding: 1rem 1.2rem; flex-direction: row; align-items: center; gap: .8rem; }
  .bk-side-label, .bk-side-note, .bk-sum-row.is-extra { display: none; }
  .bk-sum { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .8rem; flex: 1; }
  .bk-sum-ic { display: none; }
  .bk-sum-row { grid-template-columns: 1fr; }
  .bk-sum-v { font-size: .88rem; }
  .bk-side-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; margin: 0; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom));
    background: rgba(250,250,248,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 -1px 0 var(--line);
    transform: translateY(110%); transition: transform .35s var(--ease); }
  .bk-side-cta.is-show { transform: none; }
  .bk-head { grid-template-columns: 1fr; }
  .bk-trust { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .bk-form { grid-template-columns: 1fr; }
  .bk-main { padding: 1.3rem 1.1rem 1.6rem; }
  .bk-type { padding: 1.2rem; }
  .bk-grid { gap: 3px; }
  .bk-day { border-radius: 10px; font-size: .9rem; }
  .bk-slots { grid-template-columns: repeat(3, 1fr); }
  .bk-sum-row:nth-child(1) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-step, .bk-tick svg, .bk-skel { animation: none; }
  .bk-tick svg { stroke-dashoffset: 0; }
  .bk-type:hover, .bk-btn:hover:not(:disabled) { transform: none; }
}
