/* AIE™ Clinical UI Styling (P2 Product Layer) */
/* Timeline, progress indicators, clinical language abstraction */

/* Header Step Indicator */
#current-phase .step-number {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    margin-right: var(--spacing-xs);
}

/* Clinical Timeline (Full View) */
.clinical-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl) var(--spacing-lg);
    background-color: var(--color-surface);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xl);
    overflow-x: auto;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    position: relative;
}

.timeline-marker {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    border: 3px solid #e0e0e0;
    margin-bottom: var(--spacing-sm);
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.timeline-icon {
    font-size: 20px;
    font-weight: 700;
    color: #757575;
}

.timeline-step.complete .timeline-marker {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.timeline-step.complete .timeline-icon {
    color: white;
    font-size: 24px;
}

.timeline-step.current .timeline-marker {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.2);
    animation: pulse 2s infinite;
}

.timeline-step.current .timeline-icon {
    color: white;
}

.timeline-step.pending .timeline-marker {
    background-color: white;
    border-color: #e0e0e0;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(25, 118, 210, 0.1);
    }
}

.timeline-label {
    text-align: center;
    max-width: 120px;
}

.timeline-label-main {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.timeline-step.pending .timeline-label-main {
    color: var(--color-text-secondary);
}

.timeline-label-sub {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.timeline-step.current .timeline-label-sub {
    color: var(--color-primary);
    font-weight: 600;
}

.timeline-step.complete .timeline-label-sub {
    color: var(--color-success);
}

.timeline-connector {
    flex: 1;
    height: 3px;
    background-color: #e0e0e0;
    margin: 0 var(--spacing-xs);
    position: relative;
    top: -32px;
    min-width: 40px;
}

.timeline-connector.complete {
    background-color: var(--color-success);
}

/* Compact Progress Bar */
.progress-bar-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.progress-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
}

.progress-step {
    font-weight: 700;
    color: var(--color-primary);
}

.progress-label {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--color-text);
}

.progress-percent {
    font-weight: 700;
    color: var(--color-text-secondary);
}

.progress-bar-track {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-info));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Navigation Blocker */
.navigation-blocker {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: #fff3e0;
    border: 2px solid var(--color-warning);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
}

.blocker-icon {
    font-size: 32px;
}

.blocker-message {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

/* Phase Navigation Buttons (Clinical Labels) */
.phase-navigation .btn {
    font-size: 16px;
    padding: 12px 24px;
}

.phase-navigation .btn-primary::before {
    content: '';
    /* Remove phase number prefix */
}

/* Step Completion Badge */
.step-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background-color: #e8f5e9;
    color: var(--color-success);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.step-complete-badge::before {
    content: '✓';
    font-size: 16px;
}

/* Clinical Status Summary */
.clinical-status-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.status-item {
    padding: var(--spacing-md);
    background-color: white;
    border-left: 4px solid var(--color-info);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.status-item.complete {
    border-left-color: var(--color-success);
}

.status-item.current {
    border-left-color: var(--color-primary);
    background-color: #e3f2fd;
}

.status-item-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.status-item-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

/* Responsive Timeline */
@media (max-width: 1024px) {
    .clinical-timeline {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .timeline-connector {
        display: none;
    }
    
    .timeline-step {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .clinical-timeline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .timeline-step {
        flex-direction: row;
        justify-content: flex-start;
        gap: var(--spacing-md);
        min-width: auto;
        width: 100%;
        padding: var(--spacing-sm) 0;
        border-left: 3px solid #e0e0e0;
        padding-left: var(--spacing-md);
    }
    
    .timeline-step.complete {
        border-left-color: var(--color-success);
    }
    
    .timeline-step.current {
        border-left-color: var(--color-primary);
    }
    
    .timeline-marker {
        margin-bottom: 0;
    }
    
    .timeline-label {
        text-align: left;
        max-width: none;
    }
    
    .progress-bar-info {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .progress-label {
        width: 100%;
        text-align: left;
        order: 3;
    }
}
