/**
 * TOAST NOTIFICATIONS STYLES
 * Notificaciones emergentes esquina superior izquierda
 */

#toastContainer {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    background-color: #ffffff;
    border-left: 4px solid #0284c7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    opacity: 0;
    pointer-events: auto;
    font-size: 14px;
    font-weight: 500;
    min-width: 300px;
    max-width: 400px;
}

/* Mostrar toast */
.toast.show {
    opacity: 1;
}

/* Animación de entrada */
@keyframes slideIn {
    from {
        transform: translateX(-400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animación de salida */
@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-400px);
        opacity: 0;
    }
}

.toast.hide {
    animation: slideOut 0.3s ease-in;
    opacity: 0;
}

/* Contenedor del toast */
.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.toast-content i {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    color: #1e293b;
    word-break: break-word;
    line-height: 1.4;
}

/* Botón cerrar */
.toast-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #1e293b;
}

/* Variantes por tipo */

/* INFO (Azul) */
.toast-info {
    border-left-color: #0284c7;
    background-color: #f0f9ff;
}

.toast-info .toast-message {
    color: #0c4a6e;
}

.toast-info i {
    color: #0284c7;
}

/* SUCCESS (Verde) */
.toast-success {
    border-left-color: #38a169;
    background-color: #f0fdf4;
}

.toast-success .toast-message {
    color: #15803d;
}

.toast-success i {
    color: #38a169;
}

/* WARNING (Naranja) */
.toast-warning {
    border-left-color: #d69e2e;
    background-color: #fffbeb;
}

.toast-warning .toast-message {
    color: #92400e;
}

.toast-warning i {
    color: #d69e2e;
}

/* ERROR (Rojo) */
.toast-error {
    border-left-color: #e53e3e;
    background-color: #fef2f2;
}

.toast-error .toast-message {
    color: #7f1d1d;
}

.toast-error i {
    color: #e53e3e;
}

/* PERMISSION (Púrpura) */
.toast-permission {
    border-left-color: #a855f7;
    background-color: #faf5ff;
}

.toast-permission .toast-message {
    color: #6b21a8;
}

.toast-permission i {
    color: #a855f7;
}

/* Responsive */
@media (max-width: 480px) {
    #toastContainer {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: 100%;
    }

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

    @keyframes slideIn {
        from {
            transform: translateX(calc(-100% - 20px));
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        from {
            transform: translateX(0);
            opacity: 1;
        }
        to {
            transform: translateX(calc(-100% - 20px));
            opacity: 0;
        }
    }
}
