/* TL Gold – Benachrichtigungen (31.10.2026, app/kern/glocke.py, static/js/glocke.js): rote Zahl an der Glocke,
   Glocken-Liste im Seitenkopf, Banner „Dringend“, Hinweis-Fenster (Toasts). Nur Farb-Rollen aus farben.css. */

/* ---------- Zahl-Abzeichen: rot, gut sichtbar (Meldungen, Dringendes der GF) */
.glocke .zaehler, .zaehler-rot { background: var(--fehler); color: var(--fehler-text); box-shadow: 0 0 0 2px var(--grund); }
.kopf .glocke .zaehler, .dringend-knopf .zaehler { position: absolute; top: -4px; right: -4px; }
.dringend-knopf { position: relative; color: var(--fehler); }
.kopf-glocke, .dringend-knopf { flex-shrink: 0; }
.kopf-glocke[aria-expanded="true"] { background: var(--flaeche-2); }
/* Neue Meldung: Glocke wackelt kurz (nicht bei „weniger Bewegung“) */
@keyframes glocke-wackeln { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.glocke.neu svg { animation: glocke-wackeln .9s ease-in-out 2; transform-origin: 50% 10%; }
@media (prefers-reduced-motion: reduce) { .glocke.neu svg { animation: none; } }

/* ---------- Glocken-Liste: am PC unter dem Kopf rechts, am Handy über die ganze Breite */
.glocke-panel { position: fixed; z-index: 8; top: 64px; right: 16px; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 160px);
  overflow-y: auto; overscroll-behavior: contain; background: var(--grund); color: var(--text); border: 1px solid var(--linie);
  border-radius: 18px; box-shadow: var(--schatten); padding: 14px; }
@media (min-width: 900px) { .glocke-panel { top: 78px; right: 36px; max-height: calc(100vh - 110px); } }
@media (max-width: 599px) { .glocke-panel { left: 8px; right: 8px; width: auto; top: 60px; } }
.glocke-liste { display: flex; flex-direction: column; gap: 12px; }
.glocke-liste-kopf { display: flex; align-items: center; gap: 8px; }
.glocke-liste-kopf h2 { margin: 0; font-size: 17px; flex: 1 1 auto; display: flex; align-items: center; gap: 8px; }
.glocke-liste-kopf h2:focus { outline: none; }
.glocke-liste-kopf form { margin: 0; }
.glocke-eintraege { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.glocke-eintrag { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--flaeche);
  border: 1px solid var(--linie); }
.glocke-eintrag.ungelesen { border-color: var(--fehler); box-shadow: inset 4px 0 0 var(--fehler); }
.glocke-eintrag .punkt { margin-top: 6px; }
.glocke-eintrag .wachsen { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.glocke-knoepfe { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.glocke-knoepfe form { margin: 0; }
.glocke-fuss { margin: 0; font-size: 13px; text-align: center; }
@media (max-width: 599px) {
  .glocke-eintrag { flex-wrap: wrap; }
  .glocke-knoepfe { flex-direction: row; width: 100%; }
  .glocke-knoepfe form, .glocke-knoepfe .knopf { flex: 1 1 auto; width: 100%; }
}

/* ---------- Banner „Dringend“ (GF): Startseite oben und in der Glocke, bis erledigt */
.dringend-banner { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--warn);
  background: var(--warn-grund); color: var(--text); }
.dringend-banner.stufe-jetzt { border-color: var(--fehler); background: var(--fehler-grund); }
.dringend-kopf { display: flex; align-items: center; gap: 10px; }
.dringend-kopf h2 { margin: 0; font-size: 16px; }
.dringend-symbol { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 16px;
  flex: 0 0 32px; background: var(--warn); color: var(--warn-text); }
.dringend-banner.stufe-jetzt .dringend-symbol { background: var(--fehler); color: var(--fehler-text); }
.dringend-liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.dringend-liste a { color: var(--text); text-decoration: underline; }
.dringend-banner > .knopf { align-self: flex-start; }

/* ---------- Hinweis-Fenster (Toasts): unten über der Schnellleiste, am PC oben rechts */
.toasts { position: fixed; z-index: 9; left: 8px; right: 8px; bottom: calc(84px + env(safe-area-inset-bottom)); display: flex;
  flex-direction: column; gap: 8px; pointer-events: none; }
.toasts > div { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .toasts { left: auto; right: 24px; bottom: auto; top: 20px; width: 400px; } }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); box-shadow: var(--schatten); border-left: 6px solid var(--gold); }
.toast.dringend { border-color: var(--fehler); border-left-color: var(--fehler); background: var(--fehler-grund); }
.toast-inhalt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.toast-inhalt .klein { color: var(--text-2); }
.toast-knoepfe { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.toast-knoepfe form { margin: 0; }
.toast-zu { flex: 0 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes toast-rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .toast { animation: toast-rein .2s ease-out; }
}
