/* TV Veltheim – Formulare. Akzent #B22222, neutral für iframe-Einbettung. */
:root {
  --red: #B22222;
  --red-dark: #8f1b1b;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #d7dbe0;
  --field: #fff;
  --ok: #2f7a3f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: #fff; line-height: 1.5;
  padding: 20px 16px 48px;
}
.wrap { max-width: 620px; margin: 0 auto; }

h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* Fortschritt */
.progress { margin-bottom: 24px; }
.progress-bar { height: 6px; background: #eceef1; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 25%; background: var(--red); border-radius: 3px; transition: width .3s ease; }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.progress-step { font-size: 13px; color: var(--muted); }
.progress-title { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Felder */
.field { margin: 0 0 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .opt { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 11px 12px; outline: 0;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(178,34,34,.12); }
textarea { resize: vertical; min-height: 80px; }
.two { display: flex; gap: 12px; }
.two .field { flex: 1; }
.two .field.plz { flex: 0 0 34%; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-error { color: var(--red); font-size: 12.5px; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select, .field.invalid .radios { border-color: var(--red); }
.field.invalid .field-error { display: block; }

/* Riege / Radio-Segmente */
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios.seg { display: grid; grid-template-columns: repeat(2, 1fr); }
.radios label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font-size: 14px; }
.radios input { accent-color: var(--red); }
.radios label:has(input:checked) { border-color: var(--red); background: rgba(178,34,34,.05); }

.consent { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.consent p { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.consent .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.consent .check input { margin-top: 3px; accent-color: var(--red); }

/* Unterschrift */
.sig-box { border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fcfcfd; }
.sig-canvas { display: block; width: 100%; height: 170px; touch-action: none; border-radius: var(--radius); }
.sig-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sig-row .hint { margin: 0; }
.link-btn { background: none; border: 0; color: var(--red); font: inherit; font-size: 13px; cursor: pointer; padding: 4px; }

/* Buttons / Navigation */
.nav { display: flex; gap: 10px; margin-top: 22px; }
.btn { font: inherit; font-size: 15px; font-weight: 600; border-radius: var(--radius); padding: 13px 18px;
  cursor: pointer; border: 1.5px solid transparent; }
.btn-primary { background: var(--red); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { background: #c9a0a0; cursor: default; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }

/* Honeypot – unsichtbar für Menschen */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Erfolg / Fehler */
.done { text-align: center; padding: 30px 10px; }
.done .mark { width: 54px; height: 54px; border-radius: 50%; background: var(--ok); color: #fff;
  display: grid; place-items: center; margin: 0 auto 14px; font-size: 30px; }
.done h2 { margin: 0 0 6px; font-size: 20px; }
.done p { color: var(--muted); font-size: 14px; margin: 0; }
.form-msg { color: var(--red); font-size: 13.5px; margin-top: 14px; text-align: center; min-height: 18px; }

.step { display: none; }
.step.active { display: block; }

/* Mobile */
@media (max-width: 480px) {
  body { padding: 16px 12px 40px; }
  .two { flex-direction: column; gap: 0; }
  .two .field.plz { flex: unset; }
  .radios.seg { grid-template-columns: 1fr; }
}
