/* Zur Alten Ziegelhütte – request form, thank-you page and phone page (/reservieren.php, /anfrage.php).
   Sits on top of the site's own assets/css/site.css (.band, .wrap, .formular, .ruf, .weg). The
   site's colours are not known here, so every box this file draws brings its own background
   AND text colour (palette "Kalk / Schiefer / Ziegel", contrast noted per pair) and reads on a
   light or a dark page. Plain form-control defaults sit inside :where() (specificity 0): when
   site.css styles .formular inputs, the site wins.
   One column, 320 px without horizontal scroll, targets >= 44 px, errors in text + sign
   (never colour alone), no animation. No url() to another host, no @import. */

.anfrage {
  --az-kalk: #F4F1EA;
  --az-schiefer: #23282D;
  --az-ziegel: #9A3A22;          /* on --az-fehler-grund 5.8:1, white on it 7.0:1 */
  --az-fehler-grund: #F8E6E0;    /* --az-schiefer on it 12.3:1 */
  --az-lehm: #E6B76F;            /* --az-schiefer on it 8.1:1 */
  --az-feldrand: #6E757B;        /* 4.7:1 on white */
  padding-block: var(--pad-s, 2.5rem) var(--pad-m, 3.5rem);
}
.anfrage__in { max-width: 42rem; }
.anfrage__in > * + * { margin-top: 1.25rem; }
.anfrage h1 { overflow-wrap: anywhere; hyphens: auto; }

/* plain defaults (specificity 0: site.css wins wherever it styles these) */
:where(.anfrage) :where(.formular) { display: grid; gap: 1.1rem; }
:where(.anfrage) :where(.formular__feld) { display: grid; gap: .35rem; }
:where(.anfrage) :where(.formular__paar) { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
:where(.anfrage) :where(label) { font-weight: 600; }
:where(.anfrage) :where(input, select, textarea) {
  font: inherit; min-height: 48px; padding: .55rem .7rem; border: 1px solid var(--az-feldrand);
  border-radius: 4px; background: #fff; color: var(--az-schiefer); width: 100%;
}
:where(.anfrage) :where(.formular__hinweis, .formular__frei) { font-weight: 400; font-size: .95em; }
:where(.anfrage) :where(button[type="submit"], .ruf) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .6rem 1.4rem;
  border: 0; border-radius: 6px; background: var(--az-ziegel); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}

/* phone box, always next to the form */
.anfrage__telefon { padding: 0.9rem 1rem; border: 1px solid currentColor; border-radius: 4px; }
.anfrage__telefon p { margin: 0; }
.anfrage__telefon p + p { margin-top: 0.35rem; }
.anfrage__nummer {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 1.2em;
  font-variant-numeric: lining-nums tabular-nums; white-space: nowrap;
}

/* demo banner: its own colours, readable on any page */
.anfrage__demo {
  border: 2px dashed var(--az-schiefer); padding: 0.65rem 0.8rem;
  background: var(--az-lehm); color: var(--az-schiefer); font-weight: 600;
}
.anfrage__demo a { color: var(--az-schiefer); }

/* error summary and the offline line: own colours, 2px border, the sign and the words carry the meaning */
.anfrage__fehler, .anfrage__offline {
  padding: 0.9rem 1rem; border: 2px solid var(--az-ziegel); border-radius: 4px;
  background: var(--az-fehler-grund); color: var(--az-schiefer);
}
.anfrage__fehler:focus { outline: 3px solid var(--az-ziegel); outline-offset: 3px; }
.anfrage__fehlertitel { font-size: 1.2em; margin: 0; color: var(--az-schiefer); }
.anfrage__fehler ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.anfrage__fehler li + li { margin-top: 0.35rem; }
.anfrage__fehler a, .anfrage__offline a { color: var(--az-ziegel); }
.anfrage__fehler a { display: inline-block; min-height: 44px; padding-block: 0.6rem; font-weight: 600; }

/* one field's message: sign + bold text */
.anfrage__feldfehler { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0; font-weight: 700; line-height: 1.35; }
.anfrage__zeichen {
  flex: none; display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; margin-top: 0.05em;
  border-radius: 50%; background: var(--az-ziegel); color: #fff;
  font-weight: 700; font-size: 0.85em; line-height: 1;
}
.anfrage .formular [aria-invalid="true"] { border: 2px solid var(--az-ziegel); }

/* form */
.anfrage__form { max-width: none; }
/* WebKit sizes an implicit grid column to a select's longest option ("Tisch (auch für Gruppen)",
   "egal / nach Absprache"), which pushed the page sideways at 200 % text: pin the tracks. */
.anfrage .formular, .anfrage .formular__feld { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 35.99em) { .anfrage .formular__paar { grid-template-columns: minmax(0, 1fr); } }
/* WebKit paints a long selected option past the select's own box (page scrolls sideways at
   200 % text); paint containment keeps it inside the box, the focus outline still shows. */
.anfrage .formular select { contain: paint; }
.anfrage .formular input, .anfrage .formular select, .anfrage .formular textarea { display: block; min-width: 0; max-width: 100%; }
.anfrage .formular input[type="date"] { -webkit-appearance: none; appearance: none; min-height: 48px; color-scheme: light; }
.anfrage__falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.anfrage__keine { font-weight: 700; }
.anfrage__offline { margin: 0; font-weight: 700; }
.anfrage__offline[hidden] { display: none; }
.anfrage__senden { min-height: 56px; padding-inline: 1.6rem; }
.anfrage__senden[disabled] { opacity: 0.75; cursor: progress; }
@media (max-width: 30em) { .anfrage__senden { width: 100%; justify-self: stretch; } }

/* closed-days line above the date (US5): own colours */
.anfrage__sperr {
  margin: 0; padding: 0.6rem 0.8rem; border: 1px solid var(--az-ziegel); border-radius: 4px;
  background: var(--az-kalk); color: var(--az-schiefer); font-weight: 600;
}

/* thank-you and phone page */
.anfrage__zusammenfassung { font-size: 1.2em; font-weight: 600; overflow-wrap: anywhere; }
.anfrage__gross { font-size: 1.45em; line-height: 1.25; }
.anfrage__viele { font-weight: 700; }
.anfrage__anruf { margin-top: 1.5rem; }
.anfrage__ruf { min-height: 56px; font-size: 1.2em; justify-content: center; }
@media (max-width: 30em) { .anfrage__ruf { display: flex; width: 100%; } }

/* visible keyboard focus on everything this file styles */
.anfrage a:focus-visible, .anfrage button:focus-visible, .anfrage input:focus-visible,
.anfrage select:focus-visible, .anfrage textarea:focus-visible { outline: 3px solid var(--az-ziegel); outline-offset: 2px; }
/* Chromium's calendar icon is a 4th tab stop of the date field where :focus-visible does not match:
   keep the same outline on the whole field (a11y review 2026-10-04) */
.anfrage .formular input[type="date"]:focus { outline: 3px solid var(--az-ziegel); outline-offset: 2px; }
/* a field reached with Tab never ends up half under the fixed call bar on a phone (WCAG 2.4.11) */
.anfrage textarea, .anfrage input, .anfrage select { scroll-margin-bottom: calc(var(--ruf-h, 3.5rem) + 1.5rem); }

/* built-in frame (only when the site's reservieren.html is missing) */
.anfrage-rahmen { padding: 1rem 0; border-bottom: 1px solid currentColor; }

@media (prefers-reduced-motion: reduce) {
  .anfrage *, .anfrage *::before, .anfrage *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .anfrage__zeichen { forced-color-adjust: none; border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
  .anfrage__fehler, .anfrage__offline, .anfrage__sperr, .anfrage__demo { border: 2px solid CanvasText; }
}
