/**
 * 问题分解树分析组件样式
 */

/* 问题树分析容器 */
.problem-tree-analysis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 问题树可视化区域 */
.problem-tree-visualization {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.problem-tree-visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* 问题树节点样式 */
.tree-node {
    background: white;
    border: 2px solid #607D8B;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.tree-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #455A64;
}

.tree-node.root {
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
    color: white;
    border-color: #37474F;
    font-weight: 600;
}

.tree-node.cause {
    background: linear-gradient(135deg, #FF5722 0%, #D84315 100%);
    color: white;
    border-color: #BF360C;
}

.tree-node.effect {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-color: #1565C0;
}

.tree-node.solution {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    border-color: #2E7D32;
}

/* 问题树连接线 */
.tree-connection {
    position: relative;
    height: 20px;
    margin: 0 8px;
}

.tree-connection::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #607D8B 0%, #90A4AE 50%, #607D8B 100%);
    transform: translateY(-50%);
}

.tree-connection::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 0;
    height: 0;
    border-left: 6px solid #607D8B;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transform: translateY(-50%);
}

/* 分析维度标签 */
.analysis-dimension {
    display: inline-block;
    background: rgba(96, 125, 139, 0.1);
    color: #607D8B;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin: 2px;
    border: 1px solid rgba(96, 125, 139, 0.2);
}

.analysis-dimension.people { background: rgba(255, 152, 0, 0.1); color: #FF9800; border-color: rgba(255, 152, 0, 0.2); }
.analysis-dimension.process { background: rgba(156, 39, 176, 0.1); color: #9C27B0; border-color: rgba(156, 39, 176, 0.2); }
.analysis-dimension.technology { background: rgba(33, 150, 243, 0.1); color: #2196F3; border-color: rgba(33, 150, 243, 0.2); }
.analysis-dimension.environment { background: rgba(76, 175, 80, 0.1); color: #4CAF50; border-color: rgba(76, 175, 80, 0.2); }
.analysis-dimension.management { background: rgba(244, 67, 54, 0.1); color: #F44336; border-color: rgba(244, 67, 54, 0.2); }
.analysis-dimension.resource { background: rgba(255, 193, 7, 0.1); color: #FFC107; border-color: rgba(255, 193, 7, 0.2); }
.analysis-dimension.communication { background: rgba(0, 188, 212, 0.1); color: #00BCD4; border-color: rgba(0, 188, 212, 0.2); }
.analysis-dimension.external { background: rgba(158, 158, 158, 0.1); color: #9E9E9E; border-color: rgba(158, 158, 158, 0.2); }

/* 优先级指示器 */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.priority-indicator.high {
    color: #F44336;
}

.priority-indicator.medium {
    color: #FF9800;
}

.priority-indicator.low {
    color: #4CAF50;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.priority-dot.high { background: #F44336; }
.priority-dot.medium { background: #FF9800; }
.priority-dot.low { background: #4CAF50; }

/* 分析方法标签 */
.analysis-method {
    display: inline-block;
    background: rgba(96, 125, 139, 0.15);
    color: #455A64;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    margin: 4px;
    border: 1px solid rgba(96, 125, 139, 0.3);
    font-weight: 500;
}

/* 问题类型标签 */
.problem-type {
    display: inline-block;
    background: rgba(96, 125, 139, 0.1);
    color: #607D8B;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8em;
    margin: 2px;
    border: 1px solid rgba(96, 125, 139, 0.2);
}

/* 解决方案卡片 */
.solution-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.solution-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #607D8B;
}

.solution-card h4 {
    color: #455A64;
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.solution-card .solution-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.solution-card .solution-impact {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #F0F0F0;
    font-size: 0.85em;
    color: #888;
}

/* 影响评估矩阵 */
.impact-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.impact-item {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.impact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.impact-item .impact-level {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
}

.impact-item .impact-level.high { color: #F44336; }
.impact-item .impact-level.medium { color: #FF9800; }
.impact-item .impact-level.low { color: #4CAF50; }

/* 时间线分析 */
.timeline-analysis {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin: 16px 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #607D8B;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #607D8B;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 20px;
    width: 2px;
    height: calc(100% + 8px);
    background: #E0E0E0;
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-date {
    font-weight: 600;
    color: #455A64;
    font-size: 0.9em;
}

.timeline-content {
    margin-top: 4px;
    color: #666;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .problem-tree-analysis-container {
        padding: 10px;
    }
    
    .problem-tree-visualization {
        padding: 15px;
    }
    
    .tree-node {
        padding: 10px 12px;
        margin: 6px;
        font-size: 0.9em;
    }
    
    .impact-matrix {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        padding-left: 25px;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .problem-tree-visualization {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .tree-node {
        background: #34495e;
        color: #ecf0f1;
        border-color: #607D8B;
    }
    
    .solution-card {
        background: #34495e;
        border-color: #607D8B;
        color: #ecf0f1;
    }
    
    .impact-item {
        background: #34495e;
        border-color: #607D8B;
        color: #ecf0f1;
    }
    
    .timeline-item::before {
        background: #607D8B;
        border-color: #34495e;
        box-shadow: 0 0 0 2px #607D8B;
    }
} 