/**
 * Task Progress Visualization CSS
 * Visual components for the unified status system
 */

/* Main Progress Bar Component */
.task-progress-container {
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.progress-bar-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 4px;
    transition: width 0.5s ease, background-color 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Step Indicators */
.progress-steps {
    margin-top: 10px;
}

.step-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.step-indicator.completed {
    background: #4CAF50;
    border-color: #4CAF50;
    transform: scale(1.1);
}

.step-indicator.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 8px;
    font-weight: bold;
}

.step-indicator.current {
    background: #FF9800;
    border-color: #FF9800;
    animation: pulse 1.5s infinite;
    transform: scale(1.2);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.step-indicator.pending {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

/* Progress Text */
.progress-text {
    text-align: center;
    margin-top: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.step-info {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.status-info {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-percentage {
    font-weight: 700;
    color: #4CAF50;
    font-size: 18px;
}

/* Phase Tabs Component */
.phase-tabs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.phase-tab {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.phase-tab.completed {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f8f9fa, #e8f5e9);
}

.phase-tab.current {
    border-color: #FF9800;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    0% { box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2); }
    100% { box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4); }
}

.phase-tab.pending {
    background: #f5f5f5;
    opacity: 0.7;
}

.phase-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 30px;
}

.phase-info {
    flex: 1;
}

.phase-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.phase-steps {
    font-size: 12px;
    color: #666;
}

.phase-status {
    margin-left: 10px;
}

.phase-progress-indicator {
    font-size: 16px;
}

/* Pulse Indicator */
.pulse-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #FF9800;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Task Flow Visualization */
.task-flow-visualization {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flow-timeline {
    position: relative;
    padding: 20px 0;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.flow-step.completed {
    opacity: 0.8;
}

.flow-step.completed .step-circle {
    background: #4CAF50;
    color: white;
}

.flow-step.current {
    transform: scale(1.02);
}

.flow-step.current .step-circle {
    background: #FF9800;
    color: white;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.flow-step.pending {
    opacity: 0.5;
}

.flow-step.pending .step-circle {
    background: #e0e0e0;
    color: #999;
}

.step-circle {
    min-width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 3px solid #e0e0e0;
    margin-right: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.step-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.step-number {
    font-size: 10px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1px 4px;
}

.step-content {
    flex: 1;
    padding-top: 5px;
}

.step-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.step-phase {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.step-progress {
    font-size: 12px;
    font-weight: 600;
    color: #4CAF50;
    margin-bottom: 8px;
}

.step-status-indicator {
    font-size: 14px;
    color: #FF9800;
    font-weight: 500;
}

/* Flow Connectors */
.flow-connector {
    position: absolute;
    left: 29px;
    top: 60px;
    width: 2px;
    height: 30px;
    background: #e0e0e0;
    transition: background-color 0.3s ease;
}

.flow-connector.completed {
    background: #4CAF50;
}

.flow-connector.pending {
    background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .phase-tabs-container {
        grid-template-columns: 1fr;
    }
    
    .progress-info {
        flex-direction: column;
        text-align: center;
    }
    
    .flow-step {
        margin-bottom: 20px;
    }
    
    .step-circle {
        min-width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .step-icon {
        font-size: 16px;
    }
    
    .step-number {
        font-size: 9px;
    }
    
    .flow-connector {
        left: 24px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .task-progress-container {
        padding: 15px;
    }
    
    .progress-steps {
        display: none;
    }
    
    .phase-tab {
        padding: 12px;
    }
    
    .phase-icon {
        font-size: 20px;
        margin-right: 8px;
    }
    
    .phase-name {
        font-size: 14px;
    }
    
    .step-circle {
        min-width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .step-icon {
        font-size: 14px;
    }
    
    .flow-connector {
        left: 19px;
    }
} 