/* Los mensajes conservan su presentación original si JavaScript no está disponible. */
.toast-source[hidden] { display: none !important; }
.toast-region {
  position: fixed;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  pointer-events: none;
}
.toast {
  --toast-color: #1d4ed8;
  --toast-background: #eff6ff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  background: var(--toast-background);
  border: 1px solid var(--toast-color);
  border-left-width: 5px;
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-lg, 0 12px 32px #0003);
  pointer-events: auto;
  animation: toast-appear 180ms ease-out;
}
.toast-success { --toast-color: #166534; --toast-background: #edf9f1; }
.toast-error { --toast-color: #9f1239; --toast-background: #fff1f2; }
.toast-warning { --toast-color: #854d0e; --toast-background: #fffbeb; }
.toast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  background: var(--toast-color);
  font-weight: 800;
}
.toast-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast .toast-title { color: var(--toast-color); font-weight: 700; margin: 0 0 5px; }
.toast .toast-message { color: #243047; margin: 0; font-size: 0.92rem; }
.toast-close {
  flex: 0 0 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--toast-color);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.toast-close:hover { background: #0000000d; }
@keyframes toast-appear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .toast-region { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}
