/* =========================================================
 * xyj3d 文档自定义样式
 * - 全屏（去掉固定最大宽度）
 * - 左侧菜单占满视口高度并吸顶
 * - 左菜单顶部搜索框（限宽，不沾满整行）
 * - 构造函数 / 参数 以 4 列表格展示
 * ========================================================= */

/* ---------- 全屏布局 + 纯白背景（去掉 dumi 浅灰卡片感） ---------- */
/* 浅色模式背景改为纯白；深色模式变量不动，黑白切换仍可工作 */
:root {
  --light-color-background: #ffffff;
}
.container {
  max-width: none !important;
  padding: 0 !important;
}
.container-main {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}
/* 去掉大留白后，给内容区一点基础内边距避免贴边 */
.col-content {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}
.site-menu {
  padding-left: 1rem !important;
}

/* ---------- 左侧菜单占满全屏高度 + 吸顶 ---------- */
@media (min-width: 770px) {
  .site-menu {
    position: sticky;
    top: var(--dim-header-height, 64px);
    align-self: start;
    max-height: calc(100vh - var(--dim-header-height, 64px));
    overflow-y: auto;
    padding-top: 0 !important;
  }
}

/* ---------- 左菜单顶部搜索栏（限宽，不沾满整行） ---------- */
.xyj-search {
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 12px 16px;
  background: var(--color-background);
  border-bottom: 1px solid var(--boundary-border);
}
.xyj-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  background: var(--color-background);
  color: var(--color-text);
  outline: none;
}
.xyj-search-input:focus {
  border-color: var(--color-link, #1890ff);
}
.xyj-search-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}
.xyj-search-results li {
  border-radius: 4px;
}
.xyj-search-results li:hover,
.xyj-search-results li.is-active {
  background: var(--color-background-active);
}
.xyj-search-results a {
  display: block;
  padding: 6px 8px;
  color: var(--color-text);
  word-break: break-all;
}
.xyj-search-results a:hover {
  text-decoration: none;
}
.xyj-search-results .kind {
  color: var(--color-text-aside);
  font-size: 12px;
  margin-left: 6px;
}
.xyj-search-results mark {
  background: transparent;
  color: var(--color-link, #1890ff);
  font-weight: 700;
}
.xyj-search-empty {
  color: var(--color-text-aside);
  font-size: 13px;
  padding: 6px 8px;
}

/* ---------- 构造函数 / 参数 表格 ---------- */
.tsd-parameters-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--boundary-border, #c9d1d9);
  margin: 0.4rem 0 1rem;
  font-size: 14px;
}
.tsd-parameters-table th,
.tsd-parameters-table td {
  border: 1px solid var(--boundary-border, #c9d1d9);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.tsd-parameters-table th {
  background: var(--color-background-secondary, #f6f8fa);
  font-weight: 600;
}
.tsd-parameters-table .p-name {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-weight: 600;
  white-space: nowrap;
}
.tsd-parameters-table .p-type {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  color: #c0341d;
}
.tsd-parameters-table .p-default {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  color: #096dd9;
  white-space: nowrap;
}

/* ---------- 隐藏顶部整行工具条（左侧菜单已有搜索，标题/菜单按钮一并去掉） ---------- */
.tsd-page-toolbar {
  display: none !important;
}
/* 顶部 header 已移除，左菜单吸顶到页面最顶部 */
@media (min-width: 770px) {
  .site-menu {
    top: 0 !important;
  }
}

/* ---------- 首页自定义内容（类关系图 + 说明）：颜色全部用主题变量，深浅色自动适配 ---------- */
.xyjhome { margin-top: 6px; }
.xyjhome-hero { background: linear-gradient(135deg, #1677ff, #3b8cff 60%, #5aa0ff); color: #fff; border-radius: 14px; padding: 22px 26px; box-shadow: 0 8px 24px rgba(22, 119, 255, .16); }
.xyjhome-sub { margin: 0 0 14px; font-size: 15px; line-height: 1.7; opacity: .96; }
.xyjhome-links { display: flex; flex-wrap: wrap; gap: 10px; }
.xyjhome-links a { background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 8px; font-size: 14px; border: 1px solid rgba(255, 255, 255, .35); transition: .2s; }
.xyjhome-links a:hover { background: #fff; color: #1677ff; }
.xyjhome-h2 { font-size: 20px; margin: 26px 0 12px; padding-left: 12px; border-left: 4px solid #1677ff; }
.xyjhome-diagram { width: 100%; height: auto; border: 1px solid var(--boundary-border); border-radius: 12px; background: var(--color-background-secondary); display: block; }
.xyjhome-imglink { display: block; cursor: zoom-in; }
.xyjhome-tip { font-size: 13px; color: var(--color-text-aside); margin: 10px 2px 0; }
.xyjhome-families { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.xyjhome-fam { border: 1px solid var(--boundary-border); border-radius: 10px; padding: 14px 16px; background: var(--color-background-secondary); }
.xyjhome-fam.left h3 { color: #1e88e5; }
.xyjhome-fam.right h3 { color: #2e7d32; }
.xyjhome-fam h3 { margin: 0 0 8px; font-size: 15px; }
.xyjhome-chips code { display: inline-block; background: var(--color-background-secondary); border: 1px solid var(--boundary-border); border-radius: 6px; padding: 1px 8px; margin: 3px 4px 0 0; font-size: 13px; color: var(--color-text); }
.xyjhome-legend { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.xyjhome-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.xyjhome-legend .sw { width: 20px; height: 14px; border-radius: 4px; border: 1.5px solid var(--color-text-aside); }
.xyjhome-read { font-size: 14.5px; color: var(--color-text); padding-left: 20px; }
.xyjhome-read li { margin: 6px 0; }
.xyjhome-read code { background: var(--color-background-secondary); border: 1px solid var(--boundary-border); border-radius: 5px; padding: 0 6px; font-size: 13px; }
@media (max-width: 760px) { .xyjhome-families { grid-template-columns: 1fr; } }
