/* ============================================================
   booking.css — styles for the booking form only.
   The site shell (body, headings, .btn, .container, colors)
   is defined in styles.css, which loads before this file.
   Mobile-first. No imports, no external fonts.
   ============================================================ */

.booking {
  /* Scoped tokens. Everything else comes from the global palette. */
  --danger: #9b2c2c;
  --danger-tint: #fdf2f2;
  --field-gap: 1.25rem;

  /* Extra room at the bottom: the booking form is the last thing on the
     page before the footer, so it carries the section spacing itself. */
  padding: 3rem 0 var(--section-y);
  background: var(--cream-50);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ---------- Intro block ---------- */

.booking-intro {
  max-width: 44rem;
  margin: 0 auto 2.25rem;
}

.booking .eyebrow {
  margin: 0 0 .5rem;
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage-600);
}

.booking-title {
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.2;
  color: var(--forest-900);
}

.booking-lede {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}

.booking-notes {
  margin: 0 0 1.25rem;
  padding: 1rem 1.125rem 1rem 2.25rem;
  list-style: disc;
  background: var(--sage-100);
  border-left: 3px solid var(--sage-600);
  border-radius: var(--radius);
  color: var(--ink-muted);
  font-size: .9375rem;
  line-height: 1.65;
}

.booking-notes li + li { margin-top: .375rem; }

.booking-required-note {
  margin: 0;
  font-size: .875rem;
  color: var(--ink-muted);
}

.booking .req {
  color: var(--danger);
  font-weight: 700;
  margin-left: .15em;
}

/* ---------- Form shell ---------- */

.booking-form {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 720px) {
  .booking { padding: 4.5rem 0; }
  .booking-form { padding: 2.25rem 2.5rem; }
}

/* ---------- Field layout ---------- */

.field {
  margin: 0 0 var(--field-gap);
  min-width: 0;
}

/* Fieldsets need their browser defaults stripped before they can be grid items. */
.booking-form .fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--field-gap);
}

/* Two-column row for the short fields; single column under 720px. */
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.5rem;
}

@media (min-width: 720px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.label {
  display: block;
  margin: 0 0 .25rem;
  padding: 0;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--forest-900);
}

/* <legend> inside a reset fieldset */
legend.label { float: none; width: auto; }

.hint {
  margin: 0 0 .5rem;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ---------- Inputs ---------- */

.input {
  display: block;
  width: 100%;
  min-height: 48px;               /* generous touch target */
  padding: .75rem .875rem;
  font-family: var(--font-body);
  font-size: 1rem;                /* 16px keeps iOS from zooming on focus */
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder { color: var(--ink-muted); opacity: .8; }

.input:hover { border-color: var(--sage-600); }

.textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.65;
}

/* Native select arrow is removed by appearance:none, so draw one. */
.select {
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--forest-700) 50%),
    linear-gradient(135deg, var(--forest-700) 50%, transparent 50%);
  background-position:
    right 1.15rem center,
    right .85rem center;
  background-size: .35rem .35rem, .35rem .35rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* ---------- Focus ---------- */

.booking :focus-visible {
  outline: 3px solid var(--gold-600);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.booking .input:focus-visible {
  border-color: var(--gold-600);
  outline-offset: 1px;
}

/* Older browsers with no :focus-visible still get a visible ring. */
.booking .input:focus { border-color: var(--gold-600); }

/* ---------- Invalid state ---------- */

.booking [aria-invalid="true"],
.booking [aria-invalid="true"]:hover {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.booking [aria-invalid="true"]:focus-visible { outline-color: var(--danger); }

.error {
  margin: .375rem 0 0;
  font-size: .875rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--danger);
}

.error:empty { display: none; }

/* ---------- Radio / checkbox cards ---------- */

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}

@media (min-width: 480px) {
  .options { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .options--single { grid-template-columns: 1fr; }
}

.option {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  min-height: 48px;               /* generous touch target */
  padding: .75rem .875rem;
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.45;
  transition: border-color .15s ease, background-color .15s ease;
}

.option:hover { border-color: var(--sage-600); background: var(--sage-100); }

/* The native control stays visible, so the checked state is always clear
   even in browsers without :has() support. */
.option input[type="radio"],
.option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: .125rem 0 0;
  accent-color: var(--forest-700);
  cursor: pointer;
}

.option-text { font-size: .9375rem; color: var(--ink); }

.option--consent { align-items: flex-start; }
.option--consent .option-text { line-height: 1.6; }

/* Progressive enhancement: the whole card reacts to the checked control. */
.option:has(input:checked) {
  border-color: var(--forest-700);
  background: var(--sage-100);
  box-shadow: inset 0 0 0 1px var(--forest-700);
}

.option:has(input:checked) .option-text {
  color: var(--forest-900);
  font-weight: 600;
}

.option:has(input:focus-visible) { border-color: var(--gold-600); }

/* ---------- Honeypot ---------- */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Character counter ---------- */

.char-count {
  margin: .375rem 0 0;
  font-size: .8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.char-count--warn {
  color: var(--danger);
  font-weight: 600;
}

/* ---------- Error summary ---------- */

.error-summary {
  margin: 0 0 1.5rem;
  padding: 1rem 1.125rem;
  background: var(--danger-tint);
  border: 1px solid var(--danger);
  border-left-width: 4px;
  border-radius: var(--radius);
}

.error-summary[hidden] { display: none; }

.error-summary__title {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--danger);
}

.error-summary ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: .9375rem;
  line-height: 1.6;
}

.error-summary li + li { margin-top: .25rem; }

.error-summary a {
  color: var(--danger);
  font-weight: 600;
  text-underline-offset: 2px;
}

/* ---------- Submit ---------- */

.form-actions {
  margin-top: 1.75rem;
  text-align: center;
}

/* Scoped to this one button so the global .btn rules stay untouched. */
#booking-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  min-height: 52px;
  width: 100%;
}

@media (min-width: 560px) {
  #booking-submit { width: auto; min-width: 15rem; }
}

#booking-submit[disabled] {
  opacity: .7;
  cursor: progress;
}

.form-actions__note {
  margin: .875rem 0 0;
  font-size: .875rem;
  color: var(--ink-muted);
}

/* ---------- Spinner ---------- */

.spinner {
  display: none;
  flex: 0 0 auto;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: booking-spin .7s linear infinite;
}

.is-submitting .spinner { display: inline-block; }

@keyframes booking-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; opacity: .85; }
  .input, .option, #booking-submit { transition: none; }
}

/* ---------- Success / error panels ---------- */

.form-status {
  max-width: 44rem;
  margin: 1.5rem auto 0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  line-height: 1.65;
}

.form-status[hidden] { display: none; }

.form-status__title {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
}

.form-status p { margin: 0 0 .5rem; }
.form-status p:last-child { margin-bottom: 0; }

.form-status--success {
  background: var(--sage-100);
  border: 1px solid var(--sage-600);
  border-left: 4px solid var(--forest-700);
  color: var(--ink);
}

.form-status--success .form-status__title { color: var(--forest-900); }

.form-status--error {
  background: var(--danger-tint);
  border: 1px solid var(--danger);
  border-left: 4px solid var(--danger);
  color: var(--ink);
}

.form-status--error .form-status__title { color: var(--danger); }

.form-status__contact {
  margin: .75rem 0 0;
  padding-left: 1.25rem;
}

.form-status__contact li + li { margin-top: .25rem; }

.form-status__contact a {
  color: var(--forest-800);
  font-weight: 600;
  text-underline-offset: 2px;
}

.form-status__contact a:hover { color: var(--gold-700); }

.form-status:focus-visible {
  outline: 3px solid var(--gold-600);
  outline-offset: 3px;
}

/* Decorative accent so the panels read as part of the brand. */
.form-status--success::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-top: 1rem;
  background: var(--gold-400);
}

/* An invalid choice group reads as invalid at the card level too. */
.option:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.fieldset[aria-invalid="true"] .option { border-color: var(--danger); }
