/* ==========================================================================
   booking-form.css — additions for the rebuilt pitch booking form:
   the month <-> day-hours zoom, the phone country-code field, and the
   checkbox/radio question groups (player age ranges, gender, audience).

   Loaded after theme.css (see Stadium/Calendar.blade.php's @section('head')),
   purely additive to the base design system in tokens/base/components/pages
   .css -- nothing here overrides those files, it only adds new components
   built from their tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Month <-> day zoom

   Both panels occupy the same grid cell, so the container's height is
   simply the taller of whichever panel(s) are currently unhidden -- no JS
   height measuring needed. The "month recedes" panel scales down and fades;
   the panel taking the stage scales down FROM slightly larger than life,
   reading as it settling into place rather than merely appearing.
   -------------------------------------------------------------------------- */
.cal-zoom {
  display: grid;
}
.cal-zoom__panel {
  grid-area: 1 / 1;
  min-inline-size: 0;
  transition: opacity var(--d-move) var(--e-out), transform var(--d-move) var(--e-out);
}
.cal-zoom[data-view="month"] .cal-zoom__panel--day {
  opacity: 0;
  transform: scale(.96);
  pointer-events: none;
}
.cal-zoom[data-view="day"] .cal-zoom__panel--month {
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .cal-zoom__panel { transition: none; transform: none; }
}

.cal-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: none;
  border: 0;
  padding: var(--s-2) 0;
  color: var(--chalk-dim);
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--d-quick) var(--e-out);
}
.cal-back:hover, .cal-back:focus-visible { color: var(--sodium); }
.cal-back svg { flex: none; }
:dir(rtl) .cal-back svg { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   Phone: country-code select + local-number input, one visual field
   -------------------------------------------------------------------------- */
.phone-field {
  display: flex;
  gap: var(--s-2);
}
.phone-field__code {
  flex: 0 0 6.25rem;
  padding-inline-start: var(--s-3);
  padding-inline-end: var(--s-6);
  min-inline-size: 0;
}
.phone-field__number {
  flex: 1 1 auto;
  min-inline-size: 0;
  direction: ltr;
  text-align: start;
}
/* components.css only reddens .input on .field.is-invalid; the phone field's
   select half needs the same cue since together they're one visual field. */
.field.is-invalid .phone-field__code,
.field.is-invalid .phone-field__number {
  border-color: var(--busy);
}

/* --------------------------------------------------------------------------
   Checkbox / radio question groups (age ranges, gender, audience)

   Each option is a bordered chip built from the existing .check component
   rather than a bare stacked list -- large enough to tap accurately on a
   360px phone, and the border makes the checked state visible at a glance
   instead of relying on the native control's small tick alone.
   -------------------------------------------------------------------------- */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.choice-group .check {
  flex: 1 1 auto;
  min-inline-size: 8rem;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border: var(--line) solid var(--hairline);
  border-radius: var(--r-2);
  background: var(--night-2);
  transition: border-color var(--d-quick) var(--e-out), background var(--d-quick) var(--e-out);
}
.choice-group .check:hover { border-color: var(--turf-bright); }
.choice-group .check:has(:checked) {
  border-color: var(--sodium);
  background: var(--night-3);
  color: var(--chalk);
}
.choice-group .check:has(:focus-visible) {
  outline: 2px solid var(--sodium);
  outline-offset: 2px;
}
