/* Booking box tabs + contact form, shared by all themes.
   Each theme sets the --cf-* colours on .book in its own styles.css. */
.book {
  --cf-text: #F5F3FF; --cf-muted: #A0A8C8; --cf-surface: rgba(255,255,255,.045); --cf-field: rgba(255,255,255,.05);
  --cf-line: rgba(255,255,255,.1); --cf-line-hi: rgba(255,255,255,.24); --cf-accent: #fff; --cf-accent-ink: #060814;
  --cf-focus: #6FE3FF; --cf-ring: rgba(111,227,255,.3); --cf-chip-on: rgba(255,255,255,.12); --cf-err: #FF9AAE;
  --cf-head: inherit; --cf-r: 20px; --cf-r-sm: 12px; --cf-ease: cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column; gap: 12px; min-width: 0; container-type: inline-size;
}

/* Tabs: a two-part switch above the box */
.book__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 999px; background: var(--cf-field); border: 1px solid var(--cf-line); }
.book__tab { appearance: none; border: 0; margin: 0; padding: 11px 16px; border-radius: 999px; background: transparent; color: var(--cf-muted); font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color .25s var(--cf-ease), color .25s var(--cf-ease), transform .25s var(--cf-ease); }
.book__tab:hover { color: var(--cf-text); background: var(--cf-chip-on); }
.book__tab[aria-selected="true"] { background: var(--cf-accent); color: var(--cf-accent-ink); }
.book__tab:focus-visible { outline: 2px solid var(--cf-focus); outline-offset: 2px; }

/* Panels: only the open tab is shown (the calendar iframe loads lazily when its tab opens) */
.book__panels { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.js-book .book__panel:not(.is-on) { display: none; }
.js-book .book__panel.is-on { animation: book-in .35s var(--cf-ease); }
@keyframes book-in { from { opacity: 0; transform: translateY(6px); } }
.book__panel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.book__panel > .cal { flex: 1; }

/* Form */
.cform, .cform__done { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--cf-r); background: var(--cf-surface); border: 1px solid var(--cf-line); color: var(--cf-text); }
.cform[hidden], .cform__done[hidden] { display: none; }
.cform__title { margin: 0 0 6px; font: 700 26px/1.2 var(--cf-head); letter-spacing: -0.02em; color: var(--cf-text); }
.cform__sub { margin: 0; color: var(--cf-muted); font-size: 15px; line-height: 1.55; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf { min-width: 0; margin: 0; padding: 0; border: 0; }
.cf__label { display: block; margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 600; color: var(--cf-text); }
.cf__input { display: block; width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: var(--cf-r-sm); border: 1px solid var(--cf-line); background: var(--cf-field); color: var(--cf-text); font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.5; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.cf__input::placeholder { color: var(--cf-muted); opacity: .75; }
.cf__input:hover { border-color: var(--cf-line-hi); }
.cf__input:focus { outline: none; border-color: var(--cf-focus); box-shadow: 0 0 0 3px var(--cf-ring); }
.cf__input[aria-invalid="true"] { border-color: var(--cf-err); }
textarea.cf__input { min-height: 96px; resize: vertical; }
.cf__err { margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--cf-err); }
.cf__err:empty { display: none; }

/* Topic chips (pick any) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cf-line); font-size: 13.5px; font-weight: 600; color: var(--cf-muted); transition: border-color .2s, color .2s, background-color .2s, transform .2s var(--cf-ease); }
.chip:hover span { border-color: var(--cf-line-hi); color: var(--cf-text); transform: translateY(-1px); }
.chip input:checked + span { background: var(--cf-chip-on); border-color: var(--cf-focus); color: var(--cf-text); }
.chip input:checked + span::before { content: ""; width: 10px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 0 2px 2px; rotate: -45deg; }
.chip input:focus-visible + span { outline: 2px solid var(--cf-focus); outline-offset: 2px; }

/* Consent */
.cf__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--cf-muted); cursor: pointer; }
.cf__consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cf-focus); cursor: pointer; }
.cf__consent .link { color: var(--cf-text); }
.cform .link:hover { color: var(--cf-focus); }

/* Honeypot: off-screen, never seen by people */
.cf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf__widget:empty { display: none; }
.cf__ts:has(.cf__widget:empty):has(.cf__err:empty) { display: none; }
.cform__submit { width: 100%; justify-content: center; margin-top: auto; }
.cform__submit[aria-busy="true"] { opacity: .75; cursor: progress; }
.cform__status { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--cf-err); }
.cform__status:empty { display: none; }
.cform__note { margin: -4px 0 0; text-align: center; font-size: 13.5px; color: var(--cf-muted); }
.cform__status .link { color: var(--cf-text); }

/* Sent */
.cform__done { align-items: center; justify-content: center; text-align: center; outline: none; }
.cform__done .cform__sub { max-width: 36ch; }
.cform__check { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 6px; border-radius: 50%; background: var(--cf-accent); color: var(--cf-accent-ink); }
.cform__check svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cform__again { appearance: none; border: 0; padding: 0 0 2px; margin-top: 4px; background-color: transparent; color: var(--cf-text); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }

@container (max-width: 420px) {
  .cform, .cform__done { padding: 22px 18px; }
  .cform__row { grid-template-columns: 1fr; }
  textarea.cf__input { min-height: 128px; }
  .cform__title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .book *, .js-book .book__panel { transition: none !important; animation: none !important; }
}
