/* fabparts Kundenseite (Task 10). Muster fabcard/public/css/stil.css fuer die
   Font-Face-Deklaration (selbst gehostete Manrope-Variable-Font, KEIN CDN); alles
   Weitere ist ein eigenes, bewusst schlichtes Design (weiss, Akzent #1f6feb),
   mobile-first, max-width 960px. */

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
}

[hidden] { display: none !important; }

:root {
  --tinte: #1c2129;
  --tinte-soft: #5c6270;
  --papier: #ffffff;
  --hintergrund: #f7f8fa;
  --linie: #e2e5ea;
  --akzent: #1f6feb;
  --akzent-dunkel: #14509c;
  --akzent-hell: #eaf1fe;
  --gruen: #2f8f5b;
  --gruen-hell: #e9f6ee;
  --gelb: #a5780f;
  --gelb-hell: #fbf3e0;
  --rot: #b3402c;
  --rot-hell: #fbeae6;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--tinte);
  background: var(--hintergrund);
  line-height: 1.5;
}

a { color: var(--akzent); }

.rahmen { max-width: 960px; margin: 0 auto; padding: 0 1.1rem; }

header.kopf {
  background: var(--papier);
  border-bottom: 1px solid var(--linie);
}
header.kopf .rahmen {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
header.kopf .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--tinte);
  text-decoration: none;
}
header.kopf .logo b { color: var(--akzent); }
header.kopf .claim {
  color: var(--tinte-soft);
  font-size: 0.85rem;
  margin-left: auto;
}

main.rahmen { padding-top: 1.6rem; padding-bottom: 3rem; }

h1 { font-size: 1.5rem; margin: 0 0 0.3rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 0.7rem; }
.einleitung { color: var(--tinte-soft); margin: 0 0 1.4rem; max-width: 60ch; }

section.karte {
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.2rem;
}

/* Dropzone */
#dropzone {
  border: 2px dashed var(--linie);
  border-radius: var(--radius);
  padding: 2.2rem 1.2rem;
  text-align: center;
  cursor: pointer;
  background: var(--hintergrund);
  transition: border-color 0.15s ease, background 0.15s ease;
}
#dropzone:hover,
#dropzone:focus-visible {
  border-color: var(--akzent);
  background: var(--akzent-hell);
  outline: none;
}
#dropzone.ueber-zone { border-color: var(--akzent); background: var(--akzent-hell); }
#dropzone .dropzone-titel { font-weight: 700; margin: 0 0 0.3rem; }
#dropzone .hinweis { color: var(--tinte-soft); font-size: 0.85rem; margin: 0.2rem 0 0; }
#dropzone svg { width: 2.2rem; height: 2.2rem; color: var(--akzent); margin-bottom: 0.6rem; }

#datei-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}
#datei-info .datei-name { font-weight: 700; word-break: break-word; }
#datei-wechseln { font-size: 0.82rem; }

#fortschritt-wrap {
  margin-top: 0.9rem;
  height: 8px;
  border-radius: 999px;
  background: var(--linie);
  overflow: hidden;
}
#fortschritt-balken {
  height: 100%;
  width: 0%;
  background: var(--akzent);
  transition: width 0.15s ease;
}

/* Ampel */
#ampel {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
#ampel .ampel-punkt {
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  margin-top: 0.2rem;
}
#ampel .ampel-hinweise { margin: 0.2rem 0 0; padding-left: 1.1rem; }
#ampel.gruen { background: var(--gruen-hell); color: #1e5c39; }
#ampel.gruen .ampel-punkt { background: var(--gruen); }
#ampel.gelb { background: var(--gelb-hell); color: #6f5108; }
#ampel.gelb .ampel-punkt { background: var(--gelb); }
#ampel.rot { background: var(--rot-hell); color: #7a2b1c; }
#ampel.rot .ampel-punkt { background: var(--rot); }
#ampel.unbekannt { background: var(--hintergrund); color: var(--tinte-soft); }
#ampel.unbekannt .ampel-punkt { background: var(--linie); }

.druckreif-platzhalter {
  margin-top: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  background: var(--papier);
  border: 1px solid var(--linie);
  font-size: 0.85rem;
  color: var(--tinte-soft);
}

/* Konfigurator */
.feld { margin-bottom: 1rem; }
.feld label, .feld > span.feld-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
select, input[type=number], input[type=email], input[type=text] {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.5rem 0.65rem;
  border: 1.5px solid var(--linie);
  border-radius: 8px;
  background: var(--papier);
  color: var(--tinte);
  width: 100%;
  max-width: 22rem;
}
select:focus-visible, input:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
}

.zwei-spalten {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}
@media (min-width: 560px) {
  .zwei-spalten { grid-template-columns: 1fr 1fr; }
}

#farbchips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.farbchip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border: 1.5px solid var(--linie);
  border-radius: 999px;
  background: var(--papier);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--tinte);
}
.farbchip .farbchip-muster {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex: none;
}
.farbchip[aria-pressed="true"] {
  border-color: var(--akzent);
  background: var(--akzent-hell);
  font-weight: 700;
}
.farbchip:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

.preset-karten {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}
@media (min-width: 560px) {
  .preset-karten { grid-template-columns: 1fr 1fr; }
}
.preset-karte {
  text-align: left;
  border: 1.5px solid var(--linie);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  background: var(--papier);
  cursor: pointer;
  font: inherit;
  color: var(--tinte);
}
.preset-karte .preset-titel { font-weight: 800; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.4rem; }
.preset-karte .preset-text { margin: 0; font-size: 0.85rem; color: var(--tinte-soft); }
.preset-karte .preset-badge {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gelb);
  background: var(--gelb-hell);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.preset-karte[aria-pressed="true"] {
  border-color: var(--akzent);
  background: var(--akzent-hell);
  box-shadow: 0 0 0 1px var(--akzent) inset;
}

details#profi-einstellungen {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.2rem;
  background: var(--hintergrund);
}
details#profi-einstellungen summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}
details#profi-einstellungen[open] summary { margin-bottom: 0.7rem; }

table.staffel-hinweis,
table.preset-detail-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
}
table.staffel-hinweis caption,
table.preset-detail-tabelle caption {
  text-align: left;
  caption-side: top;
  color: var(--tinte-soft);
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}
table.staffel-hinweis th, table.staffel-hinweis td,
table.preset-detail-tabelle th, table.preset-detail-tabelle td {
  border: 1px solid var(--linie);
  padding: 0.4rem 0.6rem;
  text-align: center;
}
table.staffel-hinweis th, table.preset-detail-tabelle th { background: var(--hintergrund); }
table.preset-detail-tabelle td:first-child,
table.preset-detail-tabelle th[scope="row"] { text-align: left; }

p.hinweis { color: var(--tinte-soft); font-size: 0.85rem; }

#schaetzung-bereich {
  border-top: 1px dashed var(--linie);
  padding-top: 1rem;
  margin-top: 0.4rem;
}
#schaetzung-text { font-size: 1.35rem; font-weight: 800; margin: 0 0 0.2rem; }
p.pangv { color: var(--tinte-soft); font-size: 0.78rem; margin: 0 0 0.9rem; }
p.lieferzeit { font-size: 0.85rem; color: var(--tinte-soft); margin: 0 0 1rem; }

button.knopf {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid var(--akzent);
  background: var(--akzent);
  color: #fff;
  cursor: pointer;
}
button.knopf:hover:not(:disabled) { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
button.knopf:disabled { opacity: 0.5; cursor: not-allowed; }
button.knopf:focus-visible { outline: 2px solid var(--akzent-dunkel); outline-offset: 2px; }

.fehler-box {
  background: var(--rot-hell);
  color: #7a2b1c;
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.fehler-box p { margin: 0 0 0.5rem; }
.fehler-box button.knopf-sekundaer { font-size: 0.85rem; padding: 0.4rem 0.9rem; }

/* Task 11: Preset-Vergleichslink + ca.-Spanne je Preset-Karte */
button.link-knopf {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--akzent);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  margin: -0.3rem 0 1rem;
}
button.link-knopf:hover { text-decoration: underline; }
button.link-knopf:disabled { opacity: 0.5; cursor: not-allowed; text-decoration: none; }
.preset-karte .preset-vergleich-preis {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--akzent-dunkel);
}

/* Task 11: Lauf-Zeile (Sekundenzaehler/Etappentext) + Preis-per-Mail-Zeile */
#preis-lauf-zeile { margin-bottom: 1rem; }
#preis-lauf-status { margin: 0.4rem 0 0; }
#preis-mail-zeile { margin-bottom: 1rem; }
#preis-mail-zeile > label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.preis-mail-feld {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.preis-mail-feld input[type=email] { max-width: 18rem; flex: 1 1 12rem; }
button.knopf-sekundaer {
  background: transparent;
  color: var(--akzent);
  border-color: var(--akzent);
}
button.knopf-sekundaer:hover:not(:disabled) { background: var(--akzent-hell); }
#preis-mail-status { margin: 0.4rem 0 0; }

/* Task 11: Preis-Kasten (exakter Preis, nach POST /angebot/:id/preis) */
#preis-kasten {
  border: 1.5px solid var(--linie);
  border-radius: var(--radius);
  background: var(--hintergrund);
  padding: 0.9rem 1rem;
  margin-top: 0.5rem;
}
.preis-kasten-zeile {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
}
.preis-kasten-zeile.preis-kasten-gesamt {
  font-weight: 800;
  font-size: 1.1rem;
  border-top: 1px dashed var(--linie);
  padding-top: 0.5rem;
  margin-top: 0.3rem;
}
#preis-kasten .pangv { margin: 0.2rem 0 0.8rem; }

footer.fuss {
  border-top: 1px solid var(--linie);
  color: var(--tinte-soft);
  font-size: 0.8rem;
  padding: 1.4rem 0;
}
footer.fuss .rahmen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  justify-content: space-between;
}
footer.fuss a { color: var(--tinte-soft); }

/* Task 14: Rechtsseiten-Verlinkung im Footer aller Kundenseiten. */
.fuss-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Task 12: Warenkorb-/Bestelluebersicht-Zeilen (public/warenkorb.html,
   public/bestellen.html) -- je Position Dateiname+Konfiguration links, Preis
   (+ optional Entfernen-Knopf) rechts. */
.warenkorb-zeile {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--linie);
}
.warenkorb-zeile:last-child { border-bottom: none; }
.warenkorb-dateiname { font-weight: 700; margin: 0 0 0.2rem; word-break: break-word; }
.warenkorb-zeile p.hinweis { margin: 0; }
.warenkorb-zeile-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex: none;
  text-align: right;
}
.warenkorb-preis { font-weight: 700; white-space: nowrap; }

/* Task 12: Kundenformular (public/bestellen.html), Muster fabcard bestellen.html */
.kunden-formular .zwei-spalten-schmal {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0 0.8rem;
}

/* Task 12: die drei § 312j-Zustimmungs-Checkboxen (EXAKTE Kundentexte, siehe
   bestellen.html) */
.zustimmung-zeile {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  align-items: flex-start;
  font-size: 0.88rem;
}
.zustimmung-zeile input[type=checkbox] { margin-top: 0.2rem; flex: none; }

/* Task 12 (Review Fix-Runde 1, W2): Gutschrift-Code-Feld + Vorschau-Meldung
   (public/warenkorb.html, public/bestellen.html) */
.optionszeile { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.optionszeile input[type=text] { flex: 1 1 12rem; max-width: none; }
.gutschrift-fehler { color: var(--rot); font-size: 0.85rem; margin: 0.4rem 0 0; }

/* Task 12: Bestelluebersicht/Danke-Fliesstext */
.prosa { max-width: 60ch; }
.prosa p { margin: 0 0 1rem; }
