/*v2.0*/

/* =====================
   LIGHT MODE (Default)
===================== */
/*:root {
  --bg: #ffffff;
  --text: #000000;
  --card: #fafafa;
  --border: #999;
  --button-bg: #f0f0f0;
  --button-hover: #e0e0e0;
}*/
:root {
  --bg: #ffffff;
  --text: #1b1b1b;

  --card: #fafafa;
  --card-alt: #f1f1f1;

  --border: #d0d0d0;

  --button-bg: #f0f0f0;
  --button-hover: #e0e0e0;

  --accent: #2e7d32; /* Kastra Grün */
  --accent-soft: #e8f5e9;
}

/* =====================
   DARK MODE (System)
===================== */
/*@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #eaeaea;
    --card: #1e1e1e;
    --border: #444;
    --button-bg: #2a2a2a;
    --button-hover: #3a3a3a;
  }
}*/
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e6e6e6;

    --card: #1e1e1e;
    --card-alt: #262626;

    --border: #3a3a3a;

    --button-bg: #262626;
    --button-hover: #333333;

    --accent: #4caf50;
    --accent-soft: #1b2a1f;
  }
}

/* =====================
   BETA-KENNZEICHNUNG
   Nur auf dem beta-Branch! Nicht nach main uebernehmen.
   theme.css wird von jeder Seite geladen, damit ist das
   Abzeichen ueberall sichtbar - ohne Layout-Auswirkung.
===================== */
body::after {
  content: "🧪 BETA";
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 9999;
  padding: 6px 12px;
  border-radius: 999px;
  background: #b45309;
  color: #ffffff;
  font: bold 13px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0.92;
}

/* =====================
   NUR FÜR VORLESEPROGRAMME
===================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================
   EINBLENDUNGEN (Ersatz für alert)
===================== */
#kastra-toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(560px, calc(100vw - 24px));
  pointer-events: none;
}

.kastra-toast {
  pointer-events: auto;
  position: relative;
  padding: 14px 44px 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 17px;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: kastra-toast-ein 0.18s ease-out;
}

.kastra-toast--error {
  border-color: #c62828;
  background: #fdecea;
  color: #4a1010;
}

.kastra-toast--success {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.kastra-toast--weg {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kastra-toast__close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  font-size: 22px;
  line-height: 1;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.kastra-toast__close:hover { background: rgba(127, 127, 127, 0.2); }

@keyframes kastra-toast-ein {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-color-scheme: dark) {
  .kastra-toast--error {
    background: #3a1414;
    color: #ffd9d4;
    border-color: #ef5350;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kastra-toast { animation: none; }
  .kastra-toast--weg { transition: none; }
}

