/* ===========================================================================
   /demo booking picker. Loaded by demo.html only, after its inlined site.css.
   Same tokens, radii and 48px controls as the contact forms (.cform, .cf);
   no new colours. The selected state is the charcoal of .btn-primary, open
   days sit on the --blue-50 fill used across the site, and every tap target
   is at least 44px.
   =========================================================================== */

.bk { border: 1px solid var(--ring); border-radius: 20px; padding: clamp(24px, 3.4vw, 44px);
  background: #fff; margin-bottom: 24px; }

/* One switch for every part of the picker and form: the hidden attribute.
   !important so no display rule (.btn-chip is inline-flex, .bk__state is
   flex) can ever leave a hidden spinner or Retry on screen. */
.bk[hidden], .bk [hidden], .cwrap--solo [hidden] { display: none !important; }
.bk__h { margin: 0 0 4px; font-family: "Archivo", system-ui, sans-serif; font-weight: 800;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.3; letter-spacing: -.03em; color: var(--ink); }
/* time zone: a native select shown as bold charcoal text plus a chevron, no
   box. The 44px tap height comes from padding, not from anything visible.
   booking.js sizes it to the chosen label (field-sizing where supported). */
.bk__zone { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin: 0 0 20px; max-width: 100%; }
.bk__zlabel { font-size: 14px; line-height: 21px; letter-spacing: -.02em; color: var(--ink-55); }
.bk__zpick { position: relative; display: inline-flex; align-items: center; max-width: 100%; min-width: 0;
  color: var(--ink); transition: color .2s; }
.bk__zsel { -webkit-appearance: none; appearance: none; field-sizing: content; max-width: 100%;
  min-height: 44px; margin: 0; padding: 0 22px 0 0; border: 0; border-radius: 0; background: none;
  font-family: inherit; font-size: 14px; font-weight: 700; line-height: 21px; letter-spacing: -.02em;
  color: inherit; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.bk__zsel option, .bk__zsel optgroup { font-weight: 400; color: var(--ink); background: #fff; }
.bk__zsel optgroup { font-weight: 700; }
.bk__zchev { position: absolute; right: 4px; top: 50%; width: 10px; height: 7px; margin-top: -3px;
  pointer-events: none; }
.bk__zpick:hover { color: var(--blue); }
.bk__zsel:focus { outline: none; }
.bk__zsel:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.bk__zmeasure { position: absolute; visibility: hidden; white-space: pre; font-size: 14px; font-weight: 700;
  letter-spacing: -.02em; }
.bk__zauto { font-size: 13px; line-height: 20px; font-weight: 400; letter-spacing: -.01em; color: #2f7a4f; }
.bk__zauto[hidden], .bk__tz[hidden] { display: none; }
.bk__tz { margin: -20px 0 20px; font-size: 14px; line-height: 21px; letter-spacing: -.02em; color: var(--ink-55); }

.bk__status { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; font-size: 15px;
  line-height: 1.5; letter-spacing: -.01em; background: var(--blue-50); color: var(--ink); }
.bk__status.is-wait { color: var(--ink-55); }
.bk__status.is-bad { background: #fbeceb; color: #7d2a23; }

/* loading and failure share one centred panel: a thin charcoal ring on the
   blue-100 track with a quiet line under it, or the message with Retry.
   The loading box reserves about the calendar's height so nothing jumps when
   the grid arrives; it is removed outright (hidden) once times render. */
.bk__state { min-height: 400px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; text-align: center; }
.bk__state--fail { min-height: 220px; }
.bk__statetxt { margin: 0; max-width: 44ch; font-size: 15px; line-height: 1.5; letter-spacing: -.01em;
  color: var(--ink-55); }
.bk__state--fail .bk__statetxt { color: var(--ink); }
.bk__retry { border: 0; cursor: pointer; font-family: inherit; min-height: 44px; }
.bk__spin { width: 36px; height: 36px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid var(--blue-100); border-top-color: var(--ink);
  animation: bk-spin .9s linear infinite; }
/* the same ring, small, inside the submit button while a booking is sent */
.bk__spin--btn { width: 16px; height: 16px; border-width: 2px; margin-right: 10px; animation-duration: .8s;
  border-color: rgba(255,255,255,.3); border-top-color: #fff; flex: 0 0 auto; }
@keyframes bk-spin { to { transform: rotate(360deg); } }
@keyframes bk-pulse { 50% { opacity: .35; } }

/* demo page: the booking card stands alone (no aside), left-aligned, using
   the full 1080px content width, and sits higher */
.cwrap--solo { grid-template-columns: minmax(0, 1fr); max-width: none; margin-top: 24px; }
.phero--book { padding-top: 136px; padding-bottom: 48px; }
.phero--book .phero__p { max-width: 60ch; }
.phero__p a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; text-decoration-color: rgba(32,64,110,.35); overflow-wrap: anywhere;
  transition: text-decoration-color .2s; }
.phero__p a:hover { text-decoration-color: var(--blue); }
.phero__p a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

/* calendar (fixed band) beside a wide time grid; stacked below 810px */
.bk__body { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: start; }

.bk__mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bk__month { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.bk__nav { display: flex; gap: 4px; }
.bk__arrow { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--chip);
  color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s; }
.bk__arrow svg { width: 14px; height: 14px; display: block; }
.bk__arrow:hover:not([disabled]) { background: var(--chip-hover); }
.bk__arrow[disabled] { opacity: .35; cursor: default; }

.bk__wk, .bk__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bk__wk { margin: 0 0 4px; padding: 0; list-style: none; }
.bk__wk li { text-align: center; font-size: 12px; line-height: 28px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-55); }
.bk__day { min-height: 44px; aspect-ratio: 1 / 1; max-height: 52px; width: 100%; padding: 0; cursor: default;
  border: 0; border-radius: 12px; background: none; font-family: inherit; font-size: 15px;
  letter-spacing: -.02em; color: var(--ink-40); position: relative; }
.bk__day.is-blank { visibility: hidden; }
.bk__day.is-open { background: var(--blue-50); color: var(--ink); font-weight: 600; cursor: pointer;
  transition: background .2s, color .2s; }
.bk__day.is-open:hover { background: var(--blue-100); }
.bk__day.is-sel, .bk__day.is-sel:hover { background: var(--ink); color: #fff; }
.bk__day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: currentColor; opacity: .6; }
.bk__day:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.bk__dayhead { margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink); line-height: 44px; }
.bk__list { list-style: none; margin: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 12px;
  max-height: 440px; overflow-y: auto; padding: 2px; }
.bk__time { width: 100%; min-height: 52px; padding: 10px 12px; border: 1px solid var(--ring);
  border-radius: 12px; background: #fff; font-family: inherit; cursor: pointer; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  transition: border-color .2s, background .2s, color .2s; }
.bk__main { font-size: 15px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.bk__alt { font-size: 12px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink-55); }
.bk__time:hover { border-color: var(--blue); }
.bk__time.is-sel, .bk__time.is-sel:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.bk__time.is-sel .bk__alt { color: rgba(255,255,255,.72); }
.bk__time:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* the chosen time, at the top of the details form */
.bk-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--blue-50); }
.bk-sum[hidden] { display: none; }
.bk-sum p { margin: 0; font-size: 15px; line-height: 1.5; letter-spacing: -.01em; color: var(--ink); }
.bk-sum strong { font-weight: 600; }
.bk-sum .btn-chip { border: 0; cursor: pointer; font-family: inherit; }

.cform[hidden], .cf[hidden] { display: none; }
.cdone__when { margin: 0 0 10px !important; font-size: clamp(16px, 1.7vw, 18px) !important;
  font-weight: 600; color: var(--ink) !important; }
.cdone__when[hidden], .cdone .btn-chip[hidden] { display: none; }
.cdone .btn-chip { margin-top: 20px; }

@media (max-width: 1023.98px) {
  .bk__body { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
}
@media (max-width: 809.98px) {
  .bk { padding: 20px; border-radius: 16px; }
  .bk__body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bk__cal { max-width: 440px; }
  .bk__wk, .bk__grid { gap: 4px; }
  .bk__list { max-height: none; overflow: visible; gap: 10px; }
  .bk__state { min-height: 340px; }
  .bk__state--fail { min-height: 180px; }
  .cwrap--solo { grid-template-columns: 1fr; margin-top: 16px; }
  .phero--book { padding-top: 100px; padding-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk__day, .bk__time, .bk__arrow, .bk__zpick { transition: none; }
  /* no rotation: a full static ring that slowly fades in and out */
  .bk__spin { animation: bk-pulse 2s ease-in-out infinite; border-color: var(--ink); }
  .bk__spin--btn { border-color: #fff; }
}
