/*
  Cabo — pre-booking form (/book/).

  Terracotta on plaster, per SPEC §2. #C2492D is a FILL only: it is
  never set as `color` on a light ground. Terracotta words use
  --terracotta-deep #94331E (6.80:1). Labels on a terracotta fill are
  --on-terra #FFF8F2 (4.66:1), never --plaster (4.37:1).

  Jost throughout — no display serif in a form control (SPEC §3).
  Built to work at 390px: one column, 48px+ targets, no horizontal
  scroll.
*/

.bf [hidden] { display: none !important; }

.bf {
  font-family: var(--body);
}

.bf__title {
  font-family: var(--display);
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 12px;
}

.bf__intro {
  color: var(--fg-muted);
  max-width: 54ch;
  margin: 0 0 26px;
}

/* ── the error banner ────────────────────────────────────────────── */
/* role="alert" in the markup, so it is announced. The wording carries
   the meaning on its own; the colour and the bar are decoration. */
.bf__error {
  border: 1px solid #9A2C18;
  border-left-width: 4px;
  background: #F7E0DA;
  color: var(--ink);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  margin: 0 0 22px;
}

/* ── the three steps ─────────────────────────────────────────────── */
.bf__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 26px;
}

.bf__step { margin: 0; }

.bf__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink);
  margin: 0 0 9px;
  padding: 0;
}

/* The step number is a terracotta FILL with #FFF8F2 on it. */
.bf__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--on-terra);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.bf__select {
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: #FFFDFA;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 13px 14px;
  min-height: 52px;
  width: 100%;
  max-width: 420px;
}

.bf__select:disabled {
  background: var(--plaster-2);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.bf__select[aria-invalid="true"] { border-color: #9A2C18; }

.bf__hint,
.bf__smallprint {
  font-size: 15px;
  color: var(--fg-muted);
  margin: 9px 0 0;
  max-width: 54ch;
}

.bf__callout {
  margin: 12px 0 0;
  padding: 13px 15px;
  background: var(--terracotta-wash);
  border: 1px solid #E3C3B6;
  border-radius: var(--radius);
  font-size: 15.5px;
  color: var(--ink);
  max-width: 54ch;
}

/* ── the time list ───────────────────────────────────────────────── */
.bf__fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0; /* a fieldset will not shrink below its content without this */
}

.bf__fieldset > .bf__label { margin-bottom: 9px; }

.bf__times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.bf__times:empty { display: none; margin-top: 0; }

.bf__time { position: relative; }

/* The radio stays in the accessibility tree and keeps keyboard focus —
   it is laid over its own label at zero opacity, not display:none. */
.bf__time-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.bf__time-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 8px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--ink);
  background: #FFFDFA;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.bf__time-input:hover + .bf__time-label { border-color: var(--terracotta); }

.bf__time-input:checked + .bf__time-label {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--on-terra);
}

/* Visible focus ring, drawn on the label because the input is invisible. */
.bf__time-input:focus-visible + .bf__time-label {
  outline: 3px solid var(--terracotta-deep);
  outline-offset: 3px;
}

.bf__fieldset:disabled .bf__time-label {
  opacity: .55;
  cursor: not-allowed;
}

/* ── actions + hand-off ──────────────────────────────────────────── */
.bf__actions { margin-top: 30px; max-width: 420px; }

.bf__submit[disabled] { opacity: .75; cursor: progress; }

.bf__resume {
  padding: 18px 20px;
  background: var(--terracotta-wash);
  border: 1px solid #E3C3B6;
  border-radius: var(--radius);
}

.bf__resume-line {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--ink);
}

.bf__resume-line strong { font-weight: 500; }

.bf__direct {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--sand);
  font-size: 15.5px;
  color: var(--fg-muted);
}

.bf__nojs { margin-bottom: 22px; }

/* ── the plugin widget, once it takes over ───────────────────────── */
/* It lives in the same panel, under the form. A rule above it so the
   two halves read as one flow rather than two forms. */
#coco-res-widget.bf-widget-live {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--sand);
}

@media (max-width: 420px) {
  .bf__times { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
  .bf__actions,
  .bf__select { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bf__time-label { transition: none; }
}
