/* ═══════════════════════════════════════════════════════════════
   Toast / snackbar — Design System.html L2024–2054
   5s auto-dismiss, stacks upward, max 3 visible, bottom-right
   ═══════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px 14px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: flex;
  gap: 12px;
  align-items: center;
  width: 360px;
  max-width: calc(100vw - 48px);
  pointer-events: auto;
  animation: toast-in .25s cubic-bezier(.2,.8,.2,1);
  border-left: 4px solid var(--sam-medium);
}
.toast.is-leaving { animation: toast-out .2s cubic-bezier(.4,0,.2,1) forwards; }

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

.toast__icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
}
.toast__icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.toast__body {
  flex: 1;
  font-size: 13.5px;
  min-width: 0;
}
.toast__body strong { display: block; color: var(--sam-dark); }
.toast__body .sub { color: var(--sam-brown-dark); font-size: 12.5px; margin-top: 2px; }

.toast__action {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--sam-red);
  white-space: nowrap;
}
.toast__action:hover { background: var(--sam-brown-light); }

.toast__close {
  background: none;
  border: none;
  color: var(--sam-medium);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.toast__close:hover { background: var(--sam-brown-light); color: var(--sam-dark); }

/* Variants */
.toast--success { border-left-color: #1b6e3a; }
.toast--success .toast__icon { background: #e7f4ea; color: #1b6e3a; }

.toast--info { border-left-color: #1a4a8a; }
.toast--info .toast__icon { background: #dbe8f2; color: #1a4a8a; }

.toast--warning { border-left-color: #8a5a00; }
.toast--warning .toast__icon { background: #fff4e0; color: #8a5a00; }

.toast--error { background: #2d2d2d; color: #fff; border-left-color: var(--sam-error, #D65454); }
.toast--error .toast__icon { background: var(--sam-error, #D65454); color: #fff; }
.toast--error .toast__body strong { color: #fff; }
.toast--error .toast__body .sub { color: #bbb; }
.toast--error .toast__action { color: #f8d4a6; }
.toast--error .toast__close { color: #bbb; }

@media (max-width: 560px) {
  .toast-container { right: 12px; left: 12px; bottom: 12px; }
  .toast { width: 100%; }
}
