/* Elementi comuni dell'event bus nel viewer: notifiche (notify.js), card bloccate (enabledWhen), badge dei filtri */
.toast-stack { position: fixed; right: 16px; bottom: 84px; z-index: 250; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  --t-c: var(--accent);
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 10px 10px 12px;
  border: 1px solid var(--border); border-left: 4px solid var(--t-c); border-radius: 8px;
  background: var(--surface-solid); color: var(--text); box-shadow: 0 10px 28px var(--shadow-color, rgba(0, 0, 0, .3));
  font: 13px/1.4 system-ui, sans-serif; animation: toast-in .2s ease-out;
}
.toast.is-success { --t-c: #16a34a; }
.toast.is-warning { --t-c: #d97706; }
.toast.is-error { --t-c: #dc2626; }
.toast.is-out { opacity: 0; transform: translateX(12px); transition: opacity .2s ease, transform .2s ease; }
.toast-icon { color: var(--t-c); font-weight: 800; }
.toast-text { flex: 1 1 auto; min-width: 0; }
.toast-close { border: 0; background: transparent; color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* card bloccata da enabledWhen */
.card.is-locked { position: relative; }
.card.is-locked > .card-body { filter: grayscale(.8); opacity: .45; }
.card-lock { position: absolute; inset: 40px 0 0 0; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-muted); font: 600 12px system-ui, sans-serif; pointer-events: none; }
.card-lock[hidden] { display: none; }
.card-lock-text { padding: 4px 10px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); }

/* badge dei filtri applicati nell'intestazione */
.card > header .card-filter-badge { margin-left: 8px; padding: 0 7px; border-radius: 999px; background: rgba(59, 130, 246, .15);
  color: var(--accent-text, var(--accent)); font: 700 10.5px system-ui, sans-serif; letter-spacing: 0; text-transform: none; cursor: help; }

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