.modern-alert{
    /*width: 250px;*/
    padding: 10px;
    border-radius: 5px;
    user-select: none;
    margin-bottom: 10px;

    b {
        font-weight: 600;
    }
}

.modern-alert > div:first-of-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    gap: 10px;
}

.modern-alert:has(> .sliderContainer) > div:first-of-type {
    margin-bottom: 5px;
}

.modern-alert.alert-error{
    background-color: #bd403e;
}

.modern-alert.alert-success{
    background-color: #3c763d;
}

.modern-alert.alert-info{
    background-color: var(--light-blue);
}

.modern-alert.alert-warning{
    background-color: darkorange;
}

.modern-alert h3, .modern-alert p{
    margin: 0;
    color: white;
    font-size: 14px;
}

.modern-alert .sliderContainer {
    width: 100%;
    background: #00000030;
    border-radius: 3px;
}

.modern-alert .slider {
    width: 100%;
    background: #fff;
    border-radius: 3px;
    height: 6px;
    animation-name: sliderAnimation;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

.modern-alert .fa-times {
    height: 18px;
    width: 18px;
    transition-duration: .1s;
    text-align: center;
    line-height: 18px;
    color: white;
}

.modern-alert .fa-times:hover {
    background: #00000030;
    transition-duration: .1s;
    border-radius: 3px;
    cursor: pointer;
}

.modern-alert .fa-times:active {
    background: #00000040;
    border-radius: 3px;
    cursor: pointer;
}

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


/* Animazione opacity chiusura */
@keyframes closeAnimation {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Animazione opacity apertura */
@keyframes openAnimation {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modern-alert.closingOpacity{
    animation-name: closeAnimation;
    animation-duration: .2s;
    animation-fill-mode: forwards;
}

.modern-alert.openingOpacity{
    animation-name: openAnimation;
    animation-duration: .2s;
    animation-fill-mode: forwards;
}

.modern-alert-container {
    position: fixed;
    top: 56px;
    right: 16px;
    max-width: calc(100svw - 32px);
    z-index: 10000;
    width: fit-content;
}