/* CONTENITORE PRINCIPALE - FIXED AL BASSO */
.notifications-container {
    position: fixed;
    top: auto !important;
    bottom: 2rem;
    right: 20px;
    display: flex;
    gap: 10px !important;
    max-width: 350px;
    min-width: 270px;
    height: auto !important;
    max-height: calc(100vh - 4rem);
    min-height: 0;
    flex-direction: column-reverse;
    overflow-y: auto;
    z-index: 1000;
}

/* NOTIFICATION - CORREZIONE GRID */
.notification {
    background: var(--background-card);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* 🔥 CORRETTO: icona, contenuto, close */
    gap: 0;
    animation: slideInFromBottom 0.3s ease forwards;
    border-left: 4px solid #2196F3;
    position: relative;
    overflow: hidden;
    min-height: 73px;
    max-height: 90px;
    width: 100%;
    /* 🔥 IMPOSTA LARGHEZZA COMPLETA */
    align-items: center;
    transform: translateY(100%);
    /* 🔥 PARTI NASCOSTA */
    opacity: 0;
    z-index: 100000;
}

/* CONTENUTO PRINCIPALE */
.notification .content {
    grid-column: 2;
    font-size: 14px;
    line-height: 1.4;
    padding: 15px 12px;
    text-align: left;
    align-self: center;
    word-wrap: break-word;
    overflow: hidden;
}

/* CLOSE BUTTON MIGLIORATO */
.notification .close {
    grid-column: 3;
    background: transparent;
    border: none;
    font-size: 0 !important;
    cursor: pointer;
    color: inherit;
    padding: 0;
    width: 45px;
    height: -webkit-fill-available;
    min-width: auto;
    min-height: auto;
    border-left: 1px solid var(--color-charcoal-500);
    border-radius: 0;
    margin: auto;
    display: flex;
    justify-content: center;
    line-height: normal;
    letter-spacing: normal;
    white-space: break-spaces;
    text-align: initial;
    align-items: center;
}

.notification .close:before {
    content: '\fa90';
    font-family: 'ito-icon-to5-essential';
    font-size: 22px;
}

.notification .close:hover {
    color: var(--color-black);
    background: var(--badge-bg-premium);
}

/* ICONE PER TIPI */
.notification::before {
    grid-column: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'ito-icon-to5-essential' !important;
    font-size: 24px !important;
    margin: 0 12px;
}

.notification:not(.success):not(.error):not(.info)::before {
    content: '\ee39' !important;
}


/* ANIMAZIONI */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* PROGRESS BAR */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progressBar linear forwards;
    z-index: 1;
}

/* CLASSI UTILITY PER GESTIONE DINAMICA */
.notification.entering {
    animation: slideInFromBottom 0.3s ease forwards;
}

.notification.exiting {
    animation: slideOutRight 0.3s ease forwards;
}

/* Mantieni i tuoi stili esistenti per success/error */
.notification.success {
    color: #fff !important;
    background: #909a83 !important;
    border-left-color: #636a5b !important;
}

.notification.error {
    color: #fff !important;
    background: #c93227 !important;
    border-left-color: #F44336 !important;
    background: #F44336 !important;
}

.notification.error::before {
    content: '\ee39';
    font-family: 'ito-icon-to5-essential';
    position: relative;
    font-size: 17px;
    left: 0px;
    top: 0px;
    grid-column: 1;
    margin-top: auto;
    margin-left: 8px;
    margin-bottom: auto;
}

.notification.success::before {
    content: '\ee43';
    position: relative;
    font-family: 'ito-icon-to5-essential';
    font-size: 17px;
    left: 0px;
    top: 0px;
    grid-column: 1;
    margin-top: auto;
    margin-left: 8px;
    margin-bottom: auto;
}

.notification .content {
    display: flex;
    grid-column: 2;
    font-size: 14px;
    line-height: 1.4;
    margin: 10px auto;
    margin-left: inherit;
    text-wrap-style: auto;
    text-align: left;
    align-items: center;
}

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

    to {
        width: 0%;
    }
}