@charset "utf-8";
/* ==========================================================================
 * 帮助中心 · PC 右侧抽屉
 *
 * 独立文件，不动 style.css / ops-shell.css：抽屉只在打开时出现，样式与其它
 * 页面互不影响，单独维护改动面最小。必须在 templates/index.html 里排在
 * beyond.min.css / style.css / ops-shell.css 之后加载，才能压得住老皮肤的默认样式。
 *
 * 布局要点（与设计稿一致）：
 *   - 从右侧推出，宽 860px（正文一行能放下一句完整的话，截图也看得清）；
 *     窗口窄时按视口比例收，最窄到 92%，保证小屏上不会横向撑出去。
 *   - 三段：深色标题条 + 左目录/右正文分栏 + 底部问答区。
 * ========================================================================== */

/* ---------- 遮罩（只在打开时渲染，见 help-drawer.html 的 ng-if） ---------- */
.help-drawer-mask {
    position: fixed;
    top: 45px; /* 让开顶部导航栏，与 navbar 高度保持一致 */
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(16, 32, 58, .25);
    z-index: 1040;
}

/* ---------- 抽屉面板 ---------- */
.help-drawer-panel {
    position: fixed;
    top: 45px;
    right: -100vw; /* 收起时整块藏到视口外(按视口算,宽度改了也不会露边) */
    bottom: 0;
    /* 默认占屏幕一半;用户可以拖左边缘调宽窄,拖过的宽度记在本机下次接着用 */
    width: 50vw;
    min-width: 420px;
    max-width: 92vw;
    background: #FFFFFF;
    box-shadow: -2px 0 12px rgba(16, 32, 58, .18);
    z-index: 1041;
    display: flex;
    flex-direction: column;
    transition: right .2s ease;
}
.help-drawer-open .help-drawer-panel {
    right: 0;
}

@media (max-width: 1200px) {
    .help-drawer-panel {
        width: 90vw;
    }
}

/* 左边缘的拖拽把手:平时只有一条窄窄的感应区,悬停时显出一条主色细线 */
.help-drawer-resizer {
    position: absolute;
    top: 0;
    left: -3px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
}
.help-drawer-resizer:hover::after,
.help-drawer-resizing .help-drawer-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 3px;
    width: 2px;
    height: 100%;
    background: #1C6BBA;
}
/* 拖动时别让鼠标划过的文字被选中,也别让过渡动画跟着抖 */
.help-drawer-resizing {
    user-select: none;
    cursor: col-resize;
}
.help-drawer-resizing .help-drawer-panel {
    transition: none;
}

/* 抽屉打开时把顶部导航提到抽屉之上:导航本身只有 45px 高、不会盖住抽屉内容,
   但「用户」「消息」点开的下拉是往下展开的,不抬高就会被抽屉压住、点不到。
   这个类只在抽屉打开期间挂在 body 上(见 help.js 的 openHelp/closeHelp)。 */
body.help-drawer-open .navbar {
    z-index: 1060;
}

/* ---------- 标题条 ---------- */
.help-drawer-header {
    flex: 0 0 auto;
    height: 44px;
    line-height: 44px;
    padding: 0 16px;
    background: #12243d;
    color: #F0F4FA;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.help-drawer-close {
    color: #C4D0E2 !important;
    cursor: pointer;
}
.help-drawer-close:hover {
    color: #FFFFFF !important;
}

/* ---------- 中间：目录 + 正文分栏 ---------- */
.help-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.help-catalog {
    flex: 0 0 190px;
    width: 220px;
    overflow-y: auto;
    background: #F7F9FC;
    border-right: 1px solid #E4E8EE;
    padding: 8px 0;
}
.help-catalog-empty {
    padding: 12px;
    font-size: 12px;
    color: #98A2B3;
}
/* 一级标题(案件中心/财务中心/信息中心…)原来是浅灰小字,和二级条目几乎分不出来。
   改成深色加粗,并用一条细分隔线把各模块隔开,层次一眼可见又不抢二级条目的注意力。 */
.help-catalog-group-title {
    margin-top: 10px;
    padding: 8px 12px 6px;
    font-size: 12px;
    font-weight: 700;
    color: #25406B;
    letter-spacing: .08em;
    border-top: 1px solid #E4E8EE;
}
/* 第一个分组在列表最上面,再加一条线会像多出一道边框 */
.help-catalog-group:first-child .help-catalog-group-title {
    margin-top: 0;
    border-top: 0;
}
.help-catalog-item {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #3F4A5E;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.help-catalog-item:hover {
    background: #EEF3FD;
}
.help-catalog-item.active {
    background: #EEF3FD;
    color: #1c6bba;
    font-weight: 500;
    border-left-color: #1c6bba;
}

.help-article {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    padding: 12px 16px;
}
.help-article-empty {
    font-size: 13px;
    color: #98A2B3;
    padding-top: 8px;
}
.help-article-breadcrumb {
    font-size: 12px;
    color: #98A2B3;
    margin-bottom: 8px;
}
.help-article-html {
    font-size: 13px;
    color: #333333;
    line-height: 1.7;
    word-break: break-word;
}
.help-article-html img {
    max-width: 100%;
    cursor: zoom-in;
    border: 1px solid #E4E8EE;
    border-radius: 3px;
}

/* 图注:图片多数紧跟在一句话后面(同一个段落),所以用 span 包、靠这里变成块级 */
.help-article-html .manual-figure {
    display: block;
    margin: 10px 0 14px;
    text-align: center;
}

.help-article-html .manual-figcaption {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #8A94A6;
}

/* 点开看大图:抽屉正文只有三百多像素宽,原图缩进去字就看不清了 */
.help-img-viewer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2050;
    background: rgba(18, 36, 61, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: zoom-out;
}
.help-img-viewer img {
    max-width: 100%;
    max-height: 100%;
    background: #FFFFFF;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

/* 说明书正文的 Markdown 转出来的 h1~h4/p/ul/ol/table 会继承全局 style.css 的大标题样式，
   在 190px+的窄抽屉里显得又大又突兀，这里单独收紧一套排版，只在 .help-article-html 作用域内生效，
   不影响抽屉外的任何页面。*/
.help-article-html h1,
.help-article-html h2,
.help-article-html h3,
.help-article-html h4 {
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 600;
    line-height: 1.4;
}
.help-article-html h1,
.help-article-html h2 {
    font-size: 14px;
    color: #1c6bba;
}
.help-article-html h3,
.help-article-html h4 {
    font-size: 13px;
    color: #3F4A5E;
}
.help-article-html h1:not(:first-child),
.help-article-html h2:not(:first-child),
.help-article-html h3:not(:first-child),
.help-article-html h4:not(:first-child) {
    margin-top: 10px;
}
.help-article-html p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.7;
}
.help-article-html ul,
.help-article-html ol {
    margin: 0 0 8px;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.7;
}
.help-article-html li {
    margin-bottom: 2px;
}
.help-article-html strong {
    font-weight: 600;
    color: #232D40;
}
.help-article-html .manual-key-warning {
    color: #d9534f;
    font-weight: 600;
}
.help-article-html code {
    padding: 1px 4px;
    font-size: 12px;
    background: #F0F3F8;
    border-radius: 3px;
    color: #A3345B;
}
.help-article-html pre {
    margin: 0 0 8px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.6;
    background: #F7F9FC;
    border: 1px solid #E4E8EE;
    border-radius: 4px;
    overflow-x: auto;
}
.help-article-html pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}
.help-article-html table {
    width: 100%;
    margin: 0 0 8px;
    font-size: 12px;
    border-collapse: collapse;
}
.help-article-html table th,
.help-article-html table td {
    padding: 4px 6px;
    border: 1px solid #E4E8EE;
    text-align: left;
}
.help-article-html table th {
    background: #F7F9FC;
    font-weight: 600;
}
.help-article-html blockquote {
    margin: 0 0 8px;
    padding: 4px 10px;
    border-left: 3px solid #D7DEE8;
    color: #667085;
    background: #F7F9FC;
}
.help-article-html a {
    color: #1c6bba;
}
.help-article-html a[href^="manual://"] {
    cursor: pointer;
}
.help-article-html hr {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid #E4E8EE;
}

/* ---------- 底部：问答区 ---------- */
.help-ask {
    /* 45% 是「整个问答区」的上限:加在回答框上会让问答区自己撑到六成多、
       把上面的目录与正文挤没。回答框在这个上限内弹性伸缩并自己滚动。 */
    flex: 0 0 auto;
    max-height: 45%;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #E4E8EE;
    padding: 10px 16px;
    background: #FFFFFF;
}
.help-ask-title {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #3F4A5E;
}
.help-ask-title a {
    color: #1c6bba !important;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
}
/* 删除当前对话是不可撤销的动作,用红色和旁边两个普通按钮区分开 */
.help-ask-title .help-ask-clear {
    color: #d9534f !important;
}
.help-ask-clear {
    color: #d9534f;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
}
.help-ask-title-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.help-ask-title a:hover,
.help-ask-clear:hover {
    text-decoration: underline;
}
.help-ask-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.help-ask.help-ask-collapsed {
    padding-top: 8px;
    padding-bottom: 8px;
}
.help-ask.help-ask-collapsed .help-ask-title {
    margin-bottom: 0;
}
/* 回答、依据、输入框都在这一层里。它必须也是纵向弹性容器并允许收缩,
   否则回答会一直往下撑,把输入框顶出抽屉(问答区整体有 45% 高度上限) */
.help-ask-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.help-ask-answer {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #F7F9FC;
    border: 1px solid #E4E8EE;
    border-radius: 4px;
    font-size: 13px;
}
.help-ask-question {
    color: #3F4A5E;
    font-weight: 500;
    margin-bottom: 4px;
}
.help-ask-text {
    color: #333333;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
}

/* 回答按 Markdown 渲染后自己带段落和列表标签了,不能再靠 pre-wrap 保留换行,
   否则每个标签之间的换行都会多出一行空白 */
.help-ask-md {
    white-space: normal;
}
.help-ask-md p {
    margin: 0 0 6px;
}
.help-ask-md h4 {
    margin: 8px 0 4px;
    padding: 0;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1c6bba;
}
.help-ask-md ul,
.help-ask-md ol {
    margin: 0 0 6px;
    padding-left: 20px;
}
.help-ask-md li {
    margin-bottom: 2px;
}
.help-ask-md code {
    padding: 1px 4px;
    background: #F0F3F8;
    border-radius: 3px;
    color: #A3345B;
}
.help-ask-md pre {
    margin: 0 0 6px;
    padding: 8px 10px;
    background: #F7F9FC;
    border: 1px solid #E4E8EE;
    border-radius: 4px;
    overflow-x: auto;
}
.help-ask-md pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}
/* 回答里引用的说明书截图:抽屉窄,默认缩到容器宽度,点击可以放大看(与正文图共用查看器) */
.help-ask-img {
    display: block;
    max-width: 100%;
    margin: 6px 0;
    border: 1px solid #E4E8EE;
    border-radius: 3px;
    cursor: zoom-in;
}

/* 等待提示:第一段回答到达之前显示,省得用户以为点了没反应 */
.help-ask-waiting {
    color: #98A2B3;
    font-size: 12px;
    padding: 2px 0 4px;
}
.help-ask-dots i {
    font-style: normal;
    animation: help-ask-blink 1.2s infinite;
}
.help-ask-dots i:nth-child(2) {
    animation-delay: .2s;
}
.help-ask-dots i:nth-child(3) {
    animation-delay: .4s;
}
@keyframes help-ask-blink {
    0%, 60%, 100% { opacity: .25; }
    30% { opacity: 1; }
}
.help-ask-refs {
    flex: 0 0 auto;
    margin-top: 6px;
}
.help-ask-ref {
    display: inline-block;
    margin: 4px 8px 0 0;
    font-size: 12px;
    color: #1c6bba !important;
    cursor: pointer;
}
.help-ask-ref:hover {
    text-decoration: underline;
}
.help-ask-error {
    color: #cc324b;
}
.help-ask-stopped {
    margin-top: 5px;
    color: #B7791F;
    font-size: 12px;
}
.help-ask-input-row {
    display: flex;
    flex: 0 0 auto; /* 固定在回答框下面,不跟着回答一起被压缩或挤走 */
}
.help-ask-input-row input {
    flex: 1 1 auto;
    height: 30px;
    padding: 0 8px;
    font-size: 13px;
    border: 1px solid #D7DEE8;
    border-radius: 3px;
}
.help-ask-input-row button {
    margin-left: 8px;
    height: 30px;
    padding: 0 14px;
    font-size: 13px;
    background: #1c6bba;
    border-color: #1c6bba;
}
.help-ask-input-row .help-ask-stop {
    margin-left: 8px;
    color: #A25B00;
    background: #FFF8E8;
    border-color: #E9C989;
}
.help-ask-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #98A2B3;
}

/* ---------- 历史问答弹窗：层级低于 .help-img-viewer，避免影响原有图片放大 ---------- */
.help-history-modal {
    position: fixed;
    top: 45px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.help-history-modal-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(16, 32, 58, .42);
}
.help-history-modal-panel {
    position: relative;
    z-index: 1;
    width: 680px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(16, 32, 58, .32);
}
.help-history-modal-header,
.help-history-modal-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid #E4E8EE;
    color: #3F4A5E;
    font-size: 14px;
    font-weight: 600;
}
.help-history-modal-header a {
    color: #667085 !important;
    cursor: pointer;
}
.help-history-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #E4E8EE;
    border-bottom: 0;
}
.help-history-modal-footer .btn-danger {
    min-width: 78px;
    background: #C53A50;
    border-color: #C53A50;
}
.help-history-modal-footer .btn-danger:hover,
.help-history-modal-footer .btn-danger:focus {
    background: #A92D41;
    border-color: #A92D41;
}
.help-history-modal-body {
    min-height: 100px;
    overflow-y: auto;
    padding: 12px 14px;
}
.help-history-state,
.help-history-error {
    padding: 12px 0;
    color: #98A2B3;
    font-size: 13px;
    text-align: center;
}
.help-history-error {
    color: #cc324b;
}
.help-history-item {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #E4E8EE;
    border-radius: 4px;
    background: #F7F9FC;
}
.help-history-item-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #98A2B3;
    font-size: 12px;
}
.help-history-question {
    color: #3F4A5E;
    font-size: 13px;
    font-weight: 500;
}
.help-history-answer {
    margin-top: 5px;
    color: #333333;
    font-size: 13px;
    line-height: 1.6;
    /* 历史回答同样按 Markdown 渲染,自己带段落/列表标签了,
       再留 pre-wrap 会让标签之间的换行多出一堆空行 */
    word-break: break-word;
}
.help-history-refs a {
    display: inline-block;
    margin: 6px 8px 0 0;
    color: #1c6bba !important;
    font-size: 12px;
    cursor: pointer;
}
.help-history-refs a:hover {
    text-decoration: underline;
}
