/* ============================================
   Enhanced Progress Indicators - Phase 2
   ============================================ */

/* Progress bars with better visual feedback */
.progress {
    position: relative;
    border-radius: 8px;
    overflow: visible;
    background: rgba(0, 0, 0, 0.05);
    height: 8px;
}

.progress-bar {
    border-radius: 8px;
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: visible;
}

/* Animated shimmer effect for active progress */
.progress-bar.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Progress status messages with icons - use .progress-message-enhanced class to opt-in */
.progress-message-enhanced {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-message-enhanced::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

.progress-message-enhanced.success::before {
    content: '✓';
    border: none;
    color: #10b981;
    font-weight: bold;
    animation: none;
}

.progress-message-enhanced.error::before {
    content: '✕';
    border: none;
    color: #ef4444;
    font-weight: bold;
    animation: none;
}

.progress-message-enhanced.warning::before {
    content: '⚠';
    border: none;
    color: #f59e0b;
    animation: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Detailed progress information */
.progress-details {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* Progress stages indicator */
.progress-stages {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.progress-stage {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: #f3f4f6;
    font-size: 0.75rem;
    color: #6b7280;
    transition: all 0.3s ease;
}

.progress-stage.active {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.progress-stage.completed {
    background: #d1fae5;
    color: #065f46;
}

.progress-stage.completed::before {
    content: '✓ ';
    color: #10b981;
}

/* Enhanced upload progress */
.upload-progress-enhanced {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 1rem;
}

.upload-progress-enhanced .file-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-progress-enhanced .file-name::before {
    content: '📄';
    font-size: 1.25rem;
}

.upload-progress-enhanced .progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Processing steps indicator */
.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.processing-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.processing-step.active {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.processing-step.completed {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.processing-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.processing-step.pending .processing-step-icon {
    background: #e5e7eb;
    color: #9ca3af;
}

.processing-step.active .processing-step-icon {
    background: #3b82f6;
    color: white;
    animation: pulse 2s infinite;
}

.processing-step.completed .processing-step-icon::before {
    content: '✓';
}

.processing-step.completed .processing-step-icon {
    background: #22c55e;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.processing-step-text {
    flex: 1;
}

.processing-step-title {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.processing-step-description {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* Responsive progress indicators */
@media (max-width: 768px) {
    .progress-stages {
        flex-direction: column;
    }
    
    .progress-stage {
        text-align: left;
    }
    
    .processing-steps {
        gap: 0.5rem;
    }
    
    .processing-step {
        padding: 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .progress {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .progress-message-enhanced,
    .progress-details {
        color: #9ca3af;
    }
    
    .progress-stage {
        background: #374151;
        color: #d1d5db;
    }
    
    .progress-stage.active {
        background: #1e3a8a;
        color: #93c5fd;
    }
    
    .upload-progress-enhanced {
        background: #1f2937;
        border-color: #374151;
    }
    
    .processing-step {
        background: #1f2937;
    }
    
    .processing-step.active {
        background: #1e3a8a;
    }
}

