*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root{
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

.notificationes-container {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 99999; /* 🔹 Asegura que esté sobre todo */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
    max-width: 600px; /* 🔹 Evita que ocupe toda la pantalla */
    pointer-events: none; /* 🔹 Evita que interfiera con otros elementos */
}

.notificationes-container :where(.mensaje-toast, .toast-body){
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notificationes-container .mensaje-toast {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 250px; /* 🔹 Mínimo tamaño para que no sea muy pequeño */
    max-width: 400px; /* 🔹 Reducimos el ancho máximo */
    width: auto; /* 🔹 Se ajusta automáticamente al contenido */
    padding: 10px 12px; /* 🔹 Espaciado optimizado */
    font-size: 15px; /* 🔹 Reduce el tamaño de texto para mejor proporción */
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-bottom: 10px;
    word-wrap: break-word; /* 🔹 Evita desbordamiento de texto */
    white-space: normal; /* 🔹 Permite saltos de línea */
    border-radius: 8px 8px 6px 6px; /* 🔹 Esquinas más redondeadas */
    transform: translateY(15px);
}

.mensaje-toast .toast-body i{
    font-size: 20px;
    margin-left: 0px;
    margin-right: 8px;
}

.close-btn{
    font-size: 20px !important;
}

.mensaje-toast.success .toast-body i{
    color: var(--success);
}

.mensaje-toast.error .toast-body i{
    color: var(--error);
}

.mensaje-toast.warning .toast-body i{
    color: var(--warning);
}

.mensaje-toast.info .toast-body i{
    color: var(--info);
}

.mensaje-toast .toast-body span{
     color: #888 !important;
    font-size: 15px;
}

.mensaje-toast i:last-child{
    color: #888 !important;
    cursor: pointer;
}

.mensaje-toast i:last-child:hover{
    color: #000 !important;
}



@keyframes show {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animación de salida */
@keyframes hide {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(30px);
        opacity: 0;
    }
}



.notificationes-container .mensaje-toast {
    animation: show 0.3s ease forwards;
}

/* Aplicar la animación de salida cuando se oculta */
.notificationes-container .mensaje-toast.hide {
    animation: hide 0.3s ease forwards;
}

/* Barra de progreso como borde inferior */
.mensaje-toast::before {
    position: absolute;
    content: '';
    height: 4px; /* Aumentamos el grosor del borde */
    width: 100%;
    bottom: 0;
    left: 0;
    background: var(--error);
    animation: progress 2.3s linear forwards;
    border-radius: 0 0 0px 6px; /* Bordes redondeados solo abajo */
}

@keyframes progress {
    100% {
        width: 0%;
    }
}

.mensaje-toast.success::before{
    background: var(--success);
}

.mensaje-toast.error::before{
    background: var(--error);
}

.mensaje-toast.info::before{
    background: var(--info);
}

.mensaje-toast.warning::before{
    background: var(--warning);
}

