/* Estilo base del contenedor */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1055;
    pointer-events: none;
}

/* Estilo base para los toasts */
#toast-container .toast {
    width: 320px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #fff;
    position: relative;
    animation: slideIn 0.5s ease-out;
    pointer-events: auto;
    background-color: rgba(68, 68, 68, 0.8); /* Fondo transparente */
}

/* Contenedor del contenido del toast */
.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Contenedor del ícono */
.toast-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.toast-icon i {
    font-size: 24px;
    margin-right: 5px;
}

/* Contenedor del texto */
.toast-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Botón de cierre: Posición absoluta arriba a la derecha */
.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-btn:hover {
    color: #000;
    transform: scale(1.2);
}

/* Colores específicos con opacidad */
#toast-container .toast.success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.8), rgba(39, 174, 96, 0.3));
}

#toast-container .toast.error {
    background: linear-gradient(135deg, rgba(255, 47, 78, 0.8), rgba(255, 47, 78, 0.3)); /* Rojo rosado brillante y vibrante */
}

#toast-container .toast.info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(41, 128, 185, 0.3));
}

#toast-container .toast.warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.8), rgba(231, 126, 34, 0.3));
}

/* Barra de progreso con animación personalizada */
.toast::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    animation: progressBar 3s linear forwards;
}

/* Nueva clase para la animación de salida */
#toast-container .toast.slide-out {
    animation: slideOut 0.5s ease-out forwards;
}

/* Animaciones */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}
