/* Öffentliche Seite (zolltarif). Systemschriften: externe Schriften bräuchten eine
   CSP-Ausnahme. Die Klassen der Antwort (formular, baum, kopieren, drucken, banner) kommen aus
   simpletares.darstellung — Regeln dafür nach dem Hub (hub.css, SimpleTares-Block). */
:root {
  /* --grau dunkler als Bootstraps #6c757d: der erreichte auf --flaeche nur 4.3:1 (WCAG AA
     verlangt 4.5:1, Lighthouse 2026-10-25; Test test_grauer_text_erreicht_wcag_aa_…). */
  --navy: #080069; --tuerkis: #00e6c3; --text: #212529; --grau: #5c636a;
  --linie: #dee2e6; --flaeche: #f4f5f8; --fehler: #b42318; --ok: #05603a;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: #fff; }
a { color: var(--navy); }
.kopf { display: flex; align-items: baseline; gap: .5rem; padding: .9rem 1rem;
  border-bottom: 3px solid var(--tuerkis); }
.marke { font-weight: 700; color: var(--navy); text-decoration: none; font-size: 1.1rem; }
.von { color: var(--grau); font-size: .9rem; }
.inhalt { max-width: 52rem; margin: 0 auto; padding: 1rem; }
h1 { color: var(--navy); font-size: 1.9rem; line-height: 1.2; margin: 1rem 0 .75rem; }
h2 { color: var(--navy); font-size: 1.3rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .25rem; }
.ablauf { padding-left: 1.25rem; }
.hinweis { color: var(--grau); font-size: .9rem; margin: .25rem 0 .75rem; }

/* Eingabe */
.werkzeug { margin-top: 1.5rem; }
.chat-form, .kontakt-form { display: flex; flex-direction: column; gap: .5rem;
  background: var(--flaeche); padding: 1rem; border-radius: var(--radius); }
.felder { display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr; gap: .75rem; }
@media (max-width: 640px) { .felder { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: .5rem .6rem; color: var(--text);
  border: 1px solid #ced4da; border-radius: 8px; background: #fff; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tuerkis); outline-offset: 1px; }
.knopf { align-self: flex-end; font: inherit; font-weight: 600; color: #fff; background: var(--navy);
  border: 0; border-radius: 8px; padding: .6rem 1.1rem; cursor: pointer; }
.knopf:disabled { opacity: .6; cursor: wait; }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.banner { padding: .6rem .8rem; border-radius: 8px; background: var(--flaeche);
  border-left: 4px solid var(--grau); }
.banner.is-fehler { border-left-color: var(--fehler); color: var(--fehler); }
.banner.is-ok { border-left-color: var(--ok); color: var(--ok); }

/* Verlauf — Frage und Antwort unterscheiden sich durch Ausrichtung UND Farbe */
.chat { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.chat__frage, .chat__antwort, .chat__fehler { margin: 0; padding: .9rem; border-radius: var(--radius);
  white-space: pre-wrap; }
.chat__frage { align-self: flex-end; max-width: 46rem; background: var(--navy); color: #fff; }
.chat__antwort { align-self: stretch; border: 1px solid var(--linie); }
.chat__fehler { align-self: flex-start; background: var(--flaeche); color: var(--grau); }
.chat__laedt { color: var(--grau); font-style: italic; animation: puls 1.6s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .chat__laedt { animation: none; } }
.chat__md { white-space: normal; overflow-x: auto; }
.chat__md > :first-child { margin-top: 0; }
.chat__md > :last-child { margin-bottom: 0; }
.unverbindlich { color: var(--grau); font-size: .85rem; margin: .75rem 0 .25rem; }
.kontakt-link { margin: 0; font-weight: 600; }

/* Auskunft (darstellung.formular_html) */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--linie);
  vertical-align: top; }
.formular th { width: 13rem; }
@media (max-width: 640px) {
  .formular, .formular tbody, .formular tr, .formular th, .formular td { display: block; width: auto; }
  .formular th { border-bottom: 0; padding-bottom: 0; }
  .formular td { overflow-wrap: anywhere; }
}
.formular__antwort { margin: 0 0 1rem; }
.formular__fuss { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1rem; padding-top: .5rem; border-top: 1px solid var(--linie); font-size: .875rem; }
.muted { color: var(--grau); }
.kopieren, .btn { font: inherit; font-size: .8rem; cursor: pointer; background: #fff;
  color: var(--navy); border: 1px solid #ced4da; border-radius: 6px; padding: .15rem .55rem; }
.kopieren { margin-left: .5rem; vertical-align: middle; }
.baum { margin-top: 1rem; }
.baum__titel { font-weight: 600; margin-bottom: .25rem; }
.baum__block + .baum__block { margin-top: .5rem; }
.baum__z { display: flex; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; line-height: 1.35; }
.baum__p { white-space: pre; flex: none; }
.baum__t { min-width: 0; overflow-wrap: anywhere; }
.baum details { margin-top: .5rem; }
.baum summary { cursor: pointer; color: var(--navy); font-size: .875rem; }

/* Popup (dialog, zolltarif.js) */
.popup { max-width: 34rem; width: calc(100% - 2rem); border: 0; border-radius: var(--radius);
  padding: 1.25rem; box-shadow: 0 10px 40px rgba(8, 0, 105, .25); }
.popup::backdrop { background: rgba(8, 0, 105, .35); }
.popup h2 { margin-top: 0; }
.popup .kontakt-form { background: none; padding: 0; }
.popup__knoepfe { display: flex; justify-content: flex-end; gap: .5rem; }
.schliessen { font: inherit; background: #fff; color: var(--navy); border: 1px solid #ced4da;
  border-radius: 8px; padding: .6rem 1rem; cursor: pointer; }
.meldung:empty { display: none; }

.fuss { border-top: 1px solid var(--linie); color: var(--grau); font-size: .875rem;
  padding: 1.25rem 1rem; text-align: center; margin-top: 3rem; }

/* „Als PDF speichern": nur die gewählte Auskunft und ihre Frage (zolltarif.js setzt
   druck-auskunft / druck-ziel und klappt den Baum auf). */
@media print {
  .kopf, .einstieg, .chat-form, .faq, .kontakt, .datenschutz, .fuss, noscript { display: none !important; }
  body.druck-auskunft .chat > :not(.druck-ziel) { display: none; }
  .drucken, .kopieren, .baum summary, .kontakt-link { display: none !important; }
  .chat__frage { align-self: stretch; max-width: none; background: none; color: #000;
    border: 1px solid #ced4da; }
  .chat__antwort { border: 0; padding: 0; }
}
