:root {
    --ui-toast-transition: all 0.28s ease-in-out !important;
}

#ui-toastContainer {
    transition: var(--ui-toast-transition);
    border-color: rgba(13, 110, 253, 0.9);
    opacity: 0;
    /* filter: blur(5px); */
}

#ui-toastContainer.show {
    opacity: 1;
    /* filter: blur(0px); */

}

#ui-toastContainer #ui-liveToast {
    transition: var(--ui-toast-transition);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#ui-toastContainer.show #ui-liveToast {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#ui-liveToast.info {
    border-color: rgba(13, 110, 253, 0.9) !important;
}

#ui-liveToast.error {
    border-color: rgba(220, 53, 69, 0.9) !important;
}

#ui-liveToast.success {
    border-color: rgba(25, 135, 84, 0.9) !important;
}

#ui-liveToast.muted {
    border-color: rgba(143, 143, 143, 0.9) !important;
    color: rgb(109, 109, 109) !important;
}

#ui-liveToast.muted #ui-toastText {
    color: #5e5d5d !important;
}

#ui-liveToast.l #ui-toastText {
    font-size: 18px !important;
}

#ui-liveToast.opaque {
    background-color: rgba(255, 255, 255, 1) !important;
}

/* ---  GLOBAL FLASH ANIMATIONS --- */

.flash-bg-animate {
    animation: flashBgGeneric 1s ease-in-out;
}

@keyframes flashBgGeneric {
    0% {
        background-color: var(--flash-bg-color, inherit);
    }

    30% {
        background-color: var(--flash-bg-flash, #eefff5);
    }

    100% {
        background-color: var(--flash-bg-color, inherit);
    }
}

.flash-border-animate {
    animation: flashBorderGeneric 1s ease-in-out;
    border-style: solid;
    /* Ensure border is visible */
}

@keyframes flashBorderGeneric {
    0% {
        border-color: var(--flash-border-color, transparent);
    }

    30% {
        border-color: var(--flash-border-flash, #38a169);
    }

    100% {
        border-color: var(--flash-border-color, transparent);
    }
}

.flash-outline-animate {
    animation: flashOutlineGeneric 1s ease-in-out;
    outline-style: solid;
    /* Ensure outline is visible */
}

@keyframes flashOutlineGeneric {
    0% {
        outline-color: var(--flash-outline-color, transparent);
    }

    30% {
        outline-color: var(--flash-outline-flash, #38a169);
    }

    100% {
        outline-color: var(--flash-outline-color, transparent);
    }
}

.flash-shadow-animate {
    animation: flashShadowGeneric 1s ease-in-out;
}

@keyframes flashShadowGeneric {
    0% {
        box-shadow: 0 0 0px var(--flash-shadow-color, transparent);
    }

    30% {
        box-shadow: 0 0 20px var(--flash-shadow-flash, rgba(72, 187, 120, 0.7));
    }

    100% {
        box-shadow: 0 0 0px var(--flash-shadow-color, transparent);
    }
}

/* --- OLD FLASH CLASSES (Kept for compatibility) --- */


@keyframes flashBgSuccess {
    0% {
        background-color: #fff;
    }

    30% {
        background-color: #eefff5;
    }

    100% {
        background-color: #fff;
    }
}

@keyframes flashBorderSuccess {
    0% {
        border-color: #c6f6d5;
    }

    30% {
        border-color: #38a169;
    }

    100% {
        border-color: #c6f6d5;
    }
}

@keyframes flashOutlineSuccess {
    0% {
        outline-color: #c6f6d5;
    }

    30% {
        outline-color: #38a169;
    }

    100% {
        outline-color: #c6f6d5;
    }
}

@keyframes flashBoxShadowSuccess {
    0% {
        box-shadow: 0 0 0px rgba(72, 187, 120, 0.7);
        /* box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; */
    }

    30% {
        box-shadow: 0 0 20px rgba(72, 187, 120, 1);
    }

    100% {
        box-shadow: 0 0 0px rgba(72, 187, 120, 0.7);
    }
}




@keyframes flashBgError {
    0% {
        background-color: #fff;
    }

    30% {
        background-color: #ffe5e5;
    }

    100% {
        background-color: #fff;
    }
}












/* Struttura base del pannello animato */
.ui-fading-alert {
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        filter 0.4s ease;
    transform: translateX(-30px);
    filter: blur(4px);
    opacity: 0;
    z-index: 2500;
    min-width: 220px;
    pointer-events: none;
    /* Non blocca i click durante l'animazione */
}

/* Animazione dell'icona interna */
.ui-fading-alert .alert-icon {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.5);
    font-size: 2.5rem;
    line-height: 1;
}

/* Stato visibile */
.ui-fading-alert.is-visible {
    opacity: 1 !important;
    transform: translateX(0px) !important;
    filter: blur(0px);
}

/* Stato in uscita (scivola via a destra) */
.ui-fading-alert.is-hidden {
    opacity: 0 !important;
    transform: translateX(30px) !important;
    filter: blur(4px);
}