/*
 * Umfrage Script 3.0 – Aussehen der Umfrage | www.php-space.info
 *
 * Ruhig in Weiß und Grau mit einem blauen Akzent. Farben und Schrift stehen
 * als Variablen gleich unten und lassen sich dort an einer Stelle ändern.
 *
 * Alle Regeln gelten nur innerhalb der Umfrageseite (.umfrage-koerper) oder
 * der Umfragekarte (.umfrage). Binden Sie die Umfrage per PHP in eine eigene
 * Seite ein, bleibt deren Gestaltung deshalb unberührt.
 *
 * .einbettung steht am <body>, wenn die Umfrage im iFrame läuft
 * (umfrage.php?einbettung=1): durchsichtiger Hintergrund, knapper Rand.
 */

.umfrage-koerper,
.umfrage {
  --umfrage-akzent: #1f5fa8;
  --umfrage-akzent-dunkel: #174a84;
  --umfrage-akzent-hell: #eef3fa;
  --umfrage-seite: #f3f5f8;
  --umfrage-karte: #ffffff;
  --umfrage-text: #1c2127;
  --umfrage-text-leise: #545e6b;
  --umfrage-rand: #d5dae1;
  --umfrage-rand-antwort: #c3cad3;
  --umfrage-flaeche-hover: #f6f8fa;
  --umfrage-balken: #e3e8ee;
  --umfrage-gesperrt: #6b7480;
  --umfrage-ok-text: #1b5234;
  --umfrage-ok-flaeche: #edf7f0;
  --umfrage-ok-rand: #2f7d4f;
  --umfrage-fehler-text: #8c1d13;
  --umfrage-fehler-flaeche: #fdf0ef;
  --umfrage-fehler-rand: #c23b2e;
  --umfrage-hinweis-rand: #6e8cb4;
  --umfrage-schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Seite umfrage.php ------------------------------------------------- */

.umfrage-koerper {
  margin: 0;
  background: var(--umfrage-seite);
  color: var(--umfrage-text);
  font: 16px/1.5 var(--umfrage-schrift);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.umfrage-koerper.einbettung {
  background: transparent;
}

.umfrage-seite {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.umfrage-koerper.einbettung .umfrage-seite {
  max-width: none;
  padding: 0;
}

.umfrage-titel {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}

/* ---- Umfragekarte ------------------------------------------------------ */

.umfrage,
.umfrage *,
.umfrage *::before,
.umfrage *::after {
  box-sizing: border-box;
}

.umfrage {
  max-width: 560px;
  margin: 0 0 24px;
  padding: 20px;
  background: var(--umfrage-karte);
  border: 1px solid var(--umfrage-rand);
  border-radius: 10px;
  color: var(--umfrage-text);
  font: 16px/1.5 var(--umfrage-schrift);
  text-align: left;
  overflow-wrap: anywhere;
}

.umfrage-seite .umfrage {
  margin: 0;
}

.umfrage-koerper.einbettung .umfrage {
  padding: 12px 16px;
}

.umfrage .umfrage-frage {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--umfrage-text);
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
}

.umfrage-koerper.einbettung .umfrage-frage {
  margin-bottom: 8px;
  font-size: 1.125rem;
}

.umfrage .umfrage-beschreibung {
  margin: -4px 0 12px;
  color: var(--umfrage-text-leise);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.umfrage-koerper.einbettung .umfrage-beschreibung {
  margin: -2px 0 8px;
}

.umfrage a {
  color: var(--umfrage-akzent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.umfrage a:hover {
  color: var(--umfrage-akzent-dunkel);
  text-decoration-thickness: 2px;
}

.umfrage :focus-visible {
  outline: 3px solid var(--umfrage-akzent);
  outline-offset: 2px;
}

/* Nur für Screenreader (zum Beispiel die Frage als Beschriftung der Antworten) */
.umfrage .umfrage-versteckt {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Meldungen --------------------------------------------------------- */

.umfrage .meldung {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 6px;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.umfrage-koerper.einbettung .meldung {
  margin-bottom: 8px;
  padding: 5px 10px;
}

.umfrage .meldung p {
  margin: 0;
}

.umfrage .meldung ul {
  margin: 6px 0;
  padding-left: 20px;
}

.umfrage .meldung-ok {
  background: var(--umfrage-ok-flaeche);
  border-color: var(--umfrage-ok-rand);
  color: var(--umfrage-ok-text);
}

.umfrage .meldung-fehler {
  background: var(--umfrage-fehler-flaeche);
  border-color: var(--umfrage-fehler-rand);
  color: var(--umfrage-fehler-text);
}

.umfrage .meldung-hinweis {
  background: var(--umfrage-akzent-hell);
  border-color: var(--umfrage-hinweis-rand);
  color: var(--umfrage-text);
}

/* ---- Formular ---------------------------------------------------------- */

.umfrage .umfrage-form {
  margin: 0;
}

.umfrage .umfrage-antworten {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.umfrage .umfrage-hinweis {
  margin: 0 0 8px;
  color: var(--umfrage-text-leise);
  font-size: 0.875rem;
  line-height: 1.4;
}

.umfrage-koerper.einbettung .umfrage-hinweis {
  margin-bottom: 6px;
}

/* Jede Antwort ist eine Zeile von mindestens 44 px Höhe; die ganze Zeile
   ist anklickbar. Die Zeilen liegen als Liste direkt untereinander. */
.umfrage .antwort {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: -1px 0 0;
  padding: 8px 12px;
  background: var(--umfrage-karte);
  border: 1px solid var(--umfrage-rand-antwort);
  color: var(--umfrage-text);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
}

.umfrage .antwort:first-of-type {
  margin-top: 0;
  border-radius: 8px 8px 0 0;
}

.umfrage .antwort:last-of-type {
  border-radius: 0 0 8px 8px;
}

.umfrage .antwort:hover {
  background: var(--umfrage-flaeche-hover);
}

.umfrage .antwort:has(input:checked) {
  z-index: 1;
  background: var(--umfrage-akzent-hell);
  border-color: var(--umfrage-akzent);
}

.umfrage .antwort input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--umfrage-akzent);
  cursor: pointer;
}

.umfrage .antwort-text {
  min-width: 0;
}

/* Tastatur: die ganze Zeile zeigt den Fokus, nicht nur der kleine Kreis */
@supports selector(:has(*)) {
  .umfrage .antwort input:focus-visible {
    outline: none;
  }

  .umfrage .antwort:has(input:focus-visible) {
    z-index: 2;
    outline: 3px solid var(--umfrage-akzent);
    outline-offset: 0;
  }
}

/* Falle für Programme, die Formulare selbst ausfüllen: Menschen sehen das
   Feld nicht. Bitte nicht entfernen. */
.umfrage .umfrage-feld-extra {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.umfrage .umfrage-aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  margin-top: 14px;
}

.umfrage-koerper.einbettung .umfrage-aktionen {
  margin-top: 10px;
}

.umfrage .umfrage-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0 24px;
  background: var(--umfrage-akzent);
  border: 1px solid var(--umfrage-akzent);
  border-radius: 8px;
  color: #ffffff;
  font: 600 1rem/1.2 var(--umfrage-schrift);
  cursor: pointer;
}

.umfrage .umfrage-knopf:hover {
  background: var(--umfrage-akzent-dunkel);
  border-color: var(--umfrage-akzent-dunkel);
}

.umfrage .umfrage-knopf:disabled {
  background: var(--umfrage-gesperrt);
  border-color: var(--umfrage-gesperrt);
  cursor: not-allowed;
}

.umfrage .umfrage-ergebnis-link,
.umfrage .umfrage-abstimmen-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---- Ergebnis ---------------------------------------------------------- */

.umfrage .umfrage-ergebnis {
  margin: 0;
}

.umfrage .ergebnis-zeile {
  margin: 0 0 10px;
}

.umfrage-koerper.einbettung .ergebnis-zeile {
  margin-bottom: 8px;
}

.umfrage .ergebnis-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 12px;
  font-size: 1rem;
  line-height: 1.3;
}

.umfrage .ergebnis-text {
  min-width: 0;
}

.umfrage .ergebnis-wert {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.umfrage .ergebnis-stimmen {
  color: var(--umfrage-text-leise);
  font-weight: 400;
}

.umfrage .balken {
  display: block;
  height: 10px;
  margin-top: 5px;
  overflow: hidden;
  background: var(--umfrage-balken);
  border-radius: 5px;
}

.umfrage .balken-fuellung {
  display: block;
  height: 100%;
  background: var(--umfrage-akzent);
  border-radius: 5px;
}

.umfrage .umfrage-gesamt {
  margin: 12px 0 0;
  color: var(--umfrage-text-leise);
  font-size: 0.875rem;
  line-height: 1.4;
}

.umfrage-koerper.einbettung .umfrage-gesamt {
  margin-top: 8px;
}

.umfrage .umfrage-hinweis-mehrfach {
  margin: 2px 0 0;
  color: var(--umfrage-text-leise);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.umfrage .umfrage-zurueck {
  margin: 4px 0 0;
}

/* ---- Hinweis auf das Script (laut Lizenz sichtbar lassen) -------------- */

.umfrage .umfrage-copyright {
  margin: 14px 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: right;
}

.umfrage-koerper.einbettung .umfrage-copyright {
  margin-top: 8px;
}

.umfrage .umfrage-copyright a {
  display: inline-block;
  padding: 3px 0;
  color: var(--umfrage-text-leise);
}

/* ---- Kontrastmodus von Windows: Balken sichtbar halten ----------------- */

@media (forced-colors: active) {
  .umfrage .balken {
    border: 1px solid CanvasText;
  }

  .umfrage .balken-fuellung {
    background: Highlight;
    forced-color-adjust: none;
  }
}

/* ---- Balkenbreiten: Klasse b0 bis b100 = Anteil in Prozent ------------- */

.umfrage .balken-fuellung.b0 { width: 0; }
.umfrage .balken-fuellung.b1 { width: 1%; }
.umfrage .balken-fuellung.b2 { width: 2%; }
.umfrage .balken-fuellung.b3 { width: 3%; }
.umfrage .balken-fuellung.b4 { width: 4%; }
.umfrage .balken-fuellung.b5 { width: 5%; }
.umfrage .balken-fuellung.b6 { width: 6%; }
.umfrage .balken-fuellung.b7 { width: 7%; }
.umfrage .balken-fuellung.b8 { width: 8%; }
.umfrage .balken-fuellung.b9 { width: 9%; }
.umfrage .balken-fuellung.b10 { width: 10%; }
.umfrage .balken-fuellung.b11 { width: 11%; }
.umfrage .balken-fuellung.b12 { width: 12%; }
.umfrage .balken-fuellung.b13 { width: 13%; }
.umfrage .balken-fuellung.b14 { width: 14%; }
.umfrage .balken-fuellung.b15 { width: 15%; }
.umfrage .balken-fuellung.b16 { width: 16%; }
.umfrage .balken-fuellung.b17 { width: 17%; }
.umfrage .balken-fuellung.b18 { width: 18%; }
.umfrage .balken-fuellung.b19 { width: 19%; }
.umfrage .balken-fuellung.b20 { width: 20%; }
.umfrage .balken-fuellung.b21 { width: 21%; }
.umfrage .balken-fuellung.b22 { width: 22%; }
.umfrage .balken-fuellung.b23 { width: 23%; }
.umfrage .balken-fuellung.b24 { width: 24%; }
.umfrage .balken-fuellung.b25 { width: 25%; }
.umfrage .balken-fuellung.b26 { width: 26%; }
.umfrage .balken-fuellung.b27 { width: 27%; }
.umfrage .balken-fuellung.b28 { width: 28%; }
.umfrage .balken-fuellung.b29 { width: 29%; }
.umfrage .balken-fuellung.b30 { width: 30%; }
.umfrage .balken-fuellung.b31 { width: 31%; }
.umfrage .balken-fuellung.b32 { width: 32%; }
.umfrage .balken-fuellung.b33 { width: 33%; }
.umfrage .balken-fuellung.b34 { width: 34%; }
.umfrage .balken-fuellung.b35 { width: 35%; }
.umfrage .balken-fuellung.b36 { width: 36%; }
.umfrage .balken-fuellung.b37 { width: 37%; }
.umfrage .balken-fuellung.b38 { width: 38%; }
.umfrage .balken-fuellung.b39 { width: 39%; }
.umfrage .balken-fuellung.b40 { width: 40%; }
.umfrage .balken-fuellung.b41 { width: 41%; }
.umfrage .balken-fuellung.b42 { width: 42%; }
.umfrage .balken-fuellung.b43 { width: 43%; }
.umfrage .balken-fuellung.b44 { width: 44%; }
.umfrage .balken-fuellung.b45 { width: 45%; }
.umfrage .balken-fuellung.b46 { width: 46%; }
.umfrage .balken-fuellung.b47 { width: 47%; }
.umfrage .balken-fuellung.b48 { width: 48%; }
.umfrage .balken-fuellung.b49 { width: 49%; }
.umfrage .balken-fuellung.b50 { width: 50%; }
.umfrage .balken-fuellung.b51 { width: 51%; }
.umfrage .balken-fuellung.b52 { width: 52%; }
.umfrage .balken-fuellung.b53 { width: 53%; }
.umfrage .balken-fuellung.b54 { width: 54%; }
.umfrage .balken-fuellung.b55 { width: 55%; }
.umfrage .balken-fuellung.b56 { width: 56%; }
.umfrage .balken-fuellung.b57 { width: 57%; }
.umfrage .balken-fuellung.b58 { width: 58%; }
.umfrage .balken-fuellung.b59 { width: 59%; }
.umfrage .balken-fuellung.b60 { width: 60%; }
.umfrage .balken-fuellung.b61 { width: 61%; }
.umfrage .balken-fuellung.b62 { width: 62%; }
.umfrage .balken-fuellung.b63 { width: 63%; }
.umfrage .balken-fuellung.b64 { width: 64%; }
.umfrage .balken-fuellung.b65 { width: 65%; }
.umfrage .balken-fuellung.b66 { width: 66%; }
.umfrage .balken-fuellung.b67 { width: 67%; }
.umfrage .balken-fuellung.b68 { width: 68%; }
.umfrage .balken-fuellung.b69 { width: 69%; }
.umfrage .balken-fuellung.b70 { width: 70%; }
.umfrage .balken-fuellung.b71 { width: 71%; }
.umfrage .balken-fuellung.b72 { width: 72%; }
.umfrage .balken-fuellung.b73 { width: 73%; }
.umfrage .balken-fuellung.b74 { width: 74%; }
.umfrage .balken-fuellung.b75 { width: 75%; }
.umfrage .balken-fuellung.b76 { width: 76%; }
.umfrage .balken-fuellung.b77 { width: 77%; }
.umfrage .balken-fuellung.b78 { width: 78%; }
.umfrage .balken-fuellung.b79 { width: 79%; }
.umfrage .balken-fuellung.b80 { width: 80%; }
.umfrage .balken-fuellung.b81 { width: 81%; }
.umfrage .balken-fuellung.b82 { width: 82%; }
.umfrage .balken-fuellung.b83 { width: 83%; }
.umfrage .balken-fuellung.b84 { width: 84%; }
.umfrage .balken-fuellung.b85 { width: 85%; }
.umfrage .balken-fuellung.b86 { width: 86%; }
.umfrage .balken-fuellung.b87 { width: 87%; }
.umfrage .balken-fuellung.b88 { width: 88%; }
.umfrage .balken-fuellung.b89 { width: 89%; }
.umfrage .balken-fuellung.b90 { width: 90%; }
.umfrage .balken-fuellung.b91 { width: 91%; }
.umfrage .balken-fuellung.b92 { width: 92%; }
.umfrage .balken-fuellung.b93 { width: 93%; }
.umfrage .balken-fuellung.b94 { width: 94%; }
.umfrage .balken-fuellung.b95 { width: 95%; }
.umfrage .balken-fuellung.b96 { width: 96%; }
.umfrage .balken-fuellung.b97 { width: 97%; }
.umfrage .balken-fuellung.b98 { width: 98%; }
.umfrage .balken-fuellung.b99 { width: 99%; }
.umfrage .balken-fuellung.b100 { width: 100%; }
