/*
  Toast Notifications
  Notifiche temporanee in alto a destra
*/

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.toast-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.dark-mode .toast-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Toast types */
.toast-success {
    border-left-color: #4caf50;
}

.toast-success .toast-icon {
    color: #4caf50;
}

.toast-error {
    border-left-color: #f44336;
}

.toast-error .toast-icon {
    color: #f44336;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-warning .toast-icon {
    color: #ff9800;
}

.toast-info {
    border-left-color: var(--logo-gold);
}

.toast-info .toast-icon {
    color: var(--logo-gold);
}

/* Dark mode */
.dark-mode .toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .toast {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .toast-icon svg {
        width: 18px;
        height: 18px;
    }
}