/* ===== Toast — No inline styles, class-only ===== */
:root {
  --toast-duration: 3000ms;     /* Sichtbar-Zeit - ZENTRAL in toast-config.js ändern! */
  --toast-exit: 300ms;           /* Ausblend-Zeit */
}

/* Toast Container ist jetzt <dialog> für top layer access */
#toastContainer {
  /* Dialog reset */
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  overflow: visible;

  /* Position top-right */
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: auto;
  left: auto;

  /* Layout */
  display: flex;
  flex-direction: column;
  gap: 8px;

  /* No interaction with container itself */
  pointer-events: none;
}

/* Dialog backdrop entfernen */
#toastContainer::backdrop {
  display: none;
}

.toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1f2937; /* neutral/dunkel */
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  will-change: transform, opacity;
  /* Keine automatische Animation! */
  opacity: 1;
  transform: translateY(0);
}

.toast-info { background: #1f2937; }
.toast-ok   { background: #065f46; }
.toast-warn { background: #92400e; }
.toast-err  { background: #7f1d1d; }

/* Einfliegen VON RECHTS */
@keyframes toastEnter {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast--enter {
  animation: toastEnter 250ms ease-out both;
}

/* Rausfliegen NACH RECHTS */
@keyframes toastExit {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(120%); }
}
.toast--leave {
  animation: toastExit var(--toast-exit) ease-in forwards;
}

/* Barrierefreiheit: reduziere Bewegungen */
@media (prefers-reduced-motion: reduce) {
  .toast--enter, .toast--leave { animation: none; }
}
