/**
 * MarkTreeDoc Pre-defined Themes (Zero JavaScript CSS Custom Properties)
 */

/* 1. Modern Blue (Default) */
.mtd-theme-modern-blue {
  --mtd-primary: #2563eb;
  --mtd-primary-hover: #1d4ed8;
  --mtd-primary-light: #eff6ff;
  --mtd-bg: #ffffff;
  --mtd-card-bg: #f8fafc;
  --mtd-sidebar-bg: #f8fafc;
  --mtd-border: #e2e8f0;
  --mtd-text-main: #0f172a;
  --mtd-text-muted: #64748b;
}

/* 2. Dark Slate (Dark Mode) */
.mtd-theme-dark-slate {
  --mtd-primary: #38bdf8;
  --mtd-primary-hover: #7dd3fc;
  --mtd-primary-light: rgba(56, 189, 248, 0.12);
  --mtd-bg: #0f172a;
  --mtd-card-bg: #1e293b;
  --mtd-sidebar-bg: #0b1120;
  --mtd-border: #334155;
  --mtd-text-main: #f1f5f9;
  --mtd-text-muted: #94a3b8;
  --mtd-text-light: #64748b;
}
.mtd-theme-dark-slate .mtd-topbar {
  background: #0f172a;
  border-bottom-color: #334155;
}
.mtd-theme-dark-slate .mtd-content-col {
  background: #0f172a;
}
.mtd-theme-dark-slate .mtd-modal-card {
  background: #1e293b;
  border-color: #334155;
}
.mtd-theme-dark-slate .mtd-modal-header,
.mtd-theme-dark-slate .mtd-modal-footer {
  background: #0f172a;
  border-color: #334155;
}

/* 3. Emerald Green */
.mtd-theme-emerald-green {
  --mtd-primary: #059669;
  --mtd-primary-hover: #047857;
  --mtd-primary-light: #ecfdf5;
  --mtd-bg: #ffffff;
  --mtd-card-bg: #f0fdf4;
  --mtd-sidebar-bg: #f8fafc;
  --mtd-border: #d1fae5;
  --mtd-text-main: #064e3b;
  --mtd-text-muted: #047857;
}

/* 4. Purple Aurora */
.mtd-theme-purple-neon {
  --mtd-primary: #7c3aed;
  --mtd-primary-hover: #6d28d9;
  --mtd-primary-light: #f5f3ff;
  --mtd-bg: #ffffff;
  --mtd-card-bg: #faf5ff;
  --mtd-sidebar-bg: #fdf4ff;
  --mtd-border: #f3e8ff;
  --mtd-text-main: #3b0764;
  --mtd-text-muted: #7e22ce;
}

/* 5. Light Clean (Monochrome) */
.mtd-theme-light-clean {
  --mtd-primary: #18181b;
  --mtd-primary-hover: #27272a;
  --mtd-primary-light: #f4f4f5;
  --mtd-bg: #ffffff;
  --mtd-card-bg: #fafafa;
  --mtd-sidebar-bg: #f4f4f5;
  --mtd-border: #e4e4e7;
  --mtd-text-main: #18181b;
  --mtd-text-muted: #71717a;
}

/* =============================================================
   6. Minimal Light (极简无框纯白)
   - 彻底去除边框线条
   - 文档目录背景色为纯白 (#ffffff)
   - 隐藏左侧“文档目录”文字，隐藏右侧“页内大纲”文字及 logo
   - 页内大纲上方直接到顶，与左侧文档目录齐平
   ============================================================= */
.mtd-theme-minimal {
  --mtd-primary: #0969da;
  --mtd-primary-hover: #0860ca;
  --mtd-primary-light: rgba(9, 105, 218, 0.08);
  --mtd-bg: #ffffff;
  --mtd-card-bg: #ffffff;
  --mtd-sidebar-bg: #ffffff;
  --mtd-border: transparent;
  --mtd-text-main: #1f2328;
  --mtd-text-muted: #656d76;
}

.mtd-theme-minimal,
.mtd-theme-minimal.mtd-container,
.mtd-theme-minimal .mtd-container,
.mtd-theme-minimal .mtd-topbar,
.mtd-theme-minimal .mtd-sidebar-col,
.mtd-theme-minimal .mtd-content-col,
.mtd-theme-minimal .mtd-right-toc-sidebar,
.mtd-theme-minimal .mtd-tree-header,
.mtd-theme-minimal .mtd-article-header,
.mtd-theme-minimal .mtd-article-title-bar,
.mtd-theme-minimal .mtd-article-content-flex {
  border: none !important;
  box-shadow: none !important;
}

.mtd-theme-minimal .mtd-body-grid {
  background: #ffffff !important;
  background-image: none !important;
}

.mtd-theme-minimal .mtd-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important; /* 保留面包屑下方浅灰色细线 */
}

.mtd-theme-minimal .mtd-sidebar-col {
  background-color: #ffffff !important;
  border-right: none !important;
}

.mtd-theme-minimal .mtd-sidebar-inner {
  padding-top: 14px;
}

.mtd-theme-minimal .mtd-content-col {
  background: #ffffff !important;
  padding-top: 14px !important;
}

/* 隐藏左侧文档目录“文档目录”4个字，保留操作按钮 */
.mtd-theme-minimal .mtd-tree-title {
  display: none !important;
}

.mtd-theme-minimal .mtd-tree-header {
  border-bottom: none !important;
  justify-content: flex-end;
  padding: 4px 8px 8px;
  margin-bottom: 8px;
}

/* 隐藏右侧“页内大纲”4个字及 logo 图标，大纲顶部直接到顶 */
.mtd-theme-minimal .mtd-right-toc-sidebar {
  border-left: none !important;
  padding-left: 12px;
  margin-top: 0 !important;
}

.mtd-theme-minimal .mtd-right-toc-sidebar .mtd-toc-title {
  display: none !important;
}

.mtd-theme-minimal .mtd-right-toc-sidebar .mtd-sticky-toc-box {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.mtd-theme-minimal .mtd-right-toc-sidebar.mtd-toc-is-sticky {
  top: var(--mtd-sticky-top, 0px) !important;
  max-height: calc(100vh - var(--mtd-sticky-top, 0px)) !important;
}

.mtd-theme-minimal .mtd-toc-start-card {
  border: none !important;
  background: #f8fafc !important;
}

.mtd-theme-minimal .mtd-breadcrumbs {
  border: none !important;
  background: #f8fafc !important;
}

/* 极简亮色主题：正文内容区域恢复优雅可见的分隔线与边框 */
.mtd-theme-minimal .mtd-content-col,
.mtd-theme-minimal .mtd-article-pane,
.mtd-theme-minimal .mtd-article-content,
.mtd-theme-minimal .mtd-article-body {
  --mtd-border: #e2e8f0;
}

.mtd-theme-minimal blockquote {
  border-left: 3px solid #d0d7de !important;
  color: #57606a !important;
  background: #f6f8fa !important;
}

.mtd-theme-minimal .mtd-table-wrapper {
  border: 1px solid #e2e8f0 !important;
}

.mtd-theme-minimal table,
.mtd-theme-minimal th,
.mtd-theme-minimal td {
  border-color: #e2e8f0 !important;
}

.mtd-theme-minimal tr:nth-child(even) {
  background: #f8fafc !important;
}

.mtd-theme-minimal hr {
  border-top: 1px solid #d0d7de !important;
}

.mtd-theme-minimal .mtd-code-block {
  border: 1px solid #e2e8f0 !important;
}

.mtd-theme-minimal .mtd-latex-block {
  border-color: #e2e8f0 !important;
}

/* =============================================================
   7. Minimal Dark (极简无框深黑)
   - 彻底去除边框线条
   - 文档目录背景色为纯深黑 (#0d1117)
   - 隐藏左侧“文档目录”文字，隐藏右侧“页内大纲”文字及 logo
   - 页内大纲上方直接到顶，与左侧文档目录齐平
   ============================================================= */
.mtd-theme-minimal-dark {
  --mtd-primary: #58a6ff;
  --mtd-primary-hover: #79b8ff;
  --mtd-primary-light: rgba(56, 139, 253, 0.15);
  --mtd-bg: #0d1117;
  --mtd-card-bg: #161b22;
  --mtd-sidebar-bg: #0d1117;
  --mtd-border: transparent;
  --mtd-text-main: #e6edf3;
  --mtd-text-muted: #848d97;
}

.mtd-theme-minimal-dark,
.mtd-theme-minimal-dark.mtd-container,
.mtd-theme-minimal-dark .mtd-container,
.mtd-theme-minimal-dark .mtd-topbar,
.mtd-theme-minimal-dark .mtd-sidebar-col,
.mtd-theme-minimal-dark .mtd-content-col,
.mtd-theme-minimal-dark .mtd-right-toc-sidebar,
.mtd-theme-minimal-dark .mtd-tree-header,
.mtd-theme-minimal-dark .mtd-article-header,
.mtd-theme-minimal-dark .mtd-article-title-bar,
.mtd-theme-minimal-dark .mtd-article-content-flex {
  border: none !important;
  box-shadow: none !important;
  color: #e6edf3 !important;
}

.mtd-theme-minimal-dark .mtd-body-grid {
  background: #0d1117 !important;
  background-image: none !important;
}

.mtd-theme-minimal-dark .mtd-topbar {
  background: #0d1117 !important;
  border-bottom: 1px solid #30363d !important; /* 保留深色极简面包屑下方深灰细线 */
  color: #e6edf3 !important;
}

.mtd-theme-minimal-dark .mtd-sidebar-col {
  background-color: #0d1117 !important;
  border-right: none !important;
}

.mtd-theme-minimal-dark .mtd-sidebar-inner {
  padding-top: 14px;
}

.mtd-theme-minimal-dark .mtd-content-col {
  background: #0d1117 !important;
  color: #e6edf3 !important;
  padding-top: 14px !important;
}

/* 隐藏左侧文档目录“文档目录”4个字，保留操作按钮 */
.mtd-theme-minimal-dark .mtd-tree-title {
  display: none !important;
}

.mtd-theme-minimal-dark .mtd-tree-header {
  border-bottom: none !important;
  justify-content: flex-end;
  padding: 4px 8px 8px;
  margin-bottom: 8px;
}

/* 隐藏右侧“页内大纲”4个字及 logo 图标，大纲顶部直接到顶 */
.mtd-theme-minimal-dark .mtd-right-toc-sidebar {
  border-left: none !important;
  padding-left: 12px;
  margin-top: 0 !important;
}

.mtd-theme-minimal-dark .mtd-right-toc-sidebar .mtd-toc-title {
  display: none !important;
}

.mtd-theme-minimal-dark .mtd-right-toc-sidebar .mtd-sticky-toc-box {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.mtd-theme-minimal-dark .mtd-right-toc-sidebar.mtd-toc-is-sticky {
  top: var(--mtd-sticky-top, 0px) !important;
  max-height: calc(100vh - var(--mtd-sticky-top, 0px)) !important;
}

.mtd-theme-minimal-dark .mtd-tree-link {
  color: #c9d1d9;
}

.mtd-theme-minimal-dark .mtd-tree-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #58a6ff;
}

.mtd-theme-minimal-dark .mtd-toc-a {
  color: #8b949e;
}

.mtd-theme-minimal-dark .mtd-toc-a:hover {
  color: #58a6ff;
}

.mtd-theme-minimal-dark .mtd-modal-card {
  background: #161b22 !important;
  border: 1px solid #30363d !important;
  color: #e6edf3 !important;
}

.mtd-theme-minimal-dark .mtd-modal-header,
.mtd-theme-minimal-dark .mtd-modal-footer {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}

.mtd-theme-minimal-dark .mtd-toc-start-card {
  background: #161b22 !important;
  border: none !important;
}

.mtd-theme-minimal-dark .mtd-breadcrumbs {
  background: #161b22 !important;
  color: #8b949e !important;
  border: none !important;
}

.mtd-theme-minimal-dark pre,
.mtd-theme-minimal-dark code {
  background: #161b22 !important;
  color: #e6edf3 !important;
  border: none !important;
}

/* 极简深色主题：正文内容区域恢复深色清晰分隔线与边框 */
.mtd-theme-minimal-dark .mtd-content-col,
.mtd-theme-minimal-dark .mtd-article-pane,
.mtd-theme-minimal-dark .mtd-article-content,
.mtd-theme-minimal-dark .mtd-article-body {
  --mtd-border: #30363d;
}

.mtd-theme-minimal-dark blockquote {
  border-left: 3px solid #30363d !important;
  color: #8b949e !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.mtd-theme-minimal-dark .mtd-table-wrapper {
  border: 1px solid #30363d !important;
}

.mtd-theme-minimal-dark table,
.mtd-theme-minimal-dark th,
.mtd-theme-minimal-dark td {
  border-color: #30363d !important;
}

.mtd-theme-minimal-dark hr {
  border-top: 1px solid #30363d !important;
}

.mtd-theme-minimal-dark .mtd-code-block {
  border: 1px solid #30363d !important;
}

.mtd-theme-minimal-dark tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03) !important;
}

.mtd-theme-minimal-dark .mtd-latex-block {
  background: #161b22 !important;
  border-color: #30363d !important;
}

.mtd-theme-minimal-dark .mtd-latex-math,
.mtd-theme-minimal-dark .mtd-latex-inline {
  color: #e6edf3 !important;
}

.mtd-theme-minimal-dark .mtd-latex-copy-btn {
  border-color: #30363d !important;
  color: #8b949e !important;
}

.mtd-theme-minimal-dark .mtd-latex-copy-btn:hover {
  background: #21262d !important;
  color: #58a6ff !important;
  border-color: #58a6ff !important;
}

.mtd-theme-minimal-dark .mtd-footnotes-area {
  border-top-color: #30363d !important;
}
.mtd-theme-minimal-dark .mtd-footnotes-title {
  color: #8b949e !important;
}
.mtd-theme-minimal-dark .mtd-footnotes-list {
  color: #c9d1d9 !important;
}
.mtd-theme-minimal-dark .mtd-footnote-item:target {
  background: rgba(56, 189, 248, 0.12) !important;
}
.mtd-theme-minimal-dark .mtd-comment-badge {
  background: #2d2613 !important;
  color: #fbbf24 !important;
  border-color: #78350f !important;
}
.mtd-theme-minimal-dark .mtd-comment-popover {
  background: #0d1117 !important;
  border: 1px solid #30363d !important;
  color: #e6edf3 !important;
}
.mtd-theme-minimal-dark .mtd-comment-popover::after {
  border-top-color: #30363d !important;
}


