/* Toasts, Bestätigungs- und Eingabedialog (siehe /js/dialoge.js), Tastatur-Fokus */
:focus-visible { outline:2px solid var(--accent-text); outline-offset:2px; }

.toast-box { position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); z-index:1100; display:flex; flex-direction:column; gap:8px; width:min(480px,calc(100vw - 32px)); pointer-events:none; }
.toast { pointer-events:auto; display:flex; align-items:center; gap:10px; padding:10px 10px 10px 14px; background:var(--surface2); color:var(--text); border:1px solid var(--border); border-left-width:4px; border-radius:10px; box-shadow:0 10px 28px rgba(0,0,0,0.35); font-size:0.9rem; line-height:1.4; }
.toast-fehler { border-left-color:var(--error); }
.toast-hinweis { border-left-color:var(--warning); }
.toast-erfolg { border-left-color:var(--success); }
.toast-text { flex:1; min-width:0; overflow-wrap:anywhere; white-space:pre-line; }
.toast-zu { flex-shrink:0; width:32px; height:32px; border:none; border-radius:6px; background:none; color:var(--text-muted); font-family:inherit; font-size:0.9rem; cursor:pointer; }

.dlg { margin:auto; width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 18px 50px rgba(0,0,0,0.45); font-family:system-ui,-apple-system,sans-serif; }
.dlg::backdrop { background:rgba(0,0,0,0.7); }
.dlg-innen { display:flex; flex-direction:column; gap:16px; padding:20px; }
.dlg-titel { font-size:1.05rem; font-weight:700; }
.dlg-text { font-size:0.95rem; line-height:1.5; white-space:pre-line; overflow-wrap:anywhere; }
.dlg-feld { display:flex; flex-direction:column; gap:5px; }
.dlg-feld label { font-size:0.82rem; font-weight:600; color:var(--text-muted); }
.dlg-feld input { width:100%; padding:9px 12px; background:var(--surface2); color:var(--text); border:1px solid var(--border); border-radius:8px; font-family:inherit; font-size:0.95rem; }
.dlg-aktionen { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.dlg-btn { padding:8px 16px; min-height:38px; border:1px solid var(--border); border-radius:8px; background:var(--surface2); color:var(--text); font-family:inherit; font-size:0.88rem; font-weight:600; cursor:pointer; }
.dlg-btn-ok { background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:700; }
.dlg-btn-gefahr { background:var(--error); border-color:var(--error); color:var(--surface); font-weight:700; }

@media (pointer:coarse) {
  .toast-zu { width:44px; height:44px; }
  .dlg-btn { min-height:44px; }
  .dlg-feld input { min-height:44px; font-size:16px; }
}
@media (hover:none) { .dlg-btn:active, .toast-zu:active { opacity:0.65; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { transition-duration:0.01ms !important; animation-duration:0.01ms !important; animation-iteration-count:1 !important; } }
