/**
 * Toast Notifications - Sistema de notificaciones elegantes
 * Diseño: Fondo blanco, bordes dorados, sin gradientes
 */

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

/* Toast individual */
.toast {
  pointer-events: auto;
  background: var(--color-bg-white);
  border: 2px solid var(--color-gold);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s ease;
  font-family: 'Open Sans', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Animación de entrada */
@keyframes toastSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Animación de salida */
.toast.toast-exit {
  animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Ícono del toast */
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 100%;
  height: 100%;
}

/* Contenido del toast */
.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-gray-900);
  margin: 0;
  line-height: 1.4;
}

.toast-message {
  font-size: 13px;
  color: var(--color-text-gray);
  margin: 0;
  line-height: 1.5;
}

/* Botón de cerrar */
.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
  color: var(--color-text-light);
}

.toast-close:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold);
}

.toast-close svg {
  width: 16px;
  height: 16px;
}

/* Barra de progreso */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-gold);
  transition: width linear;
}

/* Variantes de toast */

/* Info */
.toast.toast-info .toast-icon {
  color: var(--color-info-blue);
}

.toast.toast-info {
  border-color: var(--color-info-blue);
}

.toast.toast-info .toast-progress {
  background: var(--color-info-blue);
}

/* Success */
.toast.toast-success .toast-icon {
  color: var(--color-success-alt);
}

.toast.toast-success {
  border-color: var(--color-success-alt);
}

.toast.toast-success .toast-progress {
  background: var(--color-success-alt);
}

/* Warning */
.toast.toast-warning .toast-icon {
  color: var(--color-warning-orange);
}

.toast.toast-warning {
  border-color: var(--color-warning-orange);
}

.toast.toast-warning .toast-progress {
  background: var(--color-warning-orange);
}

/* Error */
.toast.toast-error .toast-icon {
  color: var(--color-error-red);
}

.toast.toast-error {
  border-color: var(--color-error-red);
}

.toast.toast-error .toast-progress {
  background: var(--color-error-red);
}

/* Default (dorado) */
.toast.toast-default .toast-icon {
  color: var(--color-gold);
}

.toast.toast-default {
  border-color: var(--color-gold);
}

.toast.toast-default .toast-progress {
  background: var(--color-gold);
}

/* Responsive */
@media (max-width: 767px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .toast {
    padding: 14px 16px;
    gap: 10px;
  }

  .toast-title {
    font-size: 13px;
  }

  .toast-message {
    font-size: 12px;
  }

  .toast-icon {
    width: 20px;
    height: 20px;
  }

  .toast-close {
    width: 20px;
    height: 20px;
  }

  .toast-close svg {
    width: 14px;
    height: 14px;
  }
}
