/* =================================
   SISTEMA GLOBAL DE NOTIFICACIONES
   ================================= */

/* Estilos base del Toast */
.toast-notification {
  position: fixed;
  background: white;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 12000; /* sobre el overlay de spinner */
  animation: slideInRight 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  font-family: 'Poppins', sans-serif;
}

/* Posiciones soportadas */
.toast-top-right {
  top: 90px;
  right: 20px;
}

.toast-top-center {
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
}

.toast-bottom-center {
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.toast-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Animación de entrada y salida */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Variante: SUCCESS (éxito/confirmación) */
.toast-notification.success {
  border-left: 4px solid #4caf50;
}

.toast-notification.success .icon {
  color: #4caf50;
}

/* Variante: WARNING (advertencia) */
.toast-notification.warning {
  border-left: 4px solid #ff9800;
}

.toast-notification.warning .icon {
  color: #ff9800;
}

/* Variante: ERROR (error) */
.toast-notification.error {
  border-left: 4px solid #f44336;
}

.toast-notification.error .icon {
  color: #f44336;
}

/* Variante: INFO (información) */
.toast-notification.info {
  border-left: 4px solid #2196f3;
}

.toast-notification.info .icon {
  color: #2196f3;
}

/* Ícono del toast */
.toast-notification .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Texto del toast */
.toast-notification span:last-child {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #333;
}

/* Responsive para tablets */
@media (max-width: 768px) {
  .toast-notification {
    top: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 0.875rem 1rem;
  }
  
  .toast-notification .icon {
    font-size: 1.25rem;
  }
  
  .toast-notification span:last-child {
    font-size: 0.9rem;
  }
}

/* Responsive para móviles */
@media (max-width: 480px) {
  .toast-notification {
    top: 75px;
    right: 8px;
    left: 8px;
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
  }
  
  .toast-notification .icon {
    font-size: 1.1rem;
  }
  
  .toast-notification span:last-child {
    font-size: 0.85rem;
  }
}

/* Estados especiales */
.toast-notification {
  transition: opacity 0.3s ease;
}

.toast-notification.removing {
  opacity: 0;
}
