/* ============================================================
   Feedback surfaces — alerts (persistent) + toasts (transient)
   ============================================================ */

/* ---- Alerts (inline page/card banners) -------------------------- */
.alert {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.alert::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border-default);
}
.alert-icon {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-body { min-width: 0; }
.alert-title { font-size: 13px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.005em; }
.alert-msg { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }
.alert-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.alert-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.alert-close {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  background: transparent; border: none; border-radius: 6px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.alert-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.alert-info     { background: rgba(94,106,210,0.10); }
.alert-info::before    { background: #5E6AD2; }
.alert-info    .alert-icon { color: #5E6AD2; }

.alert-success  { background: var(--positive-soft); }
.alert-success::before { background: var(--positive); }
.alert-success .alert-icon { color: var(--positive); }

.alert-warning  { background: var(--warning-soft); }
.alert-warning::before { background: var(--warning); }
.alert-warning .alert-icon { color: var(--warning); }

.alert-danger   { background: var(--danger-soft); }
.alert-danger::before  { background: var(--danger); }
.alert-danger  .alert-icon { color: var(--danger); }

/* ---- Toasts (transient bottom-end popovers) --------------------- */
.toast-stack {
  position: fixed;
  bottom: 20px; right: 20px;
  display: flex; flex-direction: column-reverse; gap: 10px;
  z-index: 80;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 340px; max-width: calc(100vw - 40px);
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  animation: toast-in 200ms cubic-bezier(.4,0,.2,1);
}
.toast-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0; margin-top: 1px;
}
.toast-body { min-width: 0; }
.toast-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.toast-msg { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.45; }
.toast-close {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  background: transparent; border: none; border-radius: 5px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.toast-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.toast-info     { border-color: rgba(94,106,210,0.32); }
.toast-info    .toast-icon { color: #5E6AD2; }
.toast-success  { border-color: rgba(16,185,129,0.32); }
.toast-success .toast-icon { color: var(--positive); }
.toast-warning  { border-color: rgba(234,179,8,0.32); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-danger   { border-color: rgba(239,68,68,0.32); }
.toast-danger  .toast-icon { color: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
