/* VistaMira 2.22: Rückmeldungen. Erste Komponente des neuen Designsystems.
   Eigener .vm-* Namensraum, Werte aus assets/tokens.css – die muss vorher geladen sein.
   Bewusst ohne @layer, solange der übrige Bestand unlayered ist: layered Regeln würden
   jeden Spezifitätskampf gegen style.css/discovery.css verlieren. */

/* 1 — Toast: der einzige schwebende Kanal. Nie modal, nie fokusraubend. */
.vm-toasts{position:fixed;z-index:2600;display:flex;flex-direction:column;gap:8px;margin:0;padding:0;pointer-events:none;
 bottom:calc(16px + var(--vm-safe-bottom) + env(safe-area-inset-bottom,0px));
 left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px))}
@media(min-width:701px){.vm-toasts{left:auto;right:24px;bottom:24px;width:min(420px,calc(100vw - 48px))}}
.vm-toast{--vm-tone:var(--vm-info);pointer-events:auto;box-sizing:border-box;width:100%;
 display:grid;grid-template-columns:22px minmax(0,1fr) 36px;gap:10px;align-items:start;padding:12px;
 border:1px solid var(--vm-line);border-left:3px solid var(--vm-tone);border-radius:var(--vm-radius);
 background:var(--vm-surface);color:var(--vm-ink);box-shadow:var(--vm-shadow);
 font-size:.9rem;line-height:1.45;text-align:left}
@supports(backdrop-filter:blur(8px)){.vm-toast{background:#0e2038d9;backdrop-filter:blur(8px)}}
.vm-toast[data-tone=success]{--vm-tone:var(--vm-success)}
.vm-toast[data-tone=warning]{--vm-tone:var(--vm-warning)}
.vm-toast[data-tone=error]{--vm-tone:var(--vm-error)}
.vm-toast[data-tone=locked]{--vm-tone:var(--vm-locked)}
.vm-toast-icon{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;
 background:#ffffff14;color:var(--vm-tone);font-size:.78rem;font-weight:800;line-height:1}
.vm-toast-body{min-width:0}
.vm-toast-title{display:block;font-weight:650;color:var(--vm-ink);overflow-wrap:anywhere}
.vm-toast-text{margin:4px 0 0;font-size:.85rem;line-height:1.5;color:var(--vm-ink-muted);overflow-wrap:anywhere}
.vm-toast-action{margin-top:10px;min-height:40px;padding:8px 14px;border:0;border-radius:8px;
 background:var(--vm-accent);color:#12213b;font:inherit;font-size:.85rem;font-weight:650;cursor:pointer}
.vm-toast-action:hover{background:#f6ce95}
.vm-toast details{margin-top:8px}
.vm-toast summary{display:inline-block;min-height:32px;padding:6px 0;color:var(--vm-accent);font-size:.78rem;cursor:pointer}
.vm-toast details p{margin:2px 0 0;font-size:.75rem;line-height:1.5;color:var(--vm-ink-muted);overflow-wrap:anywhere}
.vm-toast-close{justify-self:end;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:8px;
 background:#ffffff14;color:var(--vm-ink-muted);font-size:1.25rem;line-height:1;cursor:pointer}
.vm-toast-close:hover{background:#ffffff26;color:var(--vm-ink)}
.vm-toast button:focus-visible,.vm-toast summary:focus-visible{outline:3px solid var(--vm-accent);outline-offset:2px}
@media(prefers-reduced-motion:no-preference){
 .vm-toast{animation:vm-toast-in .22s cubic-bezier(.2,.7,.3,1) both}
 .vm-toast.vm-leaving{animation:vm-toast-out .16s ease-in both}
}
@keyframes vm-toast-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@keyframes vm-toast-out{to{opacity:0;transform:translateY(6px)}}

/* 2 — Inline-Zusammenfassung über der Ergebnisliste. Bleibt stehen, verdeckt nichts. */
.vm-summary{--vm-tone:var(--vm-info);display:block;margin:10px 0 2px;padding:10px 12px;
 border:1px solid var(--vm-line);border-left:3px solid var(--vm-tone);border-radius:10px;
 background:#13294799;color:var(--vm-ink);font-size:.875rem;line-height:1.5}
.vm-summary[data-tone=success]{--vm-tone:var(--vm-success)}
.vm-summary[data-tone=warning]{--vm-tone:var(--vm-warning)}
.vm-summary[data-tone=error]{--vm-tone:var(--vm-error)}
.vm-summary:empty{display:none}
.vm-summary-main{display:block}
.vm-summary-note{display:block;margin-top:4px;color:var(--vm-ink-muted)}
.vm-summary-note>summary{display:inline-block;min-height:32px;padding:6px 0;color:var(--vm-accent);font-size:.78rem;cursor:pointer}
.vm-summary-note>summary:focus-visible{outline:3px solid var(--vm-accent);outline-offset:2px}
.vm-summary-note>p{margin:2px 0 4px;font-size:.8rem;line-height:1.55}

/* 3 — Fortschritt im bestehenden Suchpanel. Der Balken hatte bisher keinen Begleittext. */
#search-progress-text{margin:0 0 8px;font-size:.9rem;line-height:1.45;color:var(--vm-ink)}
#search-progress-count{margin:8px 0 0;font-size:.8rem;line-height:1.45;color:var(--vm-ink-muted)}
#search-progress-text:empty,#search-progress-count:empty{display:none}

/* 4 — Routenhinweis bleibt im Routenblock, wo die Aktion ausgelöst wurde. */
#route-status{--vm-tone:var(--vm-info);display:block;margin-top:12px;padding:10px 12px;
 border:1px solid var(--vm-line);border-left:3px solid var(--vm-tone);border-radius:10px;
 background:#13294799;font-size:.85rem;line-height:1.5;color:var(--vm-ink-muted)}
#route-status[data-tone=error]{--vm-tone:var(--vm-error);color:#ffbcb5}
#route-status:empty{display:none}
