/* Toasts — DESIGN_PRINCIPLES.md §9 */

.toast-region {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: var(--z-toast);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 280px;
  max-width: 400px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-body);
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(12px);
  transition:
    opacity var(--dur-state) var(--ease-smooth),
    transform var(--dur-state) var(--ease-smooth);
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-warning { background: var(--amber); }
.toast-info    { background: var(--blue); }

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-body {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}
.toast-msg {
  font-weight: 400;
  opacity: 0.9;
  font-size: var(--fs-body-sm);
}
.toast-close {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.7;
  cursor: pointer;
  border-radius: var(--radius-xs);
}
.toast-close:hover {
  opacity: 1;
}
.toast-close svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .toast-region {
    top: auto;
    bottom: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
  }
  .toast {
    max-width: 100%;
    min-width: 0;
  }
}
