/* umfrage.css — Ergänzungen für „Umfrage auswerten“. Farben nur aus auswertung.css.
   Gegenläufige Skala: zwei Farbtöne (Ablehnung warm, Zustimmung kalt) und ein neutrales Grau in der Mitte. */

:root { --u-ja: var(--div-kalt); --u-nein: var(--div-warm); --u-neutral: #c4c2ba; }
:root[data-theme="dark"] { --u-neutral: #5d5c56; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --u-neutral: #5d5c56; } }

html, body { overflow-x: clip; }
html { overflow-x: clip; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
a:focus-visible, button:focus-visible, .knopf:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }
.ablage label.knopf:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
main [hidden] { display: none !important; }

/* Filterzeile */
.u-feld { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.u-feld .f-name { margin-right: 0; }
input.feld { min-height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche-1); color: var(--text-1); font: inherit; font-size: 14px; }
input.u-zahl { width: 96px; }
select.feld { max-width: 100%; }
.u-zaehler { font-size: 13px; color: var(--text-3); margin-left: auto; }
.filter.u-eng { margin-bottom: 12px; }
.wahl { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 720px) { .u-zaehler { margin-left: 0; flex-basis: 100%; } }

.u-hinweis { margin: -12px 0 20px; padding: 10px 14px; border-radius: 10px; background: var(--flaeche-2); color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.u-hinweis b { color: var(--text-1); font-weight: 620; }
.u-leer { padding: 28px 20px; border: 1px dashed var(--linie); border-radius: 14px; color: var(--text-2); text-align: center; }
.u-lesehilfe { margin: 0 0 28px; font-size: 14px; color: var(--text-2); max-width: 110ch; }
.u-lesehilfe b { color: var(--text-1); font-weight: 620; }

/* Kennzahlen: lange Aussage-Namen dürfen umbrechen */
#kennzahlen .kz-neben { overflow-wrap: anywhere; }
@media (max-width: 520px) { #kennzahlen { grid-template-columns: 1fr 1fr; } }

/* eigene Diagramme */
.dia .u-zeile-name { fill: var(--text-1); font-size: 12px; }
.dia .u-seite { fill: var(--text-3); font-size: 11px; }
.dia .u-zelle text { fill: var(--text-1); font-size: 12px; font-weight: 600; pointer-events: none; }
.dia .u-zelle.klein rect { stroke: var(--linie); stroke-dasharray: 3 3; }
.dia .u-zelle.klein text { fill: var(--text-3); font-weight: 400; font-style: italic; }
.dia .u-spalte { fill: var(--text-1); font-size: 12px; font-weight: 600; }
.dia .u-spalte-n { fill: var(--text-3); font-size: 11px; }
.dia .u-feldname { fill: var(--text-2); font-size: 12px; font-weight: 650; }
.dia .u-feldunter { fill: var(--text-3); font-size: 11px; }
.dia .u-punktname { fill: var(--text-1); font-size: 11.5px; paint-order: stroke; stroke: var(--flaeche-1); stroke-width: 3px; stroke-linejoin: round; }
.dia .u-teiler { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; }

/* Abweichungs-Liste */
.u-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }
.u-liste li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--raster); overflow-wrap: anywhere; }
.u-liste li:last-child { border-bottom: 0; padding-bottom: 0; }
.u-liste b { color: var(--text-1); font-weight: 620; }

/* Wörter-Rangliste mit aufklappbaren Antworten */
.u-worte { display: grid; gap: 2px; }
.u-wort { border-radius: 8px; }
.u-wort summary { display: grid; grid-template-columns: minmax(96px, 30%) 1fr auto; gap: 10px; align-items: center; min-height: 36px; padding: 2px 6px; cursor: pointer; list-style: none; font-size: 13px; border-radius: 8px; }
.u-wort summary::-webkit-details-marker { display: none; }
.u-wort summary:hover { background: var(--flaeche-2); }
.u-wort .u-w-name { color: var(--text-1); overflow-wrap: anywhere; }
.u-wort .u-w-name::before { content: "+"; display: inline-block; width: 14px; color: var(--text-3); }
.u-wort[open] .u-w-name::before { content: "–"; }
.u-wort .u-w-balken { height: 14px; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }
.u-wort .u-w-zahl { color: var(--text-2); font-weight: 550; font-size: 12px; white-space: nowrap; }
.u-wort ul { margin: 4px 0 10px 20px; padding: 0 0 0 12px; border-left: 2px solid var(--linie); list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.u-wort ul li { overflow-wrap: anywhere; }
.u-wort ul b { color: var(--text-1); font-weight: 620; }
.u-wort .u-w-mehr { font-size: 12px; color: var(--text-3); }

/* Tabellen: lange Zellen kürzen statt die Tabelle endlos breit zu machen */
#d-rohliste td { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
#d-rohliste th { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.als-tabelle td:first-child { white-space: normal; min-width: 180px; }

/* Handy: Begriff über dem Balken, damit lange Wörter nicht mitten im Wort brechen */
.u-wort .u-w-name { overflow-wrap: normal; }
@media (max-width: 640px) {
  .u-wort summary { grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px; }
  .u-wort .u-w-name { grid-column: 1 / -1; }
}

/* Zustände der Knöpfe */
.knopf:active, .wahl button:active, .tabelle-knopf:active { transform: translateY(1px); }
.knopf:disabled, .wahl button:disabled { opacity: .5; cursor: not-allowed; }
#vorlage { white-space: nowrap; }
.a-titel h1, .karte-kopf h2 { overflow-wrap: break-word; }

/* ---------- Excel-Vorlage: dritter Knopf im Ablagefeld und neben dem CSV-Knopf ---------- */
@media (min-width: 721px) and (max-width: 1100px) { .ablage .knoepfe { max-width: 330px; } }
#vorlage, #vorlage ~ a.knopf { margin-block: 4px; }

/* Druck: die Rohliste mit allen Fragen als Spalten passt nicht auf A4 und bleibt im Bericht weg */
html.druckt #d-rohliste { display: none !important; }
html.druckt #u-rohliste::after { content: " Im Bericht nicht abgedruckt: die Tabelle ist zu breit für ein A4-Blatt. Alle Antworten stehen in deiner Datei."; }

/* Verweis auf „Datei erkennen lassen“ */
.erkennen-satz { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.erkennen-satz a { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
