/* Standort teilen. Farben ueber die vorhandenen Variablen, damit
   heller und dunkler Modus ohne Sonderregeln tragen. */

.st-erklaerung { margin: 0 0 1.2rem; opacity: 0.85; max-width: 44rem; line-height: 1.5; }
.st-hinweis { opacity: 0.75; }

.st-stoerung {
  border-left: 3px solid var(--warn, #A8301D);
  background: color-mix(in srgb, var(--warn, #A8301D) 8%, transparent);
  padding: 0.7rem 0.9rem; margin: 0 0 1rem; border-radius: 0 4px 4px 0;
}

/* Der Schalter ist das Herz der Seite: man muss auf einen Blick sehen,
   ob gerade geteilt wird. Deshalb Lampe, Text und Knopf nebeneinander. */
.st-schalter {
  display: flex; align-items: center; gap: 0.9rem;
  border: 1px solid var(--line, #D2DAE5);
  border-radius: 10px; padding: 1rem 1.1rem; margin: 0 0 0.8rem;
  max-width: 34rem;
}

.st-lampe {
  width: 0.95rem; height: 0.95rem; border-radius: 50%; flex: none;
  background: color-mix(in srgb, currentColor 25%, transparent);
  box-shadow: 0 0 0 0 transparent;
}

.st-schalter.st-aktiv { border-color: var(--green-ok, #1F6B4A); }
.st-schalter.st-aktiv .st-lampe {
  background: var(--green-ok, #1F6B4A);
  animation: st-puls 2s ease-in-out infinite;
}

/* Ein ruhiges Pulsen, damit sichtbar bleibt, dass etwas laeuft -
   ohne zu blinken wie ein Alarm. */
@keyframes st-puls {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-ok, #1F6B4A) 55%, transparent); }
  70%      { box-shadow: 0 0 0 0.5rem transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .st-schalter.st-aktiv .st-lampe { animation: none; }
}

.st-text { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 auto; min-width: 0; }
.st-zustand { font-weight: 650; }
.st-detail { font-size: 0.85rem; opacity: 0.7; overflow-wrap: anywhere; }

.st-knopf {
  font: inherit; font-weight: 600; padding: 0.6rem 1.1rem; flex: none;
  border: 0; border-radius: 6px; background: var(--thw-blue, #0B3C8C);
  color: #fff; cursor: pointer;
}
.st-schalter.st-aktiv .st-knopf { background: var(--stoerung, #A8301D); }

.st-notaus { margin: 0 0 1.6rem; }
.st-leise {
  font: inherit; font-size: 0.85rem; background: none;
  border: 1px solid var(--line-2, #BCC7D6); border-radius: 5px;
  padding: 0.35rem 0.7rem; color: inherit; opacity: 0.75; cursor: pointer;
}

.st-listentitel { display: flex; align-items: baseline; gap: 0.5rem; }
.st-anzahl {
  font-size: 0.8rem; font-weight: 500; opacity: 0.6;
  border: 1px solid var(--line, #D2DAE5); border-radius: 999px; padding: 0.05rem 0.5rem;
}
.st-leer { opacity: 0.65; }

.st-liste { list-style: none; padding: 0; margin: 0.4rem 0 0; max-width: 34rem; }
.st-liste li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.5rem 0.1rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}
.st-liste .st-ich { font-weight: 650; }
.st-name { overflow-wrap: anywhere; }
.st-alter { font-size: 0.85rem; opacity: 0.7; white-space: nowrap; }

@media (max-width: 30rem) {
  .st-schalter { flex-wrap: wrap; }
  .st-knopf { width: 100%; }
}
