/* ============================================
   TOAST NOTIFICATIONS - ESTILOS MODERNOS
   ============================================ */

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    min-width: 300px;
    max-width: 500px;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    opacity: 0;
    pointer-events: all;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Animación de entrada */
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Animación de salida */
.toast.hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
}

/* Ícono del toast */
.toast-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

/* Mensaje del toast */
.toast-message {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    color: white;
}

/* Botón cerrar */
.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ============================================
   VARIANTES DE TOAST
   ============================================ */

/* Éxito - Verde */
.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-success .toast-icon {
    color: #d1fae5;
}

/* Advertencia - Amarillo */
.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast-warning .toast-icon {
    color: #fef3c7;
}

/* Error - Rojo */
.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-error .toast-icon {
    color: #fee2e2;
}

/* Info - Azul */
.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.toast-info .toast-icon {
    color: #dbeafe;
}

/* ============================================
   EFECTOS HOVER
   ============================================ */

.toast:hover {
    transform: translate(-50%, -50%) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* ============================================
   RESPONSIVE  
   ============================================ */

@media (max-width: 768px) {
    .toast {
        min-width: 280px;
        max-width: 90vw;
        padding: 1.25rem 1.5rem;
    }

    .toast-icon {
        font-size: 2rem;
    }

    .toast-message {
        font-size: 1rem;
    }
}

/* ============================================
   MÚLTIPLES TOASTS (STACKING)
   ============================================ */

/* Si hay múltiples toasts, apilarlos */
.toast:nth-last-child(2) {
    top: calc(50% - 80px);
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.95);
}

.toast:nth-last-child(3) {
    top: calc(50% - 160px);
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.9);
}

/* Ocultar toasts adicionales */
.toast:nth-last-child(n+4) {
    display: none;
}

/* ============================================
   TEMA OSCURO (si está activo)
   ============================================ */

[data-theme="dark"] .toast {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .toast:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}