/* ============================
   SISTEMA DE NOTIFICACIONES MODERNAS
   ============================ */

/* Contenedor principal de notificaciones */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

/* Notificación individual */
.notification {
  position: relative;
  padding: 16px 20px 16px 50px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  min-height: 60px;
  display: flex;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Hover effect */
.notification:hover {
  transform: translateX(-5px) scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Icono de la notificación */
.notification::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Botón de cerrar */
.notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Barra de progreso */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 12px 12px;
  transition: width linear;
}

/* Tipos de notificación */

/* Éxito - Verde */
.notification.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-left: 4px solid #065f46;
}

.notification.success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
}

.notification.success .notification-progress {
  background: rgba(255, 255, 255, 0.4);
}

/* Error - Rojo */
.notification.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-left: 4px solid #991b1b;
}

.notification.error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z'/%3E%3C/svg%3E");
}

.notification.error .notification-progress {
  background: rgba(255, 255, 255, 0.4);
}

/* Advertencia - Naranja */
.notification.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-left: 4px solid #92400e;
}

.notification.warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z'/%3E%3C/svg%3E");
}

.notification.warning .notification-progress {
  background: rgba(255, 255, 255, 0.4);
}

/* Información - Azul */
.notification.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-left: 4px solid #1e40af;
}

.notification.info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
}

.notification.info .notification-progress {
  background: rgba(255, 255, 255, 0.4);
}

/* Animaciones */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Clases de animación */
.notification.slide-in {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.slide-out {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.fade-out {
  animation: fadeOut 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 768px) {
  .notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .notification {
    padding: 14px 18px 14px 45px;
    font-size: 13px;
    min-height: 55px;
  }
  
  .notification::before {
    left: 14px;
    width: 18px;
    height: 18px;
  }
  
  .notification-close {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .notification-container {
    top: 5px;
    right: 5px;
    left: 5px;
  }
  
  .notification {
    padding: 12px 16px 12px 40px;
    font-size: 12px;
    min-height: 50px;
    border-radius: 10px;
  }
  
  .notification::before {
    left: 12px;
    width: 16px;
    height: 16px;
  }
}
