/* N3b: всплывающие toast-уведомления (realtime).
   Стопка сверху-справа (низ-право занят виджетом чата). Severity: info=slate,
   warning=amber, critical=red. Critical не авто-скрывается (кнопки действий). */

.nl-toast-stack {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 4200;
  display: flex; flex-direction: column; gap: 12px;
  width: 380px; max-width: calc(100vw - 32px);
  pointer-events: none;                 /* сама стопка кликами прозрачна */
}

.nl-toast {
  pointer-events: auto;
  position: relative;
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(15,23,42,.10));
  border-left: 4px solid var(--sev-ink, var(--ink-3));
  border-radius: 14px;
  box-shadow: var(--shadow-lg, 0 8px 28px rgba(2,6,23,.14));
  overflow: hidden;
  animation: nl-toast-in .28s cubic-bezier(.2,.9,.3,1.2);
  transform-origin: top right;
}
.nl-toast.out { animation: nl-toast-out .22s ease forwards; }
/* «Ужатые» (не верхние) — чуть меньше и бледнее, эффект стопки */
.nl-toast.stacked { transform: scale(.97); opacity: .9; }

@keyframes nl-toast-in { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nl-toast-out { to { opacity: 0; transform: translateX(24px) scale(.96); } }

.nl-toast .ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px;
  background: var(--sev-soft); color: var(--sev-ink);
}
.nl-toast .body { min-width: 0; }
.nl-toast .cat {
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--sev-ink); margin-bottom: 3px; display: block;
}
.nl-toast .ttl { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.nl-toast .txt {
  font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.nl-toast .link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--accent-strong); cursor: pointer;
}
.nl-toast .btnrow { display: flex; gap: 8px; margin-top: 10px; }
.nl-toast .tbtn {
  font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer;
}
.nl-toast .tbtn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.nl-toast .tbtn:hover { filter: brightness(1.05); }
.nl-toast .x {
  align-self: start; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-3);
  background: none; border: none; cursor: pointer; font-size: 13px;
}
.nl-toast .x:hover { background: var(--surface-3, rgba(15,23,42,.06)); color: var(--ink); }

/* индикатор авто-скрытия (для info/warning) */
.nl-toast .life {
  position: absolute; left: 0; bottom: 0; height: 3px;
  background: var(--sev-ink, var(--accent)); opacity: .55;
  animation: nl-life 6s linear forwards;
}
.nl-toast.paused .life { animation-play-state: paused; }
@keyframes nl-life { from { width: 100%; } to { width: 0%; } }

/* +N ещё */
.nl-toast-more {
  pointer-events: auto;
  text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 10px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.nl-toast-more:hover { color: var(--accent-strong); }

/* severity → цвета (info = нейтральный slate) */
.nl-toast.sev-info     { --sev-soft: var(--surface-3, rgba(15,23,42,.05)); --sev-ink: var(--ink-3, #64748b); }
.nl-toast.sev-warning  { --sev-soft: var(--warn-soft); --sev-ink: var(--warn); }
.nl-toast.sev-critical { --sev-soft: var(--bad-soft);  --sev-ink: var(--bad); }
