/* Gemeinsame Stile für Verwaltung, Lehrperson, Stimmabgabe und Ergebnis. */

.verwaltung-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }
.verwaltung-wrap h1 { margin-bottom: 6px; }
.verwaltung-wrap h2 { margin-top: 40px; }

.ergebnis-wrap { max-width: 1040px; margin: 0 auto; padding: 40px 20px 80px; }
.ergebnis-wrap h1 { margin-bottom: 6px; }

/* ---------- Ergebnis-Karte mit Kantonskarte ---------- */

.resultat-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

.resultat-vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 640px) { .resultat-vergleich { grid-template-columns: 1fr; } }
.resultat-spalte { border: 1px solid var(--line-strong, #dcd9e6); border-radius: 12px; padding: 18px; background: var(--surface-tint, #faf9fc); }
.resultat-spalte-titel { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary, #8a86a3); margin: 0 0 10px; }
.resultat-badge { display: inline-block; padding: 8px 18px; border-radius: 8px; font-weight: 700; font-size: 15px; letter-spacing: .04em; color: #fff; }
.resultat-badge.ja { background: var(--ja, #1F8256); }
.resultat-badge.nein { background: var(--nein, #D04A40); }
.resultat-untertitel { font-weight: 600; margin-top: 6px; }
.resultat-untertitel.nein { color: var(--nein, #D04A40); }
.resultat-untertitel.ja { color: var(--ja, #1F8256); }

.zwischenresultat-bar { display: flex; height: 30px; border-radius: 4px; overflow: hidden; margin: 14px 0 6px; }
.zwischenresultat-bar .ja-teil { background: #0B3C7A; display: flex; align-items: center; padding-left: 8px; color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.zwischenresultat-bar .nein-teil { background: #A30000; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.zwischenresultat-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; }

.standesstimmen-titel { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.standesstimmen-punkte { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.standesstimmen-punkte span { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.standesstimmen-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 20px; }
.standesstimmen-label .ja-text { color: #0B3C7A; }
.standesstimmen-label .nein-text { color: #A30000; }

.kantonskarte-wrap { max-width: 620px; margin: 0 auto; }
.kantonskarte-wrap svg { width: 100%; height: auto; display: block; }
.kantonskarte-wrap svg path[id] { cursor: pointer; transition: opacity 120ms; }
.kantonskarte-wrap svg path[id]:hover { opacity: 0.75; }

.kantonskarte-legende { display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 18px auto 4px; font-size: 12px; color: var(--text-secondary); }
.kantonskarte-legende .balken { flex: 1; height: 10px; border-radius: 5px; background: linear-gradient(to right, #A30000, #ffffff, #0B3C7A); }
.kantonskarte-credit { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

.feld { margin-bottom: 18px; }
.feld label { display: block; font-weight: 600; margin-bottom: 6px; }
.feld input[type=text], .feld input[type=email], .feld input[type=date], .feld input[type=datetime-local], .feld input[type=password], .feld input[type=number], .feld select, .feld textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #ccc; font-size: 16px; box-sizing: border-box;
  font-family: inherit;
}
.feld textarea { resize: vertical; line-height: 1.4; }
.feld .hinweis-klein { display: block; font-weight: 400; font-size: 12px; color: #777; margin-top: 4px; }

/* Kompakte Eingabefelder ausserhalb von .feld (z.B. in einer Inline-Zeile wie
   "Klasse für Termin X auswählen, Anzahl Y eingeben") – gleiche Rundung/Rahmen
   wie die grossen Formularfelder, aber ohne width:100%. */
.eingabe-klein {
  padding: 8px 10px; border-radius: 8px; border: 1px solid #ccc; font-size: 14px; font-family: inherit; box-sizing: border-box;
}

/* ---------- Vorlagen-Editor (Admin: Vorlagen verwalten) ---------- */

.feld-gruppe { border: 1px solid #e5e2ef; border-radius: 12px; padding: 16px 18px 4px; margin-bottom: 20px; background: #fff; }
.feld-gruppe h3 { margin: 0 0 14px; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; color: var(--navy, #2B2447); }
.feld-gruppe .feld:last-child { margin-bottom: 18px; }
.feld-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.feld-reihe .feld { flex: 1; min-width: 140px; margin-bottom: 0; }
.feld-reihe .feld label.hinweis-klein { font-weight: 400; }

.parlament-editor { display: flex; gap: 14px; flex-wrap: wrap; }
.parlament-kammer { flex: 1; min-width: 220px; border: 1px solid #e5e2ef; border-radius: 10px; padding: 12px 14px; background: #fbfaff; }
.parlament-kammer-titel { font-weight: 700; margin-bottom: 8px; }

.btn--klein { padding: 6px 14px; font-size: 14px; }

/* Listen-Editor: Einträge (Pro-Argumente, Quiz-Fragen, Begriffe, Quellen, ...)
   werden als Liste mit Bearbeiten/Entfernen angezeigt; neue Einträge kommen
   über ein Dialogfenster mit eigenen, beschrifteten Feldern dazu. */
.liste-editor { border: 1px solid #ddd; border-radius: 10px; padding: 10px; background: #fbfaff; }
.liste-editor-zeile {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 8px 6px; border-bottom: 1px solid #e5e2ef; font-size: 14px; line-height: 1.4;
}
.liste-editor-zeile:last-of-type { border-bottom: none; }
.liste-editor-zeile > span:first-child { flex: 1; }
.liste-editor-aktionen { display: flex; gap: 4px; flex-shrink: 0; }
.btn--icon {
  background: none; border: 1px solid #ccc; border-radius: 6px; width: 28px; height: 28px;
  cursor: pointer; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.btn--icon:hover { background: #f0f0f0; }

/* Dialogfenster zum Erfassen/Bearbeiten eines einzelnen Eintrags. */
.dialog-overlay {
  position: fixed; inset: 0; background: rgba(20, 16, 38, 0.5); display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.dialog-fenster {
  background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(20, 16, 38, 0.3);
}
.dialog-fenster h3 { margin: 0 0 16px; }
.dialog-radios { display: flex; gap: 14px; flex-wrap: wrap; }
.dialog-radios .radio-opt { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.dialog-aktionen { display: flex; gap: 10px; margin-top: 6px; }

.vorlage-liste { border: 1px solid #ddd; border-radius: 10px; padding: 12px; max-height: 260px; overflow-y: auto; }
.vorlage-liste label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; padding: 6px 0; }

.btn { background: var(--ja, #2B7A4B); color: #fff; border: none; padding: 10px 20px; border-radius: 8px; font-size: 16px; cursor: pointer; }
.btn:hover { opacity: 0.9; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn--ghost { background: none; border: 1px solid #ccc; color: inherit; }
.btn--nein { background: var(--nein, #b00020); }

.fehler { color: #b00020; margin-top: 10px; }
.hinweis { color: #555; font-size: 14px; }

table.liste { width: 100%; border-collapse: collapse; margin-top: 20px; }
table.liste th, table.liste td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e2e2; vertical-align: top; }
table.liste th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: #666; }

.status-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eee; font-size: 13px; }
.status-chip--offen { background: #fff3cd; }
.status-chip--abgeschlossen { background: #d4edda; }

#logout-btn { float: right; background: none; border: 1px solid #ccc; padding: 6px 14px; border-radius: 8px; cursor: pointer; }

.code-liste { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; max-height: 420px; overflow-y: auto; padding: 4px; }
.code-karte { border: 1px solid #ddd; border-radius: 8px; padding: 8px; width: 150px; text-align: center; font-size: 11px; word-break: break-all; }
.code-karte img { display: block; margin: 0 auto 6px; }
.code-karte .code-kurz { font-size: 15px; font-weight: 700; letter-spacing: 1.5px; font-family: 'Space Grotesk', sans-serif; margin-bottom: 2px; }
.code-karte.benutzt { opacity: 0.4; }
.code-karte.benutzt img { filter: grayscale(1); }

.klassen-karte { border: 1px solid #e2e2e2; border-radius: 10px; padding: 16px; margin-top: 14px; }
.klassen-karte .titel { font-weight: 700; }
.klassen-karte .fortschritt { color: #666; font-size: 14px; margin: 4px 0 10px; }

.stimm-optionen { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.stimm-optionen button {
  flex: 1; min-width: 120px; padding: 16px; border-radius: 10px; border: 2px solid #ccc; background: #fff;
  font-size: 17px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.stimm-optionen button[aria-pressed="true"] { border-color: var(--navy, #2B2447); background: var(--navy, #2B2447); color: #fff; }

.ergebnis-karte { border: 1px solid #e2e2e2; border-radius: 12px; padding: 20px; margin-top: 20px; }
.ergebnis-karte h3 { margin-top: 0; }
.mehr-zeile { display: flex; gap: 24px; flex-wrap: wrap; margin: 14px 0; }
.mehr-zeile .stat { min-width: 140px; }
.mehr-zeile .stat .zahl { font-size: 28px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.mehr-zeile .stat .label { font-size: 13px; color: #666; }
