/* 静态说明页公共样式 */
.docs-modal {
    --bs-modal-width: 90vw;
    max-width: 1000px;
}

.docs-modal .modal-body {
    padding: 1.5rem;
}

.docs-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.docs-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.docs-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
}

/* 示例图表区域 */
.example-section {
    margin-bottom: 2rem;
}

.example-tables {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.example-table {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.example-table-title {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

.example-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.example-table th,
.example-table td {
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.6rem;
    text-align: center;
    vertical-align: middle;
}

.example-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* 转换箭头 */
.transform-arrow {
    align-self: center;
    font-size: 1.5rem;
    color: #007bff;
    font-weight: bold;
}

/* 配置说明区域 */
.config-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.config-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.config-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

@media (max-width: 768px) {
    .config-list {
        grid-template-columns: 1fr;
    }
}

.config-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.config-value {
    color: #2c3e50;
    font-size: 0.85rem;
    flex: 1;
}

.config-value code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8rem;
    color: #e83e8c;
}

/* 颜色标识 */
.color-legend {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #495057;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* 表格背景色 - 子表识别 */
.bg-subtable-anchor { background-color: #fff3cd !important; } /* 锚点 */
.bg-subtable-target { background-color: #d1ecf1 !important; } /* 目标区域 */
.bg-subtable-extracted { background-color: #d4edda !important; } /* 提取结果 */

/* 表格背景色 - 交叉表展开 */
.bg-unpivot-row-header { background-color: #f8d7da !important; } /* 行头 */
.bg-unpivot-col-header { background-color: #d1ecf1 !important; } /* 列头 */
.bg-unpivot-data { background-color: #fff3cd !important; } /* 数据区 */
.bg-unpivot-result { background-color: #d4edda !important; } /* 结果 */

/* 表格背景色 - 内容拆分 */
.bg-split-target { background-color: #fff3cd !important; } /* 待拆分列 */
.bg-split-result { background-color: #d4edda !important; } /* 拆分结果 */

/* 表格背景色 - 内容合并 */
.bg-merge-source { background-color: #d1ecf1 !important; } /* 源列 */
.bg-merge-result { background-color: #d4edda !important; } /* 合并结果 */

/* 表格背景色 - 行聚合 */
.bg-aggregate-group { background-color: #f8d7da !important; } /* 分组列 */
.bg-aggregate-data { background-color: #fff3cd !important; } /* 聚合数据列 */
.bg-aggregate-result { background-color: #d4edda !important; } /* 聚合结果 */

/* 响应式设计 */
@media (max-width: 768px) {
    .docs-modal {
        --bs-modal-width: 95vw;
    }
    
    .example-tables {
        flex-direction: column;
        gap: 1rem;
    }
    
    .transform-arrow {
        align-self: center;
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    
    .color-legend {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    .example-table th,
    .example-table td {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* 特殊提示 */
.docs-tip {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #055160;
}

.docs-tip .tip-icon {
    color: #0d6efd;
    margin-right: 0.5rem;
}