/* ══ TOAST ══ */
/* Notifica temporanea con 4 varianti: success, error, warning, info */
/* Uso: showToast("messaggio", "success") */

.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Varianti colore ── */

.toast--success {
  background: var(--green-light);
  color: #1e7e34;
  border: 1px solid var(--green);
}

.toast--error {
  background: var(--red-light);
  color: #c62828;
  border: 1px solid var(--red);
}

.toast--warning {
  background: #fef7e0;
  color: #856404;
  border: 1px solid #e37400;
}

.toast--info {
  background: var(--grey-900);
  color: white;
  border: 1px solid var(--grey-700);
}

.toast--loading {
  background: var(--grey-900);
  color: white;
  border: 1px solid var(--grey-700);
}

.toast--loading svg {
  animation: toast-spin 1s linear infinite;
}

@keyframes toast-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
