/* ── Toast Notifications ─────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: var(--sp-3);
  right: var(--sp-3);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  pointer-events: none;
  max-width: calc(100vw - var(--sp-6));
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.875rem 1.25rem;
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  letter-spacing: var(--ls-wide);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  max-width: 24rem;
  transform: translateX(110%);
  transition: transform var(--t-base) var(--ease-out);
}

.toast.is-visible {
  transform: translateX(0);
}

.toast.is-leaving {
  transform: translateX(110%);
}

.toast--success { background: var(--color-success); }
.toast--error   { background: var(--color-error); }
.toast--info    { background: var(--color-ink); }

.toast__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.toast__message {
  flex: 1;
  line-height: var(--lh-snug);
}

.toast__close {
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--t-fast);
}

.toast__close:hover { opacity: 1; }

.toast__close svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Mobile — full width bottom */

@media (max-width: 480px) {
  #toast-container {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
  }

  .toast {
    max-width: 100%;
    border-radius: 0;
    transform: translateY(100%);
  }

  .toast.is-visible { transform: translateY(0); }
  .toast.is-leaving { transform: translateY(100%); }
}
