/* ============================================================
   NOTIFICACIONES TOAST
   Sistema reutilizable de notificaciones (success/warning/info/error).
   Los colores viven acá (variables CSS); el JS solo asigna la clase
   .notification--<tipo>.
   ============================================================ */

#notifications-container{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 360px;
  max-width: calc(100vw - 40px);
  pointer-events: none;
}

.notification{
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 360px;
  max-width: calc(100vw - 40px);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--n-border);
  border-left: 4px solid var(--n-accent);
  background: var(--n-bg);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  transition: transform .3s ease, opacity .3s ease;
}

.notification.is-hidden{
  transform: translateX(120%);
  opacity: 0;
}

.notification__icon{
  flex-shrink: 0;
  color: var(--n-accent);
  display: flex;
}
.notification__icon svg{
  width: 20px;
  height: 20px;
}

.notification__body{
  flex: 1;
  min-width: 0;
}
.notification__title{
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.notification__message{
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  word-break: break-word;
}

.notification__close{
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.notification__close:hover{
  background: rgba(0,0,0,.06);
  color: var(--text-primary);
}
.notification__close svg{
  width: 16px;
  height: 16px;
}

/* ---------- COLORES POR TIPO (tema claro) ---------- */
.notification--success{ --n-accent:#16A34A; --n-bg:#F0FDF4; --n-border:#BBF7D0; }
.notification--warning{ --n-accent:#D97706; --n-bg:#FFFBEB; --n-border:#FDE68A; }
.notification--info{    --n-accent:#2563EB; --n-bg:#EFF6FF; --n-border:#BFDBFE; }
.notification--error{   --n-accent:#DC2626; --n-bg:#FEF2F2; --n-border:#FECACA; }

/* ---------- COLORES POR TIPO (tema oscuro) ---------- */
body.theme-dark .notification--success{ --n-accent:#4ADE80; --n-bg:#12231A; --n-border:#1F3D2B; }
body.theme-dark .notification--warning{ --n-accent:#FBBF24; --n-bg:#2A2010; --n-border:#4A3A12; }
body.theme-dark .notification--info{    --n-accent:#60A5FA; --n-bg:#14213A; --n-border:#1E3A8A; }
body.theme-dark .notification--error{   --n-accent:#F87171; --n-bg:#2A1414; --n-border:#7F1D1D; }
body.theme-dark .notification__close:hover{ background: rgba(255,255,255,.08); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px){
  #notifications-container{ left: 20px; right: 20px; width: auto; }
  .notification{ width: 100%; }
}

@media (prefers-reduced-motion: reduce){
  .notification{ transition: none; }
}
