/* ============================================================
   FORMULAR.CSS - öffentliche Formulare (eigenständig, ohne App-Stile)
   Akzentfarbe kommt aus der ersten Hauptfarbe (Einstellungen → Farben)
   ============================================================ */
@font-face { font-family: "Dosis"; font-weight: 400; src: url("/assets/vendor/pdf-lib/Dosis-400.ttf"); }
@font-face { font-family: "Dosis"; font-weight: 700; src: url("/assets/vendor/pdf-lib/Dosis-700.ttf"); }
:root { --akzent: var(--pal-gold); --akzent-dunkel: var(--pal-senf-dunkel); --ink: var(--neutral-800); --soft: var(--neutral-600); --linie: var(--neutral-200); --flaeche: var(--neutral-50); --fehler: var(--pal-rot); }
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; }
body { font-family: "Dosis", "Trebuchet MS", Arial, sans-serif; color: var(--ink); font-size: 16px; line-height: 1.5; }
.fo { max-width: 720px; margin: 0 auto; padding: 16px; }
.fo-laden { color: var(--soft); }
.fo-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.fo-kopf img { height: 44px; width: auto; }
.fo h1 { font-size: 28px; margin: 0; line-height: 1.2; }
.fo-einleitung { color: var(--soft); margin: 4px 0 18px; white-space: pre-line; }
.fo-block { border: 1px solid var(--linie); border-radius: 12px; padding: 8px 18px 16px; margin: 0 0 18px; background: #fff; min-width: 0; }
.fo-block > legend { padding: 0 8px; margin-left: -4px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--akzent-dunkel); }
.fo-block > h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .5px; color: var(--akzent-dunkel); margin: 0 0 12px; }
.fo-reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.fo-reihe.drei { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.fo-reihe.eins { grid-template-columns: 1fr; }
.fo label.fo-feld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--soft); }
.fo input[type=text], .fo input[type=email], .fo input[type=tel], .fo input[type=number], .fo input[type=date], .fo select, .fo textarea {
  font: inherit; font-weight: 400; color: var(--ink); padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); width: 100%; }
.fo input:focus, .fo select:focus, .fo textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; background: #fff; }
.fo .pflicht::after { content: " *"; color: var(--fehler); }
/* Termine */
.fo-termine { display: grid; gap: 8px; }
.fo-termin { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 8px; cursor: pointer; background: var(--flaeche); }
.fo-termin:has(input:checked) { border-color: var(--akzent); background: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--akzent) 35%, transparent); }
.fo-termin input { margin-top: 4px; accent-color: var(--akzent-dunkel); }
.fo-termin strong { display: block; font-size: 16px; }
.fo-termin small { display: block; color: var(--soft); font-size: 13px; }
.fo-frei { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--pal-anthrazit-hell); color: var(--pal-gruen-dunkel); }
.fo-frei.voll { background: var(--pal-senf-hell); color: var(--pal-gold-dunkel); }
/* Material */
.fo-material { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.fo-mat { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
.fo-mat.gewaehlt { border-color: var(--akzent); background: #fff; }
.fo-mat img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.fo-mat strong { font-size: 16px; }
.fo-mat small { color: var(--soft); font-size: 12px; }
.fo-menge { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.fo-menge button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--linie); background: #fff; font: inherit; font-size: 18px; cursor: pointer; }
.fo-menge input { width: 64px !important; text-align: center; }
/* Checkboxen */
.fo-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 6px 0; cursor: pointer; }
.fo-check input { margin-top: 3px; accent-color: var(--akzent-dunkel); width: 18px; height: 18px; flex: none; }
.fo-tage { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fo a { color: var(--akzent-dunkel); font-weight: 700; }
/* Absenden */
.fo-honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fo-senden { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fo-knopf { font: inherit; font-weight: 700; font-size: 16px; padding: 12px 26px; border: 0; border-radius: 8px; background: var(--akzent); color: var(--neutral-800); cursor: pointer; }
.fo-knopf:disabled { opacity: .55; cursor: wait; }
.fo-schutz { font-size: 12px; color: var(--soft); }
.fo-fehler { color: var(--fehler); font-weight: 700; margin: 8px 0 0; }
.fo-danke { text-align: center; padding: 40px 20px; }
.fo-danke .fo-haken { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--akzent) 25%, #fff); color: var(--akzent-dunkel); font-size: 32px; font-weight: 700; }
.fo-danke p { white-space: pre-line; }
.fo-leer { padding: 16px; border-radius: 8px; background: var(--flaeche); color: var(--soft); }
/* Datenschutz */
.fo-ds { white-space: pre-line; font-size: 14px; }
.fo-ds-fenster { position: fixed; inset: 0; background: color-mix(in srgb, var(--nacht-950) 50%, transparent); display: flex; align-items: flex-start; justify-content: center; padding: 16px; z-index: 10; overflow: auto; }
.fo-ds-fenster > div { background: #fff; border-radius: 12px; padding: 20px 22px; max-width: 680px; width: 100%; }
.fo-ds-fenster h2 { margin: 0 0 4px; font-size: 20px; }
@media (max-width: 560px) {
  .fo-reihe, .fo-reihe.drei { grid-template-columns: 1fr; }
}

/* Auswahlfelder wie die übrigen Felder (eigener Pfeil statt Browser-Standard) */
.fo select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  height: 44px; padding: 10px 40px 10px 12px; line-height: 1.2; cursor: pointer;
  background-color: var(--flaeche);
  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 1.5l5 5 5-5' fill='none' stroke='%235f6670' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
.fo input[type=text], .fo input[type=email], .fo input[type=tel], .fo input[type=number] { height: 44px; }
.fo select:hover { border-color: var(--neutral-300); }
.fo select:focus { background-color: #fff; }
.fo select::-ms-expand { display: none; }

/* Weitere Personen */
.fo-hinweis { margin: -4px 0 12px; font-size: 14px; color: var(--soft); }
.fo-person { position: relative; padding: 12px 44px 0 12px; margin-bottom: 10px; border: 1px dashed var(--linie); border-radius: 8px; background: var(--flaeche); }
.fo-person .fo-reihe { margin-bottom: 12px; }
.fo-person input, .fo-person select { background-color: #fff !important; }
.fo-weg { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--linie); background: #fff;
  font: inherit; font-size: 20px; line-height: 1; color: var(--soft); cursor: pointer; }
.fo-weg:hover { color: var(--fehler); border-color: var(--fehler); }
.fo-knopf-hell { font: inherit; font-weight: 700; font-size: 16px; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--akzent); background: #fff; color: var(--akzent-dunkel); }
.fo-knopf-hell:hover { background: color-mix(in srgb, var(--akzent) 15%, #fff); }
.fo-tage-feld { margin-bottom: 12px; }
.fo-tage-feld > span { display: block; font-size: 13px; font-weight: 700; color: var(--soft); }
.fo-person-tage .fo-tage { margin-top: 4px; }
.fo-check[hidden] { display: none; }

/* Auswahl als Knöpfe: Tage & Schlafplatz */
.fo-tage, .fo-wahl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fo-tage .fo-check, .fo-wahl .fo-check { margin: 0; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche); font-weight: 600; transition: background .15s, border-color .15s; }
.fo-tage .fo-check input, .fo-wahl .fo-check input { margin: 0; }
.fo-tage .fo-check:has(input:checked), .fo-wahl .fo-check:has(input:checked) { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 22%, #fff); }
.fo-person .fo-tage .fo-check { background: #fff; }
.fo-person .fo-tage .fo-check:has(input:checked) { background: color-mix(in srgb, var(--akzent) 22%, #fff); }
.fo-klein { font-size: 13px; margin: 8px 0 0; }
.fo-block > legend + * { margin-top: 6px; }

/* Flyer klein im Termin */
.fo-termin-info { flex: 1; min-width: 0; }
.fo-flyer { position: relative; flex: none; width: 96px; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: var(--flaeche); border: 1px solid var(--linie); box-shadow: 0 2px 8px rgba(0,0,0,.10);
  transition: transform .15s ease; text-decoration: none; opacity: 0; }
.fo-flyer.ist-da { opacity: 1; }
.fo-flyer:hover { transform: scale(1.06); }
.fo-flyer canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.fo-flyer-tipp { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; font-size: 11px; font-weight: 700; text-align: center;
  color: #fff; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s; }
.fo-flyer:hover .fo-flyer-tipp { opacity: 1; }
@media (max-width: 520px) { .fo-flyer { width: 72px; } }

/* Meine Daten: fehlende Angaben markieren (daten.html, 18.10.2026) */
.fo-feld.fo-fehlt input, .fo-feld.fo-fehlt select { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 12%, #fff); }

/* Unterschriftenfeld (Austritt) */
.fo-sig { position: relative; border: 1.5px dashed var(--linie); border-radius: 10px; background: #fff; touch-action: none; }
.fo-sig canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.fo-sig-linie { position: absolute; left: 16px; right: 16px; bottom: 42px; border-bottom: 1px solid var(--linie); pointer-events: none; }
.fo-sig-hinweis { position: absolute; left: 16px; bottom: 14px; font-size: 13px; color: var(--soft); pointer-events: none; }
