/* ============================================================
   rx_core — Toast (CANÓNICO, partilhado)
   Toasts não-intrusivos (canto inferior-direito), auto-somem, pausam no
   hover, empilháveis, com acções configuráveis (ex.: "Tentar novamente")
   e clique opcional no corpo. Sem qualquer conhecimento do domínio
   (análises, etc.) — isso vive em quem o chama (ex.: notifications.js).
   ============================================================ */

.toast-host {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: min(380px, calc(100vw - 2.5rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--ink-2, #16161f);
  border: 1px solid var(--wire-2, #ffffff28);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(0.5rem) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.visible { opacity: 1; transform: translateY(0) scale(1); }
.toast.leaving { opacity: 0; transform: translateY(0.5rem) scale(0.98); }

.toast-icon { flex-shrink: 0; margin-top: 0.05rem; }
.toast-error .toast-icon { color: #f87171; }
.toast-success .toast-icon { color: #4ade80; }
.toast-info .toast-icon { color: var(--amber, #f5a623); }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text, #e8e8f0);
  margin-bottom: 0.15rem;
}
.toast-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-2, #b8b8cc);
}
.toast-actions { margin-top: 0.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toast-action-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amber, #f5a623);
  background: color-mix(in srgb, var(--amber, #f5a623) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber, #f5a623) 35%, transparent);
  border-radius: 7px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
}
.toast-action-btn:hover { background: color-mix(in srgb, var(--amber, #f5a623) 20%, transparent); }

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-3, #888898);
  cursor: pointer;
  padding: 0.1rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.toast-close:hover { color: var(--text, #e8e8f0); background: var(--ghost, #ffffff0d); }

@media (max-width: 600px) {
  .toast-host {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}