/**
 * Diet Generation Banner CSS
 * Styling per il banner di progresso generazione dieta
 */

.diet-generation-banner {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideDown 0.3s ease-out;
    transition: opacity 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-icon {
    flex-shrink: 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.banner-content {
    flex: 1;
}

.banner-content h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.banner-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    opacity: 0.9;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: white;
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.9;
}

.banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-loading {
    background: #667eea;
    display: flex;
    align-items: center;
    gap: 12px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .diet-generation-banner {
        padding: 16px 20px;
        gap: 12px;
    }

    .banner-content h4 {
        font-size: 16px;
    }

    .banner-content p {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .spinner {
        width: 32px;
        height: 32px;
    }

    .toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        max-width: calc(100% - 32px);
    }
}
