/* ==========================================================================
   LORQEN — the booking form (Admin → Booking Form)
   Built 2026-09-20 from the client's prototype, Tasks/lorqen_booking_form.html:
   a single white card, gold section labels over a hairline, two-up rows,
   pill toggles, region chips, round steppers, dashed "fixed value" boxes,
   "+ Add" links and one full-width gold submit.

   Shared by every theme (the markup is the same everywhere), so it reads the
   active theme's tokens — --accent, --text, --line, --font-ui … — and falls
   back to the prototype's own palette where a theme does not define one.
   ========================================================================== */

.bform-section .container { max-width: 820px; }
.bform-section__eyebrow { margin-bottom: var(--sp-5, 1.5rem); }

.bform {
  --bf-gold:    var(--accent, #C9A24B);
  --bf-ink:     var(--text, #15130F);
  --bf-muted:   var(--text-muted, #6B5F4F);
  --bf-border:  var(--line, #DDD5C4);
  --bf-card:    #FFFFFF;
  --bf-field:   #FFFFFF;
  --bf-soft:    #F4EFE4;
  --bf-tint:    #FBF6EA;
  --bf-danger:  #B3261E;
  --bf-radius:  6px;
  --bf-gap:     16px;

  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: var(--bf-card);
  border: 1px solid var(--bf-border);
  border-radius: 10px;
  padding: 36px 40px 40px;
  color: var(--bf-ink);
  font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 30px 60px -45px rgba(21, 19, 15, 0.35);
  text-align: left;
}

.bform *, .bform *::before, .bform *::after { box-sizing: border-box; }
.bform [hidden] { display: none !important; }
.bform button { font: inherit; }

/* -- Head ------------------------------------------------------------------ */
.bform__head { margin-bottom: 24px; }
.bform__title {
  margin: 0 0 6px;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--bf-ink);
}
.bform__intro { margin: 0; font-size: 15px; color: var(--bf-muted); }

.bform__status {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: var(--bf-radius);
  background: #FBEAE8;
  color: var(--bf-danger);
  font-size: 13px;
}

.bform__notice {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-radius: var(--bf-radius);
  background: var(--bf-soft);
  color: var(--bf-muted);
  font-size: 13px;
}

/* -- Groups ---------------------------------------------------------------- */
.bform__group { margin: 0; padding: 0; border: 0; }
.bform__group + .bform__group { margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--bf-border); }
.bform__group-label {
  margin: 0 0 16px;
  font-family: var(--font-ui, inherit);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bf-gold);
}
.bform__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--bf-gap);
  align-items: start;
}
.bform__grid > * { grid-column: 1 / -1; min-width: 0; }
.bform__grid > .bf-field--half { grid-column: auto; }
.bform__prompt { margin: 0 0 16px; font-size: 13px; color: var(--bf-muted); }

/* -- Field ----------------------------------------------------------------- */
.bf-field { margin: 0 0 18px; }
.bf-label {
  display: block;
  margin: 0 0 6px;
  font-family: var(--font-ui, inherit);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bf-ink);
}
.bf-label-note { font-weight: 400; color: var(--bf-muted); }
.bf-label-note:empty { display: none; }
.bf-req { color: var(--bf-danger); display: none; }
.bf-field.is-required .bf-label .bf-req,
.bf-consent .bf-req { display: inline; }

.bf-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bf-ink);
  background: var(--bf-field);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select.bf-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B5F4F' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
textarea.bf-input { min-height: 96px; resize: vertical; }
.bf-input::placeholder { color: #9A8F7F; opacity: 1; }
.bf-input:focus,
.bf-stepper__value:focus,
.bform input[type="checkbox"]:focus-visible,
.bform input[type="radio"]:focus-visible {
  outline: 2px solid var(--bf-gold);
  outline-offset: 1px;
  border-color: var(--bf-gold);
}

.bf-hints { margin-top: 4px; }
.bf-hints:empty { display: none; }
.bf-hint, .bf-option-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--bf-muted); }

.bf-error { margin: 5px 0 0; font-size: 12.5px; color: var(--bf-danger); }
.bf-field.has-error .bf-input,
.bf-field.has-error .bf-toggle,
.bf-field.has-error .bf-chips { border-color: var(--bf-danger); }

/* A value set by the service (e.g. "Drop-off: Adelaide Airport"). */
.bf-fixed {
  padding: 11px 12px;
  background: var(--bf-soft);
  border: 1px dashed var(--bf-border);
  border-radius: var(--bf-radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--bf-ink);
}

/* -- Pill toggles and chips ------------------------------------------------ */
.bf-toggle { display: flex; gap: 10px; flex-wrap: wrap; }
.bf-chips  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bf-pill, .bf-chip {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  background: var(--bf-field);
  font-size: 14px;
  font-weight: 500;
  color: var(--bf-ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.bf-pill input, .bf-chip input, .bf-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--bf-gold);
}
.bf-pill:hover, .bf-chip:hover { border-color: var(--bf-gold); }
.bf-pill.is-checked, .bf-chip.is-checked { border-color: var(--bf-gold); background: var(--bf-tint); }

.bf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--bf-ink);
  cursor: pointer;
}
.bf-check input { margin-top: 3px; }
.bf-check a { color: var(--bf-gold); text-decoration: underline; text-underline-offset: 2px; }

/* -- Steppers -------------------------------------------------------------- */
.bf-stepper { display: inline-flex; align-items: center; gap: 10px; }
.bf-stepper button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--bf-border);
  border-radius: 50%;
  background: var(--bf-field);
  color: var(--bf-ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.bf-stepper button:hover { background: var(--bf-soft); border-color: var(--bf-gold); }
.bf-stepper__value {
  width: 3.2em;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bf-ink);
  font: 600 16px/1 var(--font-ui, inherit);
  text-align: center;
  -moz-appearance: textfield;
}
.bf-stepper__value::-webkit-inner-spin-button,
.bf-stepper__value::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* -- Repeaters (stops, child seats) --------------------------------------- */
.bf-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--bf-gold);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.bf-add:hover { text-decoration: underline; text-underline-offset: 3px; }
.bf-add[disabled] { opacity: 0.4; cursor: not-allowed; text-decoration: none; }

.bf-repeat__rows:not(:empty) { margin: 6px 0 8px; }
.bf-repeat__row { display: grid; gap: 10px; align-items: end; margin-bottom: 12px; }
.bf-repeat__row--stop { grid-template-columns: 1fr 36px; }
.bf-repeat__row--stop .bf-label { margin: 0; }
.bf-repeat__row--stop .bf-label span { display: block; margin-bottom: 6px; }
.bf-repeat__row--seat { grid-template-columns: 1fr auto 36px; align-items: center; }
.bf-remove {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  background: var(--bf-field);
  color: var(--bf-danger);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.bf-repeat__row--stop .bf-remove { margin-bottom: 4px; }
.bf-remove:hover { background: #FBEAE8; }

/* -- Email suggestion ----------------------------------------------------- */
.bf-suggest {
  display: block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bf-gold);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.bf-suggest strong { text-decoration: underline; text-underline-offset: 2px; }

/* -- Consent, captcha, submit -------------------------------------------- */
.bf-consent { margin: 22px 0 16px; padding-top: 22px; border-top: 1px solid var(--bf-border); }
.bf-consent .bf-error { display: none; }
.bf-consent.is-invalid .bf-error { display: block; }
.bf-captcha { margin: 0 0 16px; }

.bform__foot { margin-top: 8px; }
.bform .bform__submit {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 52px;
}
.bform__footnote { margin: 14px 0 0; font-size: 12px; text-align: center; color: var(--bf-muted); }
.bform__footnote a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* -- Phones ---------------------------------------------------------------- */
@media (max-width: 600px) {
  .bform { padding: 24px 18px 28px; border-radius: 8px; }
  .bform__grid > .bf-field--half { grid-column: 1 / -1; }
  /* Two steppers still sit side by side — they are narrow. */
  .bform__grid > .bf-field--stepper.bf-field--half { grid-column: auto; }
  .bf-chips { grid-template-columns: 1fr; }
  .bf-input { font-size: 16px; } /* stops iOS zooming on focus */
  .bf-repeat__row--seat { grid-template-columns: 1fr 36px; }
  .bf-repeat__row--seat .bf-stepper { grid-column: 1; grid-row: 2; }
  .bf-repeat__row--seat .bf-remove { grid-column: 2; grid-row: 1; }
}
