/**
 * SML Pipeline Widget CSS
 * Clinical Precision Design - 연구소/바이오텍 스타일
 */

/* ============================================
   SML Pipeline - Clinical Precision Design
   ============================================ */

.sml-pipeline-section {
    --sml-primary: #0A2540;
    --sml-secondary: #00C9A7;
    --sml-accent: #00D4FF;
    --sml-bg-white: #FFFFFF;
    --sml-bg-gray: #F8FAFB;
    --sml-border: #E2E8F0;
    --sml-text: #1A1A2E;
    --sml-text-muted: #64748B;

    /* Dynamic CSS Variables from PHP */
    --pipeline-primary-color: var(--pipeline-primary, var(--sml-secondary));
    --pipeline-highlight-color: var(--pipeline-highlight, var(--sml-accent));
    --pipeline-header-background: var(--pipeline-header-bg, var(--sml-primary));
    
    padding: 80px 0;
    background: var(--sml-bg-gray);
    position: relative;
}

.sml-pipeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(0, 201, 167, 0.06) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

/* Header */
.sml-pipeline-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.sml-pipeline-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--sml-secondary);
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.15), rgba(0, 212, 255, 0.15));
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.sml-pipeline-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--sml-primary);
    margin: 0 0 16px;
    font-family: var(--sml-font-display, 'Plus Jakarta Sans', sans-serif);
}

.sml-pipeline-subtitle {
    font-size: 18px;
    color: var(--sml-text-muted);
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
}

/* Table Layout */
.sml-pipeline-table-wrapper {
    overflow-x: auto;
    background: var(--sml-bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(10, 37, 64, 0.06);
    position: relative;
}

.sml-pipeline-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.sml-pipeline-table th {
    background: linear-gradient(135deg, var(--sml-primary) 0%, #0D3354 100%);
    color: #fff;
    padding: 20px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
    position: relative;
}

.sml-pipeline-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sml-secondary), var(--sml-accent));
}

.sml-pipeline-table th:first-child {
    text-align: left;
    padding-left: 24px;
    border-radius: 16px 0 0 0;
}

.sml-pipeline-table th:last-child {
    border-radius: 0 16px 0 0;
}

.sml-pipeline-table td {
    padding: 20px 12px;
    border-bottom: 1px solid var(--sml-border);
    vertical-align: middle;
}

.sml-pipeline-table tr:last-child td {
    border-bottom: none;
}

.sml-pipeline-table tr:hover td {
    background-color: rgba(0, 201, 167, 0.03);
}

.sml-pipeline-table tr.highlighted td {
    background-color: rgba(0, 201, 167, 0.06);
}

.sml-pipeline-program {
    font-weight: 600;
    color: var(--sml-primary);
    font-size: 15px;
    font-family: var(--sml-font-display, 'Plus Jakarta Sans', sans-serif);
}

.sml-pipeline-program.featured::after {
    content: '★';
    margin-left: 8px;
    color: var(--sml-accent);
}

.sml-pipeline-indication {
    font-size: 13px;
    color: var(--sml-text-muted);
    margin-top: 4px;
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
}

.sml-pipeline-modality {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.15), rgba(0, 212, 255, 0.1));
    color: var(--sml-secondary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
}

/* Stage Indicators */
.sml-pipeline-stage-cell {
    text-align: center;
    position: relative;
}

.sml-pipeline-stage-bar {
    position: relative;
    height: 8px;
    background: var(--sml-border);
    border-radius: 4px;
    overflow: hidden;
}

.sml-pipeline-stage-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--sml-secondary), var(--sml-accent));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.sml-pipeline-stage-fill.highlighted {
    background: linear-gradient(90deg, var(--sml-accent), var(--sml-secondary));
}

.sml-pipeline-stage-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin: 0 auto;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.sml-pipeline-stage-dot.active {
    background: linear-gradient(135deg, var(--sml-secondary), var(--sml-accent));
    box-shadow: 0 0 0 6px rgba(0, 201, 167, 0.25), 0 4px 12px rgba(0, 201, 167, 0.4);
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.sml-pipeline-stage-dot.inactive {
    background: var(--sml-border);
    border: 2px dashed #CBD5E1;
}

.sml-pipeline-stage-dot.highlighted {
    background: linear-gradient(135deg, var(--sml-accent), #00E5C7);
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.25), 0 4px 12px rgba(0, 212, 255, 0.4);
}

/* Cards Layout */
.sml-pipeline-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 28px;
    position: relative;
}

.sml-pipeline-card {
    background: var(--sml-bg-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(10, 37, 64, 0.06);
    border-left: 4px solid var(--sml-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sml-pipeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.08), transparent);
    border-radius: 0 0 0 100%;
}

.sml-pipeline-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(10, 37, 64, 0.12);
}

.sml-pipeline-card.highlighted {
    border-left-color: var(--sml-accent);
}

.sml-pipeline-card.highlighted::before {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), transparent);
}

.sml-pipeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.sml-pipeline-card-name {
    font-family: var(--sml-font-display, 'Plus Jakarta Sans', sans-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--sml-primary);
}

.sml-pipeline-card-stage {
    font-family: var(--sml-font-mono, 'JetBrains Mono', monospace);
    font-size: 12px;
    font-weight: 600;
    color: var(--sml-secondary);
    background: rgba(0, 201, 167, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.sml-pipeline-card-indication {
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    color: var(--sml-text-muted);
    margin-bottom: 12px;
}

.sml-pipeline-card-desc {
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    color: var(--sml-text);
    line-height: 1.6;
}

/* Stage Progress Visualization */
.sml-pipeline-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
}

.sml-pipeline-progress-step {
    flex: 1;
    height: 6px;
    background: var(--sml-border);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.sml-pipeline-progress-step.completed {
    background: linear-gradient(90deg, var(--sml-secondary), var(--sml-accent));
}

.sml-pipeline-progress-step.current {
    background: linear-gradient(90deg, var(--sml-secondary), var(--sml-accent));
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 201, 167, 0.4); }
    50% { box-shadow: 0 0 8px 2px rgba(0, 201, 167, 0.2); }
}

/* Responsive */
@media (max-width: 768px) {
    .sml-pipeline-section {
        padding: 60px 16px;
    }

    .sml-pipeline-title {
        font-size: 32px;
    }

    .sml-pipeline-cards {
        grid-template-columns: 1fr;
    }

    .sml-pipeline-card {
        padding: 24px;
    }

    .sml-pipeline-table-wrapper {
        border-radius: 12px;
    }
}
