/* Custom CSS for MTDataPro Documentation */

/* 首页标题样式 */
.wy-body-for-nav .wy-banner {
    background: linear-gradient(135deg, #2980B9 0%, #3498db 100%);
    padding: 2em;
    text-align: center;
}

.wy-banner h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

.wy-banner p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2em;
}

/* Logo 样式 */
.logo {
    height: 60px;
    margin: 10px 0;
}

/* 版本徽章 */
.version {
    color: #2980B9;
    font-weight: bold;
}

/* 快速链接卡片 */
.toctree-wrapper .grid {
    margin: 1.5em 0;
}

/* 代码块样式 */
.highlight {
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 1em 0;
}

/* 表格样式 */
.wy-table-responsive table {
    margin: 1em 0;
}

.wy-table-responsive th {
    background-color: #2980B9;
    color: white;
}

/* 提示框样式 */
.admonition-note {
    border-left-color: #3498db;
}

.admonition-note .admonition-title {
    background-color: #3498db;
}

.admonition-warning {
    border-left-color: #f39c12;
}

.admonition-warning .admonition-title {
    background-color: #f39c12;
}

.admonition-tip {
    border-left-color: #27ae60;
}

.admonition-tip .admonition-title {
    background-color: #27ae60;
}

/* 侧边栏样式 */
.wy-nav-side {
    background-color: #343131;
}

.wy-nav-content {
    max-width: 1000px;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 1.5em;
    background-color: #f8f9fa;
    border-top: 1px solid #e1e4e5;
    margin-top: 2em;
}

/* Mermaid 流程图样式 - 自适应容器宽度 */
pre.mermaid {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    background-color: #f8f9fa;
    padding: 1em;
    border-radius: 4px;
    margin: 1.5em 0;
    text-align: center;
}

pre.mermaid > svg {
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Mermaid SVG text - 匹配正文 16px 字号，避免尺寸计算不匹配 */
pre.mermaid svg text,
pre.mermaid svg tspan {
    font-size: 16px !important;
}

/* 限制 Mermaid 容器最大宽度不超过正文区域 */
body .wy-nav-content pre.mermaid,
.rst-content pre.mermaid {
    max-width: 100%;
}

/* 首页网格卡片样式 */
.sd-card {
    border: 1px solid #e1e4e5;
    border-radius: 4px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.sd-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.sd-card-title {
    font-weight: bold;
    color: #2980B9;
}

/* 搜索框样式 */
.wy-side-nav-search {
    background-color: #2980B9;
}

/* 面包屑导航 */
.wy-breadcrumbs {
    margin-bottom: 1em;
}

/* Equation blocks - ensure proper display */
div.math.notranslate {
    display: block;
    width: 100%;
    overflow: visible;
}

/* Style for equation number paragraphs that immediately follow math blocks */
div.math + p {
    text-align: right;
    color: #666;
    font-size: 0.9em;
    margin-top: 0.2em;
    margin-bottom: 1.2em;
    font-family: "Times New Roman", serif;
}

/* Make emphasis (italic) in equation number match the paragraph styling */
div.math + p em {
    font-style: normal;
}
