/* Toast — SSE push target. Stacks bottom-right. Toasts self-remove via
   Alpine x-init when data-auto-dismiss is set (handled in toast.templ). */

.toast-stack {
  position: fixed;
  bottom: 16px; right: 16px;
  z-index: 950;
  display: flex; flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 280px; max-width: 380px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-4);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  animation: toast-in .18s cubic-bezier(.2, .8, .2, 1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast--success { border-left-color: var(--good); }
.toast--info    { border-left-color: var(--info); }
.toast--warn    { border-left-color: var(--warn); }
.toast--danger  { border-left-color: var(--bad); }
.toast--neutral { border-left-color: var(--ink-4); }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.toast-text {
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.toast-text:hover { color: var(--ink); text-decoration: underline; }

.toast-close {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 0;
  background: transparent;
  color: var(--ink-4);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.toast-close:hover { background: var(--bg-sunk); color: var(--ink); }

@media (max-width: 480px) {
  .toast-stack { left: 16px; right: 16px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
}
