/* DA Elektrotechnik – Notdienst-Formular (ergänzt site.css, nur für /notdienst).
   Gleiche Farben und Schriften wie die Kontaktseite; neu sind nur Fortschrittsanzeige,
   Auswahlkacheln, Foto-Vorschau, Hinweisbox und Preisansicht. */

.nd [hidden] { display: none !important; }
.nd { max-width: 52rem; }

/* ---------- 112-Hinweis und Anruf ---------- */
.nd-112 {
  margin: 0 0 1rem; padding: 0.9rem 1rem;
  border-left: 6px solid var(--rot); background: #fbecec; color: var(--graphit);
  font-size: 1.125rem; line-height: 1.4;
}
.nd-112 strong { font-weight: 600; }
.nd-112__extra { margin: 0.6rem 0 0; max-width: none; font-weight: 600; }
.nd-112--gefahr {
  border-left-width: 10px; padding: 1.25rem 1.25rem;
  background: var(--rot-dunkel); border-color: #6e0a0d; color: var(--weiss);
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.75rem); line-height: 1.25;
}
.nd-112--gefahr strong { font-weight: 700; }
.nd-112--gefahr .nd-112__extra { font-size: 1.1875rem; }
.nd-anruf { margin: 0 0 1.5rem; font-size: 1.125rem; }
.nd-anruf a { font-weight: 600; white-space: nowrap; }
.nd-anruf--klein { font-size: var(--fs-klein); margin: 1rem 0 0; color: var(--grau); }
.nd-ladehinweis { margin: 0 0 1rem; }
.nd-noscript { margin-bottom: 1rem; }
.nd-noscript p { margin: 0; }

/* ---------- Fortschritt ---------- */
.nd-fortschritt {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem;
  counter-reset: none;
}
.nd-fortschritt { scroll-margin-top: calc(var(--kopf-hoehe) + 0.75rem); }
.nd-fortschritt li { margin: 0; display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.6rem; border-top: 4px solid var(--linie); color: var(--grau); font-weight: 500; font-size: var(--fs-klein); line-height: 1.25; }
.nd-fortschritt__nr {
  display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 2px solid currentColor; font-family: var(--schrift-schmal); font-weight: 700; font-size: 1.1rem; line-height: 1;
}
.nd-fortschritt .ist-aktiv { border-top-color: var(--rot); color: var(--graphit); font-weight: 600; }
.nd-fortschritt .ist-aktiv .nd-fortschritt__nr { background: var(--rot); border-color: var(--rot); color: var(--weiss); }
.nd-fortschritt .ist-fertig { border-top-color: var(--graphit); color: var(--graphit); }
.nd-fortschritt .ist-fertig .nd-fortschritt__nr { background: var(--graphit); border-color: var(--graphit); color: var(--weiss); }
.nd-fortschritt .ist-fertig .nd-fortschritt__nr::after { content: ""; }
.nd-fortschritt li { min-width: 0; overflow-wrap: anywhere; }
.nd-voll { display: none; }
@media (min-width: 36rem) {
  .nd-kurz { display: none; }
  .nd-voll { display: inline; }
  .nd-fortschritt li { flex-direction: row; align-items: center; gap: 0.6rem; font-size: 1.0625rem; }
}

/* ---------- Schritte ---------- */
.nd-panel h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem); margin-top: 0; scroll-margin-top: calc(var(--kopf-hoehe) + 1rem); }
.nd-panel h2:focus { outline: none; }
.nd-panel h2:focus-visible { outline: 3px solid var(--rot); outline-offset: 4px; }
.nd .meldung { margin: 0 0 1.25rem; }
.nd .meldung p { margin: 0 0 0.5rem; max-width: none; }
.nd .meldung p:last-child, .nd .meldung ul:last-child { margin-bottom: 0; }
.nd .meldung:focus { outline: 3px solid var(--graphit); outline-offset: 2px; }
.nd-meldung--ok { border-left-color: #2f7d32; background: #eaf4ea; }
.nd-meldung__anruf { font-weight: 600; }
.nd-meldung__anruf a { white-space: nowrap; }
.nd .meldung .knopf { margin-top: 0.75rem; }
.nd-fehlerliste { margin: 0; padding-left: 1.2rem; }
.nd-fehlerliste a { color: var(--graphit); font-weight: 600; }

.nd-feldfehler { margin: 0.35rem 0 0; font-size: var(--fs-klein); font-weight: 600; color: var(--rot-dunkel); max-width: none; }
.nd .feldgruppe input[aria-invalid="true"] { border-color: var(--rot); border-width: 2px; }
.nd .feldgruppe .formular__hinweis { margin-top: 0.3rem; }
.nd .feldgruppe, .nd .nd-gruppe { min-width: 0; }
.nd .formular { gap: 1.25rem 1.25rem; }

.nd-zeile { display: grid; gap: 1.25rem; }
.nd-zeile--strasse { grid-template-columns: minmax(0, 5fr) minmax(0, 2fr); }
.nd-zeile--ort { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 24rem) { .nd-zeile { gap: 0.75rem; } }

/* ---------- Auswahlkacheln ---------- */
.nd-gruppe { border: 0; padding: 0; margin: 0; }
.nd-gruppe legend { font-weight: 600; font-size: 1.0625rem; padding: 0; margin-bottom: 0.5rem; }
.nd-optionen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.nd-optionen--zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 36rem) { .nd-optionen { grid-template-columns: minmax(0, 1fr); } .nd-optionen--zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nd-option {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; padding: 0.6rem 0.9rem;
  border: 2px solid #8f969a; border-radius: 3px; background: var(--weiss); cursor: pointer; line-height: 1.3;
}
.nd-option input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0; accent-color: var(--rot); }
.nd-option:hover { border-color: var(--graphit); }
.nd-option:has(input:checked) { border-color: var(--graphit); background: var(--hell); box-shadow: inset 4px 0 0 var(--rot); font-weight: 600; }
.nd-option:has(input:focus-visible) { outline: 3px solid var(--rot); outline-offset: 2px; }
.nd-option--gefahr:has(input:checked) { border-color: var(--rot-dunkel); background: #fbecec; box-shadow: inset 4px 0 0 var(--rot-dunkel); }

/* ---------- Haken ---------- */
.nd-haken { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; line-height: 1.45; }
.nd-haken input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; accent-color: var(--rot); }
.nd-haken:has(input:focus-visible) { outline: 3px solid var(--rot); outline-offset: 3px; }
.nd-haken--gross { padding: 1rem; border: 2px solid var(--graphit); border-radius: 3px; background: var(--hell); font-weight: 600; margin-bottom: 0.5rem; }

/* ---------- Fotos ---------- */
.nd-fotobereich input[type="file"] { padding: 0.55rem 0.6rem; min-height: 3rem; font-size: 1rem; }
.nd-fotos { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.nd-fotos:empty { display: none; }
.nd-foto { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0.5rem; border: 1px solid var(--linie); border-radius: 3px; background: var(--weiss); }
.nd-foto img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 2px; flex: none; }
.nd-foto__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nd-foto__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-foto__status { font-size: var(--fs-klein); color: var(--grau); }
.nd-foto.ist-fertig .nd-foto__status { color: #2f6b32; }
.nd-foto.ist-fehler { border-color: var(--rot); background: #fbecec; }
.nd-foto.ist-fehler .nd-foto__status { color: var(--rot-dunkel); font-weight: 600; }
.nd-link {
  font: inherit; font-weight: 600; background: none; border: 0; padding: 0.6rem 0.2rem; min-height: 2.75rem;
  color: var(--graphit); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.nd-link:hover { color: var(--rot); }

/* ---------- Absenden ---------- */
.nd-fuss { display: grid; gap: 1rem; margin-top: 0.5rem; }
.nd-knopf-gross { min-height: 3.75rem; padding: 0.9rem 1.6rem; font-size: 1.1875rem; width: 100%; }
@media (min-width: 40rem) { .nd-fuss .nd-knopf-gross, .nd-bestaetigung .nd-knopf-gross { width: auto; justify-self: start; min-width: 22rem; } }
.nd-knopf-gross:disabled, .nd .knopf:disabled { opacity: 0.6; cursor: default; }
.nd .knopf:disabled:hover { background: var(--rot); }
.nd .knopf--rahmen:disabled:hover { background: transparent; color: var(--graphit); }
.nd-fuss .nd-112 { margin: 0; }

/* ---------- Code ---------- */
.nd-code {
  font-family: var(--schrift-schmal); font-weight: 700; font-size: 2.25rem; letter-spacing: 0.35em; text-align: center;
  max-width: 14rem; min-height: 4rem; padding-left: 0.35em;
}
.nd-aktionen { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
@media (max-width: 40rem) { .nd-aktionen .knopf { width: 100%; } }
.nd-nebenaktion { margin: 1rem 0 0; }

/* ---------- Preisansicht ---------- */
.nd-preise { margin-bottom: 1.5rem; }
.nd-preise h3 { font-size: 1.5rem; margin: 2rem 0 0.6rem; }
.nd-preise .nd-preise__zwischentitel { font-size: 1.375rem; }
.nd-preise__hinweis { color: var(--grau); font-size: var(--fs-klein); max-width: none; }
.nd-preis { display: flex; flex-direction: column; line-height: 1.2; }
.nd-preis__brutto { font-family: var(--schrift-schmal); font-weight: 700; font-size: 1.5rem; color: var(--graphit); }
.nd-preis__brutto--gross { font-size: clamp(2.5rem, 2rem + 2.4vw, 3.5rem); line-height: 1.05; }
.nd-preis__netto { font-size: 0.875rem; color: var(--grau); margin-top: 0.15rem; }

.nd-jetzt { margin: 1.25rem 0 0; padding: 1.25rem; border: 3px solid var(--graphit); border-top-width: 8px; border-radius: 3px; background: var(--hell); }
.nd-jetzt .nd-jetzt__titel { margin: 0 0 0.25rem; font-size: 1.5rem; }
.nd-jetzt__zeit { margin: 0 0 1rem; color: var(--grau); }
.nd-jetzt__paar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 30rem) { .nd-jetzt__paar { grid-template-columns: minmax(0, 1fr); } }
.nd-jetzt__wert { display: flex; flex-direction: column; }
.nd-jetzt__name { font-weight: 600; margin-bottom: 0.2rem; }

.nd-tabelle { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.nd-tabelle th, .nd-tabelle td { text-align: left; vertical-align: top; padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--linie); }
.nd-tabelle thead th { font-size: var(--fs-klein); color: var(--grau); font-weight: 600; border-bottom: 2px solid var(--graphit); }
.nd-tabelle tbody th { font-weight: 500; }
.nd-tabelle .ist-jetzt { background: var(--hell); box-shadow: inset 5px 0 0 var(--rot); }
.nd-tabelle .ist-jetzt th { font-weight: 600; }
.nd-marke { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.5rem; background: var(--rot); color: var(--weiss); border-radius: 2px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; vertical-align: 0.1em; }
.nd-tabelle .nd-zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nd-tabelle--beispiel tfoot th, .nd-tabelle--beispiel tfoot td { border-bottom: 0; padding-block: 0.4rem; font-weight: 500; }
.nd-tabelle--beispiel tfoot tr:first-child th, .nd-tabelle--beispiel tfoot tr:first-child td { border-top: 2px solid var(--graphit); padding-top: 0.75rem; }
.nd-tabelle--beispiel .nd-summe th, .nd-tabelle--beispiel .nd-summe td { font-weight: 700; font-size: 1.1875rem; }
.nd-tabelle--beispiel .nd-summe__wert { font-family: var(--schrift-schmal); font-size: 1.75rem; }

@media (max-width: 40rem) {
  .nd-tabelle--stufen thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nd-tabelle--stufen, .nd-tabelle--stufen tbody, .nd-tabelle--stufen tr, .nd-tabelle--stufen th, .nd-tabelle--stufen td { display: block; width: 100%; }
  .nd-tabelle--stufen tr { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--linie); }
  .nd-tabelle--stufen th, .nd-tabelle--stufen td { padding: 0.25rem 0; border: 0; }
  .nd-tabelle--stufen td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
  .nd-tabelle--stufen td::before { content: attr(data-label); font-size: var(--fs-klein); color: var(--grau); font-weight: 600; }
  .nd-tabelle--stufen td .nd-preis { align-items: flex-end; text-align: right; }
  .nd-tabelle--stufen .ist-jetzt { box-shadow: inset 5px 0 0 var(--rot); }
}

@media (max-width: 24rem) {
  .nd-tabelle th, .nd-tabelle td { padding: 0.6rem 0.35rem; }
  .nd-tabelle--beispiel .nd-summe th, .nd-tabelle--beispiel .nd-summe td { font-size: 1.0625rem; }
  .nd-tabelle--beispiel .nd-summe__wert { font-size: 1.375rem; }
}

.nd-liste { margin: 0 0 1rem; }
.nd-liste div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--linie); }
.nd-liste dt { font-weight: 500; }
.nd-liste dd { margin: 0; display: flex; flex-direction: column; align-items: flex-end; }

.nd-bestaetigung { margin-top: 2rem; padding-top: 1.5rem; border-top: 3px solid var(--graphit); }

.nd-danke .einleitung { color: var(--graphit); }

@media (prefers-reduced-motion: reduce) { .nd * { transition: none !important; animation: none !important; } }

@media print { .nd-fortschritt, .nd-fuss .knopf { display: none !important; } }

/* Auf der Notdienst-Seite keine Schnellleiste (sie würde den Absenden-Knopf verdecken und zur normalen Anfrage lenken) */
@media (max-width: 40rem) {
  body:has(.nd) .schnellleiste { display: none; }
  body:has(.nd) { padding-bottom: 0; }
}

/* Hinweis zur Rechnungsstellung (Mieter) */
.nd-hinweisbox { margin: 0 0 0.9rem; padding: 0.8rem 1rem; background: #fff6e0; border-left: 4px solid #d98e04; font-size: var(--fs-klein); max-width: none; }
.nd-rechnungshinweis { font-weight: 600; }

/* Storno-Hinweis in der Preisansicht (Regel: vor der Abfahrt kostenlos) */
.nd-stornohinweis { margin: 0 0 0.9rem; padding: 0.8rem 1rem; background: var(--hell); border-left: 4px solid var(--graphit); max-width: none; }

/* ---------- Stornieren ---------- */
.nd-fortschritt[hidden] { display: none; }
.nd-storno { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--linie); }
.nd-storno__frage { margin-top: 1rem; padding: 1.1rem 1.25rem; border: 2px solid var(--graphit); border-radius: 3px; background: var(--hell); }
.nd-storno__frage[hidden] { display: none; }
.nd-storno__titel { margin: 0 0 0.5rem; font-weight: 600; font-size: 1.1875rem; max-width: none; }
.nd-storno__titel:focus { outline: 3px solid var(--graphit); outline-offset: 2px; }
.nd-storno__regel { margin: 0 0 0.25rem; max-width: none; }
.nd-storno__frage .nd-aktionen { margin-top: 1rem; }
.nd-storno-link .nd-storno__regel { margin-bottom: 0.5rem; }

/* Telefon-Notdienst: die Handynummer aus dem Anruf ist nicht änderbar */
.nd input[readonly] { background: var(--hell); }
