/* source/_static/custom.css */

/* 导入所选主题的默认样式，确保基础样式正确 */
/*@import url("theme.css");*/

/* 全局样式设置 */
body {
    font-family: "Arial", sans-serif;
    line-height: 1.6;
    font-size: 16px;
    color: #333;
}

.wy-nav-content-wrap {
    margin-left: 300px !important;
    background-color: #fcfcfc;
}

/* 侧边栏样式 */
.wy-nav-side {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important; /* 使用视口高度 */
    overflow-y: auto !important; /* 允许垂直滚动 */
    background-color: #f8f8f8 !important;
    z-index: 200 !important;
    width: 300px !important; /* 明确宽度 */
}

/* 确保侧边栏内部元素也固定 */
.wy-side-scroll {
    position: static !important; /* 恢复默认定位 */
    height: auto !important;
    overflow: visible !important;
}

.sidebar {
    background-color: #f8f8f8;
}

/* 侧边栏标题样式 */
.wy-side-nav-search {
    background-color: #2980B9;
}

.wy-side-nav-search input[type="text"] {
    border-color: #ccc;
}

/* 侧边栏菜单样式 */
.wy-menu-vertical a {
    color: #333;
    text-decoration: none;
}

.wy-menu-vertical a:hover {
    background-color: #e0e0e0;
    text-decoration: underline;
}

.wy-menu-vertical li.current a {
    background-color: #e3e3e3;
    border-right: none;
}

/* 顶部导航栏样式 */
.wy-nav-top {
    background-color: #2980B9;
}

/* 链接样式 */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: #222;
    font-family: "Arial", sans-serif;
}

h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.75em;
}

h3 {
    font-size: 1.5em;
}

/* 代码块样式 */
.highlight {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

pre {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    overflow: auto;
}

code {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 4px;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 引用块样式 */
blockquote {
    border-left: 4px solid #ddd;
    padding: 0 15px;
    color: #777;
    margin: 1em 0;
}

/* 警告/提示框样式 */
.admonition {
    border-radius: 4px;
    margin: 1em 0;
    padding: 12px;
}

.admonition.note {
    background-color: #e7f2fa;
    border-left: 4px solid #2980B9;
}

.admonition.warning {
    background-color: #ffedcc;
    border-left: 4px solid #f0b37e;
}

.admonition.error {
    background-color: #fdf3f2;
    border-left: 4px solid #f29f97;
}

.admonition-title {
    font-weight: bold;
    margin: 0 0 8px 0;
}

/* 页脚样式 */
footer {
    color: #999;
    font-size: 0.9em;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 右侧目录导航栏样式 */
.page-toc {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;;
    overflow: auto;
    background-color: #fff;
    border-left: 1px solid #eee;
    padding: 20px 15px;
    z-index: 100;
}

.page-toc h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.page-toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.page-toc li {
    margin: 8px 0;
    padding-left: 10px;
}

.page-toc a {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    transition: all 0.2s ease;
}

.page-toc a:hover {
    color: #007bff;
    padding-left: 5px;
}

.page-toc a.active {
    color: #007bff;
    font-weight: bold;
}

/* 调整主内容区域宽度 */
.wy-nav-content {
    max-width: 83% !important;
    /*margin-right: 250px;*/
}



/* 打印样式 */
@media print {
    body {
        font-size: 12pt;
        color: black;
    }

    a {
        color: black;
        text-decoration: none;
    }

    .wy-nav-side, .wy-nav-top {
        display: none;
    }

    .wy-nav-content-wrap {
        margin-left: 0;
    }
}
