@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 !important; /* 必须是 auto 或 scroll */
    position: relative;
}

/* --- 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;
}


/* 导航链接颜色（JS也会设置，这里作为兜底） */
/* 导航链接颜色 */
.wy-menu-vertical li a,
.wy-menu-vertical li a:visited {
  color: #404040 !important;
  background-color: transparent !important;
}

.wy-menu-vertical li a:hover {
  color: #2980b9 !important;
  background-color: #eeeeee !important;
  text-decoration: none !important;
}

.wy-menu-vertical li a:active {
  color: #2980b9 !important;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.on > a {
  color: #404040 !important;
}

/* button 折叠图标 */
.wy-menu-vertical button.toctree-expand {
  font-size: 0 !important;
  color: inherit !important;
}

.wy-menu-vertical li[data-expanded="true"] > a button.toctree-expand::before {
  font-family: FontAwesome !important;
  content: '\f147' !important;
  font-size: 14px !important;
  font-weight: normal !important;
  display: inline-block;
}

.wy-menu-vertical li[data-expanded="false"] > a button.toctree-expand::before {
  font-family: FontAwesome !important;
  content: '\f196' !important;
  font-size: 14px !important;
  font-weight: normal !important;
  display: inline-block;
}

/* 默认展开所有子菜单 */
.wy-menu-vertical li ul {
  display: block !important;
}

/* 字体大小 */
/* 导航链接 */
.wy-menu-vertical a {
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: flex-start !important;
  width: 100% !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* 侧边栏滚动 */
.wy-nav-side {
  height: calc(100vh - 60px) !important;
  max-height: calc(100vh - 60px) !important;
  overflow-y: auto !important;
  position: fixed !important;
}

.wy-menu-vertical {
  overflow-y: visible !important;
}
/* =========================================================
 * Local TOC 展开与折叠
 * ========================================================= */

/* 收起当前标题的直接子目录 */
.wy-menu-vertical
.local-toc
li.local-toc-collapsed > ul {
    display: none !important;
}

/* 展开状态：箭头向下 */
.wy-menu-vertical
.local-toc
li > a > button.toctree-expand::before {
    transform: translate(-50%, -65%) rotate(45deg);
}



/* 2.1、2.2 等二级标题缩进 */
.wy-menu-vertical
.local-toc
> ul > li
> ul > li
> ul > li > a {
    padding-left: 34px !important;
}

/* 更深一级标题缩进 */
.wy-menu-vertical
.local-toc
> ul > li
> ul > li
> ul > li
> ul > li > a {
    padding-left: 50px !important;
}
/* =========================================================
 * 修复单击标题后的 current 样式
 * ========================================================= */

/*
 * current 会同时添加到当前标题及其所有父级。
 * 先清除所有层级继承的选中样式。
 */
.wy-menu-vertical .local-toc li.current > a {
    font-weight: 400 !important;
    background-color: transparent !important;
    border: 0 !important;
}



/* 展开状态：箭头向下 */
.wy-menu-vertical .local-toc
li > a > button.toctree-expand::before {
    transform: translate(-50%, -65%) rotate(45deg) !important;
}

/*
 * 只有通过箭头收起目录时才改变箭头。
 * 不再使用 current 判断展开状态。
 */
.wy-menu-vertical .local-toc
li.local-toc-collapsed
> a > button.toctree-expand::before {
    transform: translate(-50%, -35%) rotate(225deg) !important;
}
/* =========================================================
 * 单击标题后保持导航原有样式
 * ========================================================= */

/* 清除父级 current 带来的背景和粗体 */
.wy-menu-vertical .local-toc li.current > a {
    font-weight: 400 !important;
    background-color: transparent !important;
    border: 0 !important;
}

/*
 * 当前标题的状态实际加在 a.current 上。
 * 点击标题后仍保持普通文字样式。
 */
.wy-menu-vertical .local-toc a.current {
    font-weight: 400 !important;
    background-color: transparent !important;
    border: 0 !important;
}

/* 加大二级标题缩进 */
.wy-menu-vertical .local-toc
> ul > li
> ul > li
> ul > li > a {
    padding-left: 48px !important;
}
/* =========================================================
 * 固定 Local TOC 各层级缩进
 * 避免单击标题后整体向右移动
 * ========================================================= */

/* 文档标题：M50软件平台概览 */
.wy-menu-vertical .local-toc
> ul > li > a {
    padding-left: 21px !important;
}

/* 一级标题：1、2、3、4 */
.wy-menu-vertical .local-toc
> ul > li
> ul > li > a {
    padding-left: 32px !important;
}

/* 二级标题：2.1、3.1、4.1 */
.wy-menu-vertical .local-toc
> ul > li
> ul > li
> ul > li > a {
    padding-left: 48px !important;
}

/* 三级标题 */
.wy-menu-vertical .local-toc
> ul > li
> ul > li
> ul > li
> ul > li > a {
    padding-left: 64px !important;
}
/* =========================================================
 * 消除单击标题时的导航抖动
 * ========================================================= */

/* 禁用目录项切换 current 状态时的动画和过渡 */
.wy-menu-vertical .local-toc a,
.wy-menu-vertical .local-toc li,
.wy-menu-vertical .local-toc ul {
    transition: none !important;
    animation: none !important;
}

/* 清除 current 对全部后代标题产生的边框和尺寸变化 */
.wy-menu-vertical .local-toc li.current a {
    border: 0 !important;
    box-sizing: border-box !important;
}

/* 当前标题获得焦点时不改变尺寸 */
.wy-menu-vertical .local-toc a:focus,
.wy-menu-vertical .local-toc a:active {
    border: 0 !important;
    outline-offset: -2px;
}

/* 保证所有目录链接宽度稳定 */
.wy-menu-vertical .local-toc li > a {
    width: 100% !important;
    box-sizing: border-box !important;
}
/* 隐藏左侧导航搜索框 */
.wy-side-nav-search div[role="search"],
.wy-side-nav-search #rtd-search-form {
    display: none !important;
}

/* 调整搜索框隐藏后的底部留白 */
.wy-side-nav-search {
    padding-bottom: 14px !important;
}

/* 隐藏左侧导航原搜索框 */
.wy-side-nav-search div[role="search"],
.wy-side-nav-search #rtd-search-form {
    display: none !important;
}

/* 隐藏原来单独显示的版本号，避免与下拉框重复 */
.wy-side-nav-search > .version {
    display: none !important;
}

/* 版本选择区域 */
.doc-version-selector {
    position: relative;
    width: 100%;
    margin-top: 12px;
}

/* 无障碍标签：页面中不可见，但读屏软件可以读取 */
.doc-version-selector-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

/* 版本下拉框 */
.doc-version-select {
    width: 100%;
    height: 32px;
    padding: 0 34px 0 12px;

    color: #1d1d1f;
    font-size: 14px;
    line-height: 32px;

    background-color: #ffffff;
    border: 1px solid #b8b8ff;
    border-radius: 16px;
    outline: none;

    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* 下拉箭头 */
.doc-version-selector::after {
    content: "";

    position: absolute;
    top: 50%;
    right: 13px;

    width: 6px;
    height: 6px;

    border-right: 1.5px solid #636366;
    border-bottom: 1.5px solid #636366;

    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* 鼠标悬停 */
.doc-version-select:hover {
    border-color: #8686ff;
}

/* 获得焦点 */
.doc-version-select:focus {
    border-color: #6e6eff;
    box-shadow: 0 0 0 2px rgba(110, 110, 255, 0.15);
}

/* 切换过程中 */
.doc-version-select:disabled {
    color: #86868b;
    cursor: wait;
    opacity: 0.7;
}
