/* ========================================
   TOAST NOTIFICATIONS - Sistema de notificaciones
   ======================================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out forwards;
  pointer-events: auto;
  min-width: 280px;
  border-left: 4px solid #4CAF50;
  font-size: 14px;
  line-height: 1.5;
}

.toast.success {
  border-left-color: #4CAF50;
  background: linear-gradient(135deg, #fff 0%, #f0f8f0 100%);
}

.toast.error {
  border-left-color: #f44336;
  background: linear-gradient(135deg, #fff 0%, #ffe6e6 100%);
}

.toast.info {
  border-left-color: #2196F3;
  background: linear-gradient(135deg, #fff 0%, #e6f4ff 100%);
}

.toast.warning {
  border-left-color: #ff9800;
  background: linear-gradient(135deg, #fff 0%, #fff3e6 100%);
}

.toast.dark-mode {
  background-color: #2a2a2a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #0ad930;
}

.toast.dark-mode.success {
  background: linear-gradient(135deg, #1a1a1a 0%, #1a2a1a 100%);
  border-left-color: #0ad930;
}

.toast.dark-mode.error {
  background: linear-gradient(135deg, #2a1a1a 0%, #2a1a1a 100%);
  border-left-color: #ff6b6b;
}

.toast.dark-mode.info {
  background: linear-gradient(135deg, #1a2a3a 0%, #1a2a3a 100%);
  border-left-color: #64b5f6;
}

.toast.dark-mode.warning {
  background: linear-gradient(135deg, #2a2a1a 0%, #2a2a1a 100%);
  border-left-color: #ffb74d;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast.success .toast-icon {
  color: #4CAF50;
}

.toast.error .toast-icon {
  color: #f44336;
}

.toast.info .toast-icon {
  color: #2196F3;
}

.toast.warning .toast-icon {
  color: #ff9800;
}

.toast.dark-mode.success .toast-icon {
  color: #0ad930;
}

.toast.dark-mode.error .toast-icon {
  color: #ff6b6b;
}

.toast.dark-mode.info .toast-icon {
  color: #64b5f6;
}

.toast.dark-mode.warning .toast-icon {
  color: #ffb74d;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  font-weight: 600;
  color: #212121;
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toast.dark-mode .toast-title {
  color: #0ad930;
}

.toast-message {
  color: #666;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}

.toast.dark-mode .toast-message {
  color: #ccc;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #333;
}

.toast.dark-mode .toast-close {
  color: #666;
}

.toast.dark-mode .toast-close:hover {
  color: #aaa;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: currentColor;
  border-radius: 0 0 8px 0;
  animation: progress 5s linear forwards;
}

.toast.success .toast-progress {
  background-color: #4CAF50;
}

.toast.error .toast-progress {
  background-color: #f44336;
}

.toast.info .toast-progress {
  background-color: #2196F3;
}

.toast.warning .toast-progress {
  background-color: #ff9800;
}

/* ANIMACIONES */

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.toast.removing {
  animation: slideOut 0.3s ease-out forwards;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .toast {
    padding: 12px 14px;
    font-size: 12px;
  }

  .toast-icon {
    font-size: 18px;
  }

  .toast-title {
    font-size: 12px;
  }

  .toast-message {
    font-size: 12px;
  }

  .toast-close {
    font-size: 16px;
  }
}
