/* Stegemann & Zahlten – Online-Schadenanzeige
   Gemeinsames Stylesheet (Haftpflicht / Hausrat)
   Markenfarbe: #85bc21 (CD). Für Text/Buttons auf Weiß bzw. weißer Text auf
   Grün wird ein abgedunkeltes Grün (--brand-deep) genutzt, um WCAG-AA-Kontrast
   (4,5:1) zu erfüllen – das helle Markengrün bleibt Akzent-/Flächenfarbe. */

:root {
  --brand: #85bc21;        /* Akzent: Rahmen, Fokus, Checkboxen */
  --brand-dark: #6f982d;
  --brand-deep: #4c700b;   /* kontraststark: Buttons, aktive Stepper, Links auf hell */
  --brand-light: #a8d96a;
  --ink: #1f2933;
  --muted: #5d6b7a;        /* etwas dunkler für sicheren Kontrast auf Weiß */
  --line: #d9e3cf;
  --soft: #f5faef;
  --white: #fff;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(31, 41, 51, .10);
  --glow: rgba(76, 112, 11, .32);
  --radius: 20px;
  --page-pad: 22px;     /* äußere Wrap-Polsterung */
  --form-inset: 28px;   /* Innenabstand des Formulars – Header & Hero richten sich daran aus */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--brand-deep); }

.wrap { max-width: 1120px; margin: auto; padding: 0 var(--page-pad); }

/* App-Layout: Schrittleiste & Navigation bleiben immer sichtbar (kein sticky) –
   nur der Feldbereich (.wizard-body) scrollt. */
html, body { height: 100%; }
body:has(.app) { overflow: hidden; }   /* App-Seite: nur der Feldbereich scrollt, nicht die ganze Seite */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.app-main {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding: 16px var(--page-pad) 18px;
}
.wizard { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wizard-top { flex: none; }
.wizard-body { flex: 1; min-height: 0; overflow-y: auto; }
.wizard-nav { flex: none; }

/* Header */
header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  flex: none;
}
.header-steps { border-top: 1px solid var(--line); }   /* feine Haarlinie zwischen Logo-Bereich und Schrittleiste */
.header--solo { border-bottom: 1px solid var(--line); }   /* Header der Danke-Seite (ohne Schrittleiste) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px calc(var(--page-pad) + var(--form-inset));   /* schmaler; Logo am Formular-Inhaltsrand ausrichten */
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-sub {
  font-weight: 700;
  color: var(--brand);            /* Logo-Grün */
  font-size: .95rem;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

/* Runde Icon-Buttons (Telefon, Hinweis) – einheitlicher Stil */
.icon-circle {
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
}
.phone { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.phone:hover { color: var(--brand-deep); }
.badge { width: 26px; height: 26px; font-weight: 800; font-size: 1rem; line-height: 1; }

/* Hero – luftig, Headline auf 2/3 der Breite */
.hero { padding: 44px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;   /* Headline 2/3, Hinweis 1/3 */
  gap: 36px;
  align-items: center;
  padding: 0 calc(var(--page-pad) + var(--form-inset));   /* Headline am Formular-Inhaltsrand ausrichten */
}
h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);   /* ~ +30 % */
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 52ch; margin: 0; }

/* Infokasten – nur hellgrüne Outline + kleines !-Badge */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-dark));   /* grüner Verlauf */
  border: 0;
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 1.05rem;
  color: #fff;
}
.notice strong { display: block; margin-bottom: 6px; }
.notice .badge { background: #fff; color: var(--brand-deep); }   /* auf grünem Grund sichtbar */

/* Schritt-1-Intro: kleines grünes Verlaufs-Label, Headline (2/3) + Hinweis (1/3) */
.step-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
  padding: 26px 28px 10px;
}
.eyebrow-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.step-hero h1 { margin-top: 0; }
.step-hero .lead { margin-bottom: 10px; }

/* Formular */
main { padding: 16px 0 56px; }
form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.form-head {
  padding: 15px 28px;
  /* abgedunkelter Verlauf → weißer Text erfüllt Kontrast für große Schrift */
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-dark));
  color: #fff;
}
.form-head h2 { margin: 0 0 3px; font-size: 1.35rem; }
.form-head p { margin: 0; opacity: .95; font-size: .92rem; }

/* Stepper / Fortschritt */
.stepper {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 9px calc(var(--page-pad) + var(--form-inset)) 12px;
}
.step-dot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .9rem;
  color: var(--muted);
  min-width: 0;
}
.step-dot .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e6efda;
  color: var(--brand-deep);
  font-weight: 800;
  font-size: .9rem;
  flex: none;
}
.step-dot .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-dot.is-active { color: var(--ink); font-weight: 700; }
.step-dot.is-active .num,
.step-dot.is-done .num { background: var(--brand-deep); color: #fff; }
.progress {
  height: 5px;
  background: #e6efda;
  margin: 0;
  overflow: hidden;
}
.progress-bar { height: 100%; width: 25%; background: var(--brand-deep); transition: width .25s ease; }

/* Schritt-Container */
.step { display: none; }
.step.is-active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Statusmeldung */
.status-wrap { padding: 20px 28px 0; }
.status-wrap:empty { display: none; }

/* Feld-Fehlermeldungen (im Corporate Design) */
.field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: .85rem;
  font-weight: 600;
}
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); }
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(180, 35, 24, .15);
}
.choice.is-invalid { border-color: var(--danger); }
.choices.is-invalid .choice { border-color: var(--danger); }
.file-total { margin-top: 10px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.file-total.bad { color: var(--danger); }

fieldset { border: 0; margin: 0; padding: 0 28px 8px; }
.step > fieldset:first-of-type { margin-top: 16px; }
fieldset + fieldset { margin-top: 40px; }   /* viel Abstand zum vorherigen Abschnitt (margin wirkt über der Legend) */
legend { font-weight: 800; font-size: 1.55rem; margin-bottom: 10px; color: #243b17; letter-spacing: -.01em; }   /* eng an den eigenen Feldern */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.full { grid-column: 1 / -1; }
/* PLZ (schmal) + Ort (breit) in einer Zeile, volle Breite des Feldrasters */
.row-plz-ort { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 18px; }
/* Eigenes, linksbündiges Feld auf voller Rasterzeile – Eingabe nur halbe Breite, links ausgerichtet */
.field-left { grid-column: 1 / -1; }
.field-left > input, .field-left > select { max-width: calc(50% - 9px); }

label { display: block; font-weight: 700; margin-bottom: 7px; }
.hint { font-size: .86rem; color: var(--muted); font-weight: 500; margin-top: 5px; }

input, select, textarea {
  width: 100%;
  border: 1px solid #cfd8c4;
  border-radius: 13px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 4px rgba(76, 112, 11, .18);
}
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #e6a9a2; }
textarea { min-height: 128px; resize: vertical; }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice {
  border: 1px solid #d7e2cc;
  border-radius: 13px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}
.choice input { width: auto; accent-color: var(--brand-deep); }

/* Upload */
.upload {
  border: 2px dashed #b9d79a;
  background: var(--soft);
  border-radius: 18px;
  padding: 22px;
  text-align: left;
}
.upload input { background: #fff; margin-top: 12px; }
.upload b { color: var(--brand-deep); }
.file-list { margin-top: 12px; text-align: left; color: var(--muted); font-size: .92rem; }
.file-list ul { margin: 8px 0 0; padding-left: 20px; }
.file-list .bad { color: var(--danger); font-weight: 700; }

/* Navigation / Buttons */
.wizard-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.wizard-nav .right { display: flex; gap: 12px; margin-left: auto; }
button, a.primary {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.primary { background: var(--brand-deep); color: #fff; box-shadow: 0 10px 22px var(--glow); }
.primary:hover { background: #3d5a09; }
.secondary { background: #fff; color: var(--brand-deep); border: 1px solid var(--line); }
.linkbtn { background: none; padding: 13px 8px; color: var(--muted); font-weight: 600; text-decoration: underline; }
button[disabled] { opacity: .6; cursor: progress; }
.required { color: var(--danger); }

footer { padding: 26px 0; color: var(--muted); font-size: .92rem; }

/* Statusmeldungen */
.success, .error { margin: 0; padding: 16px; border-radius: 14px; font-weight: 700; }
.success { border: 1px solid #b7df93; background: #f2fae9; color: #2c5111; }
.error { border: 1px solid #f3b4ad; background: #fff1f0; color: #912018; }
.error ul { margin: 8px 0 0 20px; }

/* Bestätigungs-/Danke-Seite */
.confirm {
  background: transparent;
  padding: 40px clamp(0px, 1vw, 8px) 0;
  max-width: 760px;
  margin: 28px auto 0;
}
.confirm .check { width: 64px; height: 64px; margin-bottom: 22px; }
.confirm .check svg { width: 32px; height: 32px; }
.confirm h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 0 0 14px; }
.confirm .lead { max-width: none; margin-bottom: 26px; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .n {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: #e6efda; color: var(--brand-deep);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.confirm .cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.confirm .cta-link { text-decoration: none; }
a.primary { display: inline-block; text-decoration: none; }

@media (max-width: 820px) {
  .hero-grid, .step-hero, .grid, .grid-3, .row-plz-ort { grid-template-columns: 1fr; }
  .field-left > input, .field-left > select { max-width: 100%; }
  .choices { grid-template-columns: 1fr; }
  .brand-sub { display: none; }       /* schlanker Header mobil – Titel steht im Formularkopf */
  .phone { font-size: .95rem; }
  .step-dot .lbl { display: none; }    /* mobil nur Nummern */
  .stepper { gap: 6px; }
}
