@import url("theme.css");

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Arial", "微软雅黑", "黑体", "Helvetica Neue", "Source Han Sans CN", "sans-serif", "Hiragino Sans GB";
}

.rst-content a,
#docname-zh a {
    color: rgb(187, 142, 77) !important;
}

.wy-nav-content {
    max-width: 100%;
}
pre.literal-block{
    background-color: #eeffcc;
}
.highlight .k{
    color: #444444;
    font-weight: normal;
}

.wy-side-nav-search,
.wy-nav-side {
    background: #f4f4ff;
    background: #f4f4ff;
}

.icon.icon-home {
    line-height: 24px;
}

.wy-menu-vertical a,
.wy-menu-vertical header,
.wy-menu-vertical p.caption,
.wy-side-nav-search .wy-dropdown>a,
.wy-side-nav-search>a {
    color: #000;
}

.wy-menu-vertical a:hover {
    background-color: #d4d4f1;
    cursor: pointer;
}

.wy-body-for-nav::before {
    content: "后摩智能文档中心";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    font-size: 18px;
    right: 0;
    bottom: 0;
    background: #000;
    color: #ffffff;
    z-index: 999;
    height: 60px;
    line-height: 60px;
    padding-left: 45px;
    width: 100%;
    font-family: "PingFang SC", "Microsoft YaHei", "Arial", "微软雅黑", "黑体", "Helvetica Neue", "Source Han Sans CN", "sans-serif", "Hiragino Sans GB";
    box-shadow: 0px 3px 4px #02020259;
}

.wy-nav-side {
    top: 60px;
}

.wy-nav-content {
    margin-top: 60px;
}

.wy-side-nav-search {
    display: block;
    width: 300px;
    padding: .809em 36px;
    margin-bottom: .809em;
    z-index: 200;
    text-align: left;
    color: #fcfcfc;
    margin-top: 18px;
}

.wy-menu-vertical {
    width: 300px;
    padding: 0px 30px 0px 14px;
}

.rst-content > div:first-child hr {
    display: none;
}

.rst-content > .document {
    margin-top: 30px;
}

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

.wy-menu-vertical a {
    /* border-radius: 6px; */
}

.wy-breadcrumbs a {
    /* color: #6f6fff !important; */
}

.wy-side-nav-search a::before {
    display: none;
}

.wy-menu-vertical li.current {
    /* background-color: #e0e0f5; */
    background-color: transparent;
}

.wy-menu-vertical li.toctree-l1.current>a {
    border-width: 0px;
}

.wy-menu-vertical li.current>a {
    /* background-color: #d4d4f1;*/
    background-color: transparent;
}

.wy-nav-side {
    border-right: 1px solid #e7e7e7;
}

.wy-menu-vertical li.toctree-l2.current>a {
    /* background: #a5a5ff; */
}

.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a {
    background: transparent;
}

.wy-menu-vertical li.current a:hover {
    background-color: #d4d4f1;
}

.wy-menu-vertical li.current>a:hover, .wy-menu-vertical li.on a:hover {
    background-color: #d4d4f1;
}

.wy-menu-vertical li.current a {
    border-width: 0px;
}

.highlight pre {
    background-color: #ebebeb !important;
}

.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a {
    background: #d5d5d5;
}


.attention .admonition-title {
    background-color: #ffa500;
}

.warning .admonition-title {
    background-color: #ff7878 !important;
}

.warning {
    background-color: #ffd9d9 !important;
}

html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt {
    background: #ebebeb !important;
    color: #bb9069 !important;
    border-top: 3px solid #b1b1b1  !important;
}

.rst-content .note .admonition-title, .rst-content .note .wy-alert-title, .rst-content .seealso .admonition-title, .rst-content .seealso .wy-alert-title, .rst-content .wy-alert-info.admonition-todo .admonition-title, .rst-content .wy-alert-info.admonition-todo .wy-alert-title, .rst-content .wy-alert-info.admonition .admonition-title, .rst-content .wy-alert-info.admonition .wy-alert-title, .rst-content .wy-alert-info.attention .admonition-title, .rst-content .wy-alert-info.attention .wy-alert-title, .rst-content .wy-alert-info.caution .admonition-title, .rst-content .wy-alert-info.caution .wy-alert-title, .rst-content .wy-alert-info.danger .admonition-title, .rst-content .wy-alert-info.danger .wy-alert-title, .rst-content .wy-alert-info.error .admonition-title, .rst-content .wy-alert-info.error .wy-alert-title, .rst-content .wy-alert-info.hint .admonition-title, .rst-content .wy-alert-info.hint .wy-alert-title, .rst-content .wy-alert-info.important .admonition-title, .rst-content .wy-alert-info.important .wy-alert-title, .rst-content .wy-alert-info.tip .admonition-title, .rst-content .wy-alert-info.tip .wy-alert-title, .rst-content .wy-alert-info.warning .admonition-title, .rst-content .wy-alert-info.warning .wy-alert-title, .rst-content .wy-alert.wy-alert-info .admonition-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .wy-alert.wy-alert-info .wy-alert-title {
    background: #e3b879 !important;
}

.rst-content .note, .rst-content .seealso, .rst-content .wy-alert-info.admonition, .rst-content .wy-alert-info.admonition-todo, .rst-content .wy-alert-info.attention, .rst-content .wy-alert-info.caution, .rst-content .wy-alert-info.danger, .rst-content .wy-alert-info.error, .rst-content .wy-alert-info.hint, .rst-content .wy-alert-info.important, .rst-content .wy-alert-info.tip, .rst-content .wy-alert-info.warning, .wy-alert.wy-alert-info {
    background: #fff3e1 !important;
}

.rst-content .admonition.seealso {
    background-color: #ececec !important;
}

.rst-content .admonition.seealso .admonition-title {
    background-color: #aeaeae !important;
}

.wy-side-nav-search>div.version {
    color: #717171;
    font-size: 12px;
    padding-left: 6px;
    margin-top: -1.2em;
    margin-bottom: 1em;
}
/* --- 1. 容器设置：允许横向和纵向滚动 --- */
.wy-table-responsive {
    max-height: 600px;
    overflow: auto;
    position: relative;
}
.wy-table-responsive table {
    border-collapse: separate;
    border-spacing: 0;
}
.wy-table-responsive thead th {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  color: #000000;
  font-weight: bold;
  z-index: 10;
}

/* --- 2. 强制表格按内容自动收缩 --- */
/* 使用 table[class*="auto-width"] 增强选择器优先级 */
table.docutils.auto-width {
    width: auto !important;         /* 撤销 100% 宽度 */
    table-layout: auto !important;  /* 恢复自动布局 */
    min-width: 0 !important;
}

/* 关键：强制忽略 <colgroup> 或 <col> 中的百分比设置 */
table.docutils.auto-width colgroup,
table.docutils.auto-width col {
    width: auto !important;
}

/* --- 3. 单元格设置：最小化宽度 --- */
table.docutils.auto-width thead th,
table.docutils.auto-width tbody td {
    width: auto !important;
    white-space: nowrap !important; /* 强制不换行，从而让列宽缩到最小 */
    padding: 8px 15px !important;   /* 留出舒适的间距 */
}

/* --- 4. 固定表头设置 --- */
table.docutils.auto-width thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #ffffff; !important; /* 你之前选定的棕金色 */
    color: #000000 !important;           /* 白色文字 */
    font-weight: bold;
    border-bottom: 2px solid #ccc;
}

/* 处理 Sphinx 特有的 th 内部 p 标签 */
table.docutils.auto-width thead th p {
    margin: 0 !important;
    background-color: transparent !important;
    color: inherit !important;
}

div.highlight button.copybtn {
    opacity: 1 !important;
    visibility: visible !important;
}
/* =========================================================
- 左侧导航子目录展开箭头
- 未展开时向下，展开后向上
- ========================================================= */
  
/* 为右侧箭头预留空间 */
.wy-menu-vertical li > a {
    position: relative;
    padding-right: 36px !important;
}

/* 将展开按钮移动到标题最右侧 */
.wy-menu-vertical li > a > button.toctree-expand {
    position: absolute !important;
    top: 0 !important;
    right: 4px !important;
    bottom: 0 !important;
    left: auto !important;

    z-index: 2;
    display: block !important;
    float: none !important;

    width: 30px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    color: transparent !important;
    font-size: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    cursor: pointer;
}

/* 隐藏主题原有图标 */
.wy-menu-vertical li > a > button.toctree-expand > * {
    display: none !important;
}

/* 未展开状态：箭头朝下 */
.wy-menu-vertical li > a > button.toctree-expand::before {
    content: "" !important;

    position: absolute;
    top: 50%;
    left: 50%;

    width: 6px;
    height: 6px;

    font-family: initial !important;

    border-top: 0;
    border-left: 0;
    border-right: 1.5px solid #636366;
    border-bottom: 1.5px solid #636366;

    transform: translate(-50%, -65%) rotate(45deg);
    transition: transform 0.15s ease;
}

/* 展开状态：箭头朝上 */
.wy-menu-vertical li.current > a > button.toctree-expand::before {
    transform: translate(-50%, -35%) rotate(225deg);
}

/* 清除主题可能添加的其他伪元素 */
.wy-menu-vertical li > a > button.toctree-expand::after {
    content: none !important;
    display: none !important;
}

/* 鼠标悬停时加深箭头颜色 */
.wy-menu-vertical li > a > button.toctree-expand:hover::before {
    border-right-color: #1d1d1f;
    border-bottom-color: #1d1d1f;
}
/* ==========================================
   Ordered list (ol > li) 嵌套层级样式
   第一层: 1. 2. 3. (浏览器默认)
   第二层: (1) (2) (3)
   第三层: a. b. c.
   使用 ::before 伪元素替代 ::marker，避免 list-style 相互覆盖
   ========================================== */

/* ---------- 第二层 ---------- */

/* 隐藏原生 marker */
ol ol.arabic {
    counter-reset: nested-2 !important;
    list-style: none !important;
}

ol ol.arabic > li {
    counter-increment: nested-2 !important;
    position: relative;
    padding-left: 1.8em;
}

/* 用 ::before 生成 (1) (2) (3) */
ol ol.arabic > li::before {
    content: "(" counter(nested-2) ") " !important;
    position: absolute;
    left: 0;
    top: 0;
    white-space: pre;
}

/* ---------- 第三层 ---------- */

/* 隐藏原生 marker */
ol ol ol.arabic {
    counter-reset: nested-3 !important;
    list-style: none !important;
}

ol ol ol.arabic > li {
    counter-increment: nested-3 !important;
    position: relative;
    padding-left: 1.8em;
}

/* 用 ::before 生成 a. b. c. */
ol ol ol.arabic > li::before {
    content: counter(nested-3, lower-alpha) ". " !important;
    position: absolute;
    left: 0;
    top: 0;
    white-space: pre;
}

ol ol.arabic > li::marker {
    content: "";
}

.rst-content section ol ol.arabic > li {
    margin-left: 0px;
}
div.highlight button.copybtn {
    opacity: 1 !important;
    visibility: visible !important;
}