/* Contenedor principal de notificaciones */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  pointer-events: none;
  /* Permite clicks debajo si no hay toasts */
}

/* Estilo base del toast con Glassmorphism */
.notification-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  min-width: 320px;
  max-width: 450px;

  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 10px 15px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;

  /* Animación inicial */
  opacity: 0;
  transform: translateX(50px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animación de entrada */
.notification-toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Animación de salida */
.notification-toast.hide {
  opacity: 0;
  transform: translateX(20px) scale(0.9);
}

/* Tipos de notificaciones */
.notification-toast.success {
  background: rgba(240, 253, 244, 0.85);
  /* Verde muy suave */
  border-left: 4px solid #22c55e;
}

.notification-toast.success .notification-icon {
  color: #16a34a;
}

.notification-toast.error {
  background: rgba(254, 242, 242, 0.85);
  /* Rojo muy suave */
  border-left: 4px solid #ef4444;
}

.notification-toast.error .notification-icon {
  color: #dc2626;
}

.notification-toast.warning {
  background: rgba(255, 251, 235, 0.85);
  /* Amarillo muy suave */
  border-left: 4px solid #f59e0b;
}

.notification-toast.warning .notification-icon {
  color: #d97706;
}

.notification-toast.info {
  background: rgba(239, 246, 255, 0.85);
  /* Azul muy suave */
  border-left: 4px solid #3b82f6;
}

.notification-toast.info .notification-icon {
  color: #2563eb;
}

/* Modo oscuro automático (si el sistema lo usa) o clase .dark */
@media (prefers-color-scheme: dark) {
  .notification-toast {
    background: rgba(31, 41, 55, 0.85);
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
      0 4px 6px rgba(0, 0, 0, 0.2),
      0 10px 15px rgba(0, 0, 0, 0.3),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .notification-toast.success {
    background: rgba(6, 78, 59, 0.85);
  }

  .notification-toast.error {
    background: rgba(127, 29, 29, 0.85);
  }

  .notification-toast.warning {
    background: rgba(120, 53, 15, 0.85);
  }

  .notification-toast.info {
    background: rgba(30, 58, 138, 0.85);
  }
}

/* Estructura interna */
.notification-icon {
  flex-shrink: 0;
  margin-right: 12px;
  margin-top: 2px;
  font-size: 18px;
}

.notification-content {
  flex-grow: 1;
  margin-right: 12px;
}

.notification-message {
  font-weight: 500;
}

.notification-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  margin-top: 2px;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 640px) {
  #notification-container {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
    align-items: center;
  }

  .notification-toast {
    width: 100%;
    min-width: auto;
    max-width: 100%;
    margin-bottom: 5px;
  }
}