/* ===== manual — 메뉴얼 팝업/페이지 + 핫스팟 공통 스타일 ===== */

/* ---- 핫스팟 (라이브 · 스냅샷 공용, 순수 CSS) ---- */
.help-hs-layer { position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 1090; }
.help-hs-badge { position: absolute; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: #ff9800; color: #fff; font: 700 11px/1 "Source Sans Pro", sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
  cursor: pointer; pointer-events: auto; padding: 0; transition: transform .12s; }
.help-hs-badge:hover, .help-hs-badge:focus { transform: scale(1.2); outline: none; background: #f57c00; }
.help-hs-badge.help-hs-pulse { animation: help-hs-pulse 1.5s ease-out 1; }
@keyframes help-hs-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,152,0,.7); } 100% { box-shadow: 0 0 0 16px rgba(255,152,0,0); } }
.help-hs-pop { position: absolute; display: none; max-width: 360px; background: #fff; color: #212529; border: 1px solid #ff9800; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); padding: 8px 10px; font-size: 13px; line-height: 1.45; pointer-events: auto; z-index: 1; }
.help-hs-pop-title { font-weight: 700; margin-bottom: 4px; color: #e65100; }
.help-hs-pop-body { white-space: pre-line; }
body.dark-mode .help-hs-pop { background: #343a40; color: #e9ecef; border-color: #ffb74d; }
body.dark-mode .help-hs-pop-title { color: #ffb74d; }
/* 스냅샷 문서: 조작 요소만 비활성 (문서 전체 pointer-events:none 은 Tabulator 등 내부 스크롤까지 막는다) */
.help-snapshot-doc a, .help-snapshot-doc button, .help-snapshot-doc input, .help-snapshot-doc select, .help-snapshot-doc textarea,
.help-snapshot-doc label, .help-snapshot-doc .btn, .help-snapshot-doc .nav-link, .help-snapshot-doc .dropdown-item,
.help-snapshot-doc .tabulator-col, .help-snapshot-doc .tabulator-cell, .help-snapshot-doc .org-tree-widget, .help-snapshot-doc .custom-control,
.help-snapshot-doc .card-tools, .help-snapshot-doc .grid-stack-item-content > * { pointer-events: none; }
.help-snapshot-doc { user-select: none; }
.help-snapshot-doc .help-hs-layer, .help-snapshot-doc .help-hs-layer * { pointer-events: auto; }

/* ---- 라이브 모드 표시 ---- */
body.help-live-on .help-nav-indicator { display: inline-block; }
.help-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px); background: rgba(33,37,41,.92); color: #fff;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; z-index: 2000; opacity: 0; transition: opacity .3s, transform .3s; max-width: 90vw; }
.help-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 헤더 드롭다운 ---- */
#help-nav .dropdown-menu { min-width: 220px; }
#help-nav .dropdown-item.active { background: #e3f2fd; color: #0d47a1; }
#help-nav .dropdown-item .help-check { display: none; width: 14px; }
#help-nav .dropdown-item.active .help-check { display: inline-block; }
body.dark-mode #help-nav .dropdown-item.active { background: #1f3b57; color: #9ec9ff; }

/* ---- 모달 ? 버튼 ---- */
.help-modal-menu { display: inline-block; }
.help-modal-menu .dropdown-menu { min-width: 200px; font-size: .9rem; }
.help-modal-menu .dropdown-item .help-check { display: none; width: 14px; }
.modal.help-modal-live-on .help-modal-menu [data-help-action="modal-live"] { background: #e3f2fd; color: #0d47a1; }
.modal.help-modal-live-on .help-modal-menu [data-help-action="modal-live"] .help-check { display: inline-block; }
body.dark-mode .modal.help-modal-live-on .help-modal-menu [data-help-action="modal-live"] { background: #1f3b57; color: #9ec9ff; }
/* 팝업이 열려 있으면 뒤 페이지의 화면 도움말 번호는 숨김 */
body.modal-open .help-hs-page { display: none; }
.help-modal-btn { color: #ff9800 !important; margin-right: .25rem; font-size: 1.1rem; line-height: 1; padding: 0 .3rem; background: transparent; border: 0; }
.help-modal-btn:hover { color: #e65100 !important; }

/* ---- 메뉴얼 본체 ---- */
.help-manual { display: flex; height: 78vh; min-height: 420px; }
.help-manual-standalone { height: calc(100vh - 170px); }
.help-manual-nav { flex: 0 0 290px; border-right: 1px solid #dee2e6; display: flex; flex-direction: column; min-width: 0; }
.help-nav-search { padding: 8px; border-bottom: 1px solid #eee; }
.help-nav-tree, .help-nav-results { overflow: auto; flex: 1 1 auto; padding: 6px 4px 12px; }
.help-nav-group-title { font-weight: 700; font-size: 13px; color: #6c757d; padding: 8px 8px 4px; text-transform: none; }
.help-tree, .help-tree-children { list-style: none; margin: 0; padding-left: 0; }
.help-tree-children { padding-left: 16px; }
.help-tree li.help-collapsed > .help-tree-children { display: none; }
.help-tree-link, .help-tree-label { display: block; padding: 3px 8px; font-size: 13.5px; color: #343a40; border-radius: 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help-tree-label { color: #495057; cursor: pointer; font-weight: 600; }
.help-tree-link:hover { background: #f1f3f5; text-decoration: none; color: #212529; }
.help-tree-link.active { background: #fff3e0; color: #e65100; font-weight: 600; }
.help-tree-missing { color: #adb5bd; font-weight: 400; }
.help-draft { font-size: 10px; vertical-align: middle; }
.help-tree-empty { padding: 4px 8px; }
.help-manual-pane { flex: 1 1 auto; min-width: 0; display: flex; }
.help-pane-empty { margin: auto; text-align: center; }
.help-pane-content { flex: 1 1 auto; overflow: auto; padding: 14px 18px 24px; }
.help-breadcrumb { margin-bottom: 4px; }
.help-page-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.help-page-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.help-intro { line-height: 1.6; }
.help-intro table { width: auto; border-collapse: collapse; margin: 6px 0 10px; }
.help-intro table td, .help-intro table th { border: 1px solid #dee2e6; padding: 3px 8px; font-size: 13px; }
.help-intro details > summary { cursor: pointer; color: #007bff; font-size: 13px; }
.help-children { margin: 6px 0 10px; }
.help-items-title { font-weight: 700; margin: 12px 0 4px; font-size: 14px; }
.help-item-list { padding-left: 1.4rem; margin: 0 0 8px; counter-reset: none; }
.help-item { padding: 3px 6px; border-radius: 4px; cursor: pointer; font-size: 13.5px; }
.help-item:hover { background: #f8f9fa; }
.help-item.active { background: #fff3e0; }
.help-item-label { font-weight: 600; }
.help-item-desc { color: #495057; white-space: pre-line; }
.help-snapshot-wrap { margin-top: 10px; border: 1px solid #dee2e6; border-radius: 4px; overflow: hidden; }
.help-snapshot-bar { padding: 4px 8px; background: #f8f9fa; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 8px; }
.help-snapshot-scale-wrap { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.help-snapshot-scale-wrap .help-snapshot-scale { width: auto; height: 24px; padding: 0 4px; font-size: 12px; }
/* iframe 한정 (2026-11-12) — 스냅샷 문서의 body 도 help-snapshot 클래스를 갖는다. 클래스만으로 걸면 body 가 display:block·높이 520px 가 되어 로그인 화면처럼 body flex 로 가운데 정렬하는 화면이 왼쪽 위로 붙는다. */
.help-snapshot-stage { position: relative; overflow: hidden; height: 520px; background: #fff; }
iframe.help-snapshot { width: 100%; height: 520px; border: 0; display: block; background: #fff; transform-origin: 0 0; }
body.dark-mode .help-manual-nav { border-color: #4b545c; }
body.dark-mode .help-nav-search { border-color: #4b545c; }
body.dark-mode .help-tree-link, body.dark-mode .help-tree-label { color: #dee2e6; }
body.dark-mode .help-tree-link:hover { background: #454d55; color: #fff; }
body.dark-mode .help-tree-link.active { background: #5a3d1a; color: #ffcc80; }
body.dark-mode .help-item:hover { background: #454d55; }
body.dark-mode .help-item.active { background: #5a3d1a; }
body.dark-mode .help-item-desc { color: #ced4da; }
body.dark-mode .help-snapshot-bar { background: #3f474e; border-color: #4b545c; }
body.dark-mode .help-snapshot-scale { background: #2b2f36; color: #e6e6e6; border-color: #4b545c; }
body.dark-mode .help-snapshot-wrap { border-color: #4b545c; }
body.dark-mode .help-intro table td, body.dark-mode .help-intro table th { border-color: #4b545c; }
@media (max-width: 767.98px) {
  .help-manual { flex-direction: column; height: auto; }
  .help-manual-nav { flex: 0 0 auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid #dee2e6; }
  .help-hs-layer { display: none; }
}

/* ---------------------------------------------------------------- 작성 도구 (superuser, Phase 2) */
#help-author-panel { position: fixed; top: 60px; right: 12px; width: 380px; max-height: calc(100vh - 80px); display: none; flex-direction: column;
  background: #fff; border: 1px solid #c8ccd2; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.25); z-index: 1095; font-size: 13px; }
.help-ap-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #e3e6ea; font-weight: 600; }
.help-ap-head .help-ap-key { font-size: 11px; color: #6c757d; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-ap-head .help-ap-variant { width: auto; max-width: 190px; font-weight: 400; font-size: 12px; }
body.dark-mode .help-ap-head .help-ap-variant { background: #343a40; color: #e9ecef; border-color: #6c757d; }
.help-ap-tools { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid #e3e6ea; flex-wrap: wrap; }
.help-ap-status { padding: 2px 12px; min-height: 18px; }
.help-ap-body { overflow: auto; padding: 8px 12px; }
.help-ap-section { margin-bottom: 10px; }
.help-ap-sec-title { font-weight: 600; margin-bottom: 4px; }
.help-ap-item { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-bottom: 1px dashed #e9ecef; }
.help-ap-item-off { opacity: .5; }
.help-ap-item-broken .help-ap-label { color: #c0392b; }
.help-ap-no { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: #0d6efd; color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; flex: 0 0 20px; }
.help-ap-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-ap-kind { font-size: 10px; color: #6c757d; background: #f1f3f5; border-radius: 3px; padding: 0 4px; }
.help-ap-btns { white-space: nowrap; }
.help-ap-btns .btn-xs { padding: 0 3px; font-size: 11px; line-height: 1.4; }
.help-ap-form, .help-ap-pageform { border-top: 2px solid #0d6efd; padding-top: 8px; }
.help-author-highlight { position: fixed; pointer-events: none; z-index: 1094; border: 2px solid #ff9f1c; background: rgba(255,159,28,.12); border-radius: 3px; display: none; }
body.help-picking, body.help-picking * { cursor: crosshair !important; }
body.help-authoring .help-hs-badge { cursor: pointer; }
.help-author-flash { outline: 3px solid #ff9f1c !important; outline-offset: 2px; transition: outline-color 1.2s; }
#help-author-panel .tt-wrap, #help-author-panel .tiptap { font-size: 13px; }
body.dark-mode #help-author-panel { background: #2b2f36; border-color: #474d57; color: #e6e6e6; }
body.dark-mode .help-ap-head, body.dark-mode .help-ap-tools { border-color: #474d57; }
body.dark-mode .help-ap-item { border-color: #3d434c; }
body.dark-mode .help-ap-kind { background: #3d434c; color: #c7ccd3; }

/* ---------------------------------------------------------------- 튜토리얼 (driver.js, Phase 3) */
.driver-popover.help-tour-popover { max-width: 380px; font-size: 13.5px; line-height: 1.55; }
.driver-popover.help-tour-popover .driver-popover-title { font-size: 15px; }
.help-tour-dismiss { display: block; font-size: 12px; color: #6c757d; margin: 8px 0 -4px; cursor: pointer; user-select: none; }
.help-tour-dismiss input { vertical-align: -1px; margin-right: 3px; }
body.dark-mode .driver-popover.help-tour-popover { background: #2b2f36; color: #e6e6e6; }
body.dark-mode .driver-popover.help-tour-popover .driver-popover-title { color: #fff; }
body.dark-mode .driver-popover.help-tour-popover .driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: #2b2f36; }
body.dark-mode .driver-popover.help-tour-popover .driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: #2b2f36; }
body.dark-mode .driver-popover.help-tour-popover .driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: #2b2f36; }
body.dark-mode .driver-popover.help-tour-popover .driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: #2b2f36; }
body.dark-mode .driver-popover.help-tour-popover button { background: #3d434c; color: #e6e6e6; }
body.dark-mode .help-tour-dismiss { color: #aab2bd; }

/* 작성자 미리보기 상단 바 (2026-11-12) — 로그인 계열(_login_base.html)·비밀번호 변경(intra/base.html) 공용. 스냅샷에서는 strip */
.help-preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; background: #343a40; color: #fff; padding: 6px 10px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.help-preview-bar a { color: #ffc107; }
.help-preview-bar a.active { color: #fff; font-weight: 700; text-decoration: underline; }
body.help-preview-on { padding-top: 48px; }
/* intra 화면(비밀번호 변경)은 고정 헤더와 겹치지 않게 아래에 둔다 */
.help-preview-bar.help-preview-bar-bottom { top: auto; bottom: 0; z-index: 1100; }
