/* ============================================================
   BG Remover — Toasts
   ============================================================ */

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-toast);
  pointer-events: none;
  max-width: min(380px, calc(100vw - 40px));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--fg-primary);
  box-shadow: var(--shadow-md);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  animation: toastIn var(--dur-base) var(--ease-standard);
}

.toast.is-leaving {
  animation: toastOut var(--dur-base) var(--ease-standard) forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-body { min-width: 0; flex: 1; }
.toast-title { font-weight: var(--fw-semibold); margin-bottom: 2px; }
.toast-message { color: var(--fg-secondary); font-size: var(--fs-xs); }

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}
.toast-close:hover { background: var(--bg-subtle); color: var(--fg-primary); }

.toast--success { border-left: 4px solid var(--color-success); }
.toast--warning { border-left: 4px solid var(--color-warning); }
.toast--error   { border-left: 4px solid var(--color-danger); }
.toast--info    { border-left: 4px solid var(--color-info); }

@keyframes toastIn {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(12px); opacity: 0; }
}