/**
 * Stili per il Sistema di Notifiche Toast
 * Notifiche sempre visibili in alto a destra
 */

/* Container delle notifiche */
.toast-container {
    position: fixed;
    top: 70px; /* Sotto l'header */
    right: 20px;
    z-index: 1080; /* Sopra modal (1070) */
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* Singola notifica */
.toast-notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    overflow: hidden;
    border-left: 4px solid;
    min-width: 300px;
    max-width: 400px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Colori per tipo */
.toast-notification.toast-success {
    border-left-color: #198754;
}

.toast-notification.toast-error {
    border-left-color: #dc3545;
}

.toast-notification.toast-warning {
    border-left-color: #ffc107;
}

.toast-notification.toast-info {
    border-left-color: #0dcaf0;
}

/* Contenuto del toast */
.toast-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Barra di progresso */
.toast-progress {
    height: 3px;
    background-color: #e9ecef;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    animation: toast-progress linear forwards;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .toast-notification {
        min-width: auto;
        max-width: 100%;
    }
}

/* Animazione di entrata più fluida */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification.show {
    animation: slideInRight 0.3s ease-out;
}

