/**
 * 文档关系图谱样式
 *
 * 该CSS文件定义了文档关系图谱的样式，
 * 包括节点、连线、标签、控制按钮等元素的样式
 *
 * @author duyipeng@163.com
 * @copyright 2026, Patrick Du
 * @license MIT
 */

.graph-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    font-size: 14px;
    line-height: 1.6;
}

.graph-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
}

.graph-control-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    min-width: 84px;
    text-align: center;
}

.graph-control-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.graph-info-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.graph-info-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 15px;
}

.graph-info-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.graph-node {
    stroke: var(--text-primary);
    stroke-width: 1.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.graph-node:hover {
    stroke-width: 3px;
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.8));
}

.graph-node-selected {
    stroke: #e74c3c;
    stroke-width: 3px;
    filter: drop-shadow(0 0 6px rgba(231, 76, 60, 0.8));
}

.graph-link {
    stroke: var(--border-color);
    stroke-opacity: 0.6;
    stroke-width: 1;
}

.graph-link-strong {
    stroke: #3498db;
    stroke-opacity: 0.8;
    stroke-width: 2;
}

.graph-label {
    font-size: 13px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    fill: var(--text-primary);
    font-family: inherit;
    font-weight: 500;
    text-shadow: 1px 1px 1px var(--bg-primary);
}

.graph-zoom-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.graph-zoom-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.graph-zoom-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .graph-controls {
        top: 50px;
        right: 5px;
    }
    
    .graph-info-panel {
        left: 5px;
        right: 5px;
        max-width: none;
    }
    
    .graph-zoom-controls {
        bottom: 5px;
        left: 5px;
    }
}
