/* Monitoring Page Enhancements */

/* Progress Bar Severity Colors */
.progress-bar.mild {
    background: linear-gradient(90deg, #28a745 0%, #34ce57 100%);
}

.progress-bar.moderate {
    background: linear-gradient(90deg, #ffc107 0%, #ffcd39 100%);
}

.progress-bar.severe {
    background: linear-gradient(90deg, #dc3545 0%, #e4606d 100%);
}

/* Upload Preview Enhancements */
.upload-preview {
    text-align: center;
    padding: 1rem;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.preview-info {
    background: var(--bg-body, #f8f9fa);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.preview-info p {
    margin: 0.25rem 0;
    color: var(--text-secondary, #666);
}

.preview-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Analysis Button States */
.btn.ready {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(45, 90, 39, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45, 90, 39, 0.7);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(45, 90, 39, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45, 90, 39, 0);
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

/* Success Button State */
.btn.success {
    background-color: var(--success-color, #28a745) !important;
    border-color: var(--success-color, #28a745) !important;
    color: white !important;
}

/* Notification Enhancements */
.api-notification {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Result Status Badges */
.result-status .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Recommendation Items */
.recommendation-item.urgent {
    border-left: 3px solid var(--danger-color, #dc3545);
    background: rgba(220, 53, 69, 0.05);
}

.recommendation-item.urgent .rec-icon {
    color: var(--danger-color, #dc3545);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .preview-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .preview-actions .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .upload-preview img {
        max-height: 200px;
    }
    
    .preview-info {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .upload-preview {
        padding: 0.5rem;
    }
    
    .upload-preview img {
        max-height: 150px;
    }
    
    .preview-info p {
        font-size: 0.75rem;
    }
}

/* Backend Status Indicator */
.backend-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 1000;
    display: none;
}

.backend-status.online {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.backend-status.offline {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

/* Analysis Results Enhancements */
.results-section {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Confidence Indicator */
.confidence-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.confidence-bar {
    width: 60px;
    height: 4px;
    background: var(--border-light, #e9ecef);
    border-radius: 2px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: var(--primary-color, #2d5a27);
    transition: width 0.3s ease;
}

/* Source Indicator */
.source-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: var(--bg-body, #f8f9fa);
    color: var(--text-secondary, #666);
}

.source-indicator.backend {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color, #28a745);
}

.source-indicator.simulation {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color, #ffc107);
}