/* Consume the existing Aarhus Foodtruck / Bricks design tokens.
   Poppins is the site's existing heading font; body text inherits DM Sans. */
.aftf {
  width: 100%; min-width: 0; margin: 0; display: block;
  color: var(--dark); font-family: inherit; font-size: var(--text-m);
  font-weight: 500; line-height: 1.5; text-align: left;
  container: aftf / inline-size;
}
.aftf *, .aftf *::before, .aftf *::after { box-sizing: border-box; }
/* Keep resets less specific than component rules, especially button weight. */
.aftf :where(button, input, select, textarea) { font: inherit; letter-spacing: normal; }
.aftf button { cursor: pointer; text-transform: none; }
.aftf button:disabled { cursor: default; }
.aftf a { color: var(--primary); }
.aftf-card { padding: var(--card-padding); background: var(--off-white); border: 1px solid var(--light-grey); border-radius: var(--radius-l); min-width: 0; }
.aftf-progress { display: flex; list-style: none; gap: var(--space-xs); margin: 0 0 var(--space-s); padding: 0; }
.aftf-progress li { flex: 1; min-width: 0; margin: 0; }
.aftf-progress button {
  display: flex; align-items: center; gap: var(--space-2xs); width: 100%; min-height: 44px;
  padding: 0 0 var(--space-2xs); border: 0; border-bottom: 3px solid var(--light-grey);
  background: transparent; color: var(--dark-grey); font-size: var(--text-m); font-weight: 700; text-align: left;
}
.aftf-step-number { font-size: var(--text-s); font-weight: 700; color: var(--grey); }
.aftf-step-number::before { content: '0'; }
.aftf-progress button[aria-current=step] { border-color: var(--primary); color: var(--primary); }
.aftf-progress button[aria-current=step] .aftf-step-number { color: var(--primary); }
.aftf-progress button.is-done { border-color: var(--primary-t-4); }
.aftf-form { display: block; margin: 0; }
/* Shared grid track reserves only the tallest compact panel, never a fixed blank height. */
.aftf-panels { display: grid; align-items: stretch; }
.aftf-panel { grid-area: 1/1; min-width: 0; visibility: hidden; pointer-events: none; opacity: 0; }
.aftf-panel.is-active { visibility: visible; pointer-events: auto; opacity: 1; transition: opacity .14s ease; }
.aftf-panel-head { margin: 0 0 var(--space-s); }
.aftf-panel h3 { font-family: Poppins, sans-serif; color: var(--dark); font-size: var(--text-xl); font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -.025em; }
.aftf-panel h3:focus { outline: none; }
.aftf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-s); }
.aftf-field { grid-column: 1/-1; min-width: 0; position: relative; }
.aftf-field--half { grid-column: auto; }
.aftf-field > label { display: flex; align-items: baseline; gap: .25em; color: var(--dark); font-size: var(--text-m); font-weight: 700; line-height: 1.3; margin: 0 0 var(--space-2xs); padding: 0; text-transform: none; }
.aftf-optional { font-size: var(--text-s); color: var(--grey); font-weight: 500; margin-left: auto; }
.aftf-required { color: var(--primary); }
.aftf-field input, .aftf-field select, .aftf-field textarea {
  display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 48px;
  padding: var(--space-2xs) var(--space-xs); margin: 0;
  background: var(--light); color: var(--dark); border: 1px solid var(--light-grey); border-radius: var(--radius-s);
  font-size: max(16px, var(--text-m)); font-weight: 500; line-height: 1.5; box-shadow: none;
  transition: border-color .12s, box-shadow .12s;
}
.aftf-field select { appearance: auto; }
.aftf-field textarea { height: 76px; resize: none; }
.aftf-field input::placeholder, .aftf-field textarea::placeholder { color: var(--grey); font-weight: 500; opacity: 1; }
.aftf-field input:focus, .aftf-field select:focus, .aftf-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-t-1); }
.aftf-field [aria-invalid=true] { border-color: var(--bricks-text-danger); }
/* Detailed errors remain associated with each field for assistive technology.
   The first invalid field and its message appear in the shared visible status. */
.aftf-error, .aftf-honeypot, .aftf-sr { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; }
.aftf-tip, .aftf-privacy { color: var(--dark-grey); font-size: var(--text-s); font-weight: 500; line-height: 1.5; margin: var(--space-xs) 0 0; }
.aftf-privacy a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.aftf-status { display: flex; align-items: center; min-height: 2.8em; margin: var(--space-3xs) 0; padding: 0; font-size: var(--text-s); font-weight: 600; line-height: 1.4; color: color-mix(in srgb, var(--bricks-text-danger) 65%, var(--dark)); }
.aftf-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); padding-top: var(--space-xs); border-top: 1px solid var(--light-grey); }
.aftf-back { flex: none; min-height: 48px; padding: var(--space-2xs) 0; border: 0; background: transparent; color: var(--dark-grey); font-size: var(--text-m); font-weight: 700; }
.aftf-back[aria-hidden=true] { visibility: hidden; pointer-events: none; }
.aftf-next { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); min-height: 50px; padding: var(--space-2xs) var(--space-m); border: 1px solid var(--primary); border-radius: var(--radius-full); background: var(--primary); color: var(--light); font-size: var(--text-m); font-weight: 700; line-height: 1.5; box-shadow: none; }
.aftf-next:hover { background: var(--primary-d-1); border-color: var(--primary-d-1); }
.aftf-next:disabled { opacity: .65; }
.aftf-next > span:last-child { font-size: 1.3em; line-height: 1; }
.aftf-success { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-s); text-align: center; }
.aftf-success-icon { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: var(--radius-full); background: var(--primary-t-1); color: var(--primary); font-size: var(--text-2xl); }
.aftf-success p { color: var(--dark-grey); font-size: var(--text-m); margin: 0; }
.aftf-success a { font-size: var(--text-s); text-underline-offset: 3px; }
.aftf.is-sent .aftf-actions, .aftf.is-sent .aftf-status { visibility: hidden; }
.aftf :focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
@container aftf (max-width: 500px) {
  .aftf-card { padding: var(--space-s); border-radius: var(--radius-m); }
  .aftf-progress button { flex-direction: column; align-items: flex-start; font-size: max(13px, var(--text-s)); gap: .1em; }
  .aftf-fields { gap: var(--space-xs); }
  .aftf-field--half:is([data-field=occasion], [data-field=datetime], [data-field=serving], [data-field=concept], [data-field=email], [data-field=phone]) { grid-column: 1/-1; }
  .aftf-field > label { font-size: max(14px, var(--text-m)); }
  .aftf-field--half[data-field=company] .aftf-optional { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .aftf-next { gap: var(--space-s); padding-inline: var(--space-s); }
}
@container aftf (max-width: 330px) {
  .aftf-progress { gap: var(--space-2xs); }
  .aftf-progress button { flex-direction: column; align-items: flex-start; font-size: max(12px, var(--text-s)); gap: .1em; }
  .aftf-next { gap: var(--space-xs); padding-inline: var(--space-xs); }
}
@media (prefers-reduced-motion: reduce) { .aftf * { transition: none !important; animation: none !important; } }
