/* 文档镜像 · 页头与整体布局 —— 一比一复刻官方 lbs.amap.com/api/webservice
 * （page → article → media 顺序引入；数值均取自官方 main.css / doc-webservice.css）
 * 官方令牌：主蓝 #1a66ff / 标题 #252b48 / 正文 #252b48 / 灰 #909298 / 边框 #e1e1e1 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 64px;
  background: hsla(0, 0%, 100%, .3);
  -webkit-backdrop-filter: blur(10px) opacity(1);
  backdrop-filter: blur(10px) opacity(1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.site-header .header_core {
  display: flex;
  align-items: center;
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1680px) {
  .site-header .header_core { max-width: 1200px; }
}

.site-header .frosted_logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-right: 40px;
}

.site-header .frosted_logo img {
  display: block;
  width: 141px;
  height: 24px;
}

/* 顶部导航项：16px / #363638 / line-height 64px */
.site-header .frosted_nav {
  display: flex;
  align-items: center;
  height: 64px;
  white-space: nowrap;
}

.site-header .frosted_nav_item {
  height: 64px;
  margin-right: 30px;
}

.site-header .frosted_nav_item:last-child { margin-right: 0; }

.site-header .frosted_nav_item a {
  display: inline-block;
  color: #363638;
  font-size: 16px;
  line-height: 64px;
  text-decoration: none;
  transition: all .2s;
}

.site-header .frosted_nav_item a:hover { color: #1a66ff; }

/* 用户区：右侧「控制台 / 登录 / 管理后台」（官方 .user 结构） */
.site-header .user {
  display: flex;
  align-items: center;
  margin-left: auto;
  line-height: 64px;
  position: relative;
  z-index: 1;
}

.site-header .user .user_item { height: 64px; }

.site-header .user .user_item a {
  color: #363638;
  font-size: 16px;
  text-decoration: none;
}

.site-header .user .user_item a:hover { color: #000; }

.site-header .user .user_area .not_login {
  display: flex;
  align-items: center;
}

.site-header .user .user_area .sign_up { margin-right: 18px; }

.site-header .user .user_area .sign_in span {
  display: inline-block;
  padding: 0 14px;
  color: #fff;
  line-height: 32px;
  border-radius: 18px;
  background-color: #387aff;
  background-image: linear-gradient(115deg, #2b99ff 9%, #387aff);
  transition: .3s;
}

.site-header .user .user_area .sign_in:hover span { opacity: .9; }

/* 官方布局：固定 64px 头 + container（max 1600 / 上下 padding 84 32 0）
 * center-container 左右两栏，content-container 内部居中最大 1200 */
.page-container {
  max-width: 1600px;
  padding: 84px 32px 0;
  margin: 0 auto;
  position: relative;
}

.center-container {
  display: flex;
  justify-content: space-between;
  /* 官方无 align-items（默认 stretch）：cate-container 撑满整列高度，sticky 侧边栏才有粘附空间 */
}

.cate-container { flex: 0 0 240px; }

.content-container {
  display: flex;
  flex: 1 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------------- 左侧边栏（官方 .sidebar，宽 240，sticky top 84） ---------------- */
.sidebar {
  width: 240px;
  padding-bottom: 16px;
  max-height: calc(100vh - 84px);
  overflow: hidden;
  position: sticky;
  left: 0;
  top: 84px;
}

.sidebar .article_title {
  padding: 0 0 20px 23px;
  color: #252b48;
  font-weight: 600;
  font-size: 24px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.sidebar .sidebar_list {
  height: calc(100vh - 174px);
  padding-right: 20px;
  overflow: hidden;
}

.sidebar .sidebar_grandpa {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  /* 官方 smooth-scrollbar 行为：滚动条默认隐藏，悬停容器或滚动中才显示（scrolling 类由 docs.js 在滚动时短暂加上） */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar .sidebar_grandpa:hover { scrollbar-color: rgba(0, 0, 0, .3) transparent; }

.sidebar .sidebar_grandpa::-webkit-scrollbar { width: 8px; }

.sidebar .sidebar_grandpa::-webkit-scrollbar-track { background: transparent; }

.sidebar .sidebar_grandpa::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.sidebar .sidebar_grandpa:hover::-webkit-scrollbar-thumb,
.sidebar .sidebar_grandpa.scrolling::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .35); }

.sidebar ul,
.sidebar li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .sidebar_grandpa * { transition: .2s; }

.sidebar .sidebar_grandpa > li {
  position: relative;
  margin-bottom: 4px;
}

.sidebar .sidebar_grandpa > li .father_li_title {
  display: flex;
  align-items: center;
  width: 100%;
}

/* 顶部一级项：600 / 14px / #252b48 / 圆角 15 悬停浅蓝底 */
/* father_li_title 自身 relative：展开后箭头（absolute）相对标题行定位，而不是整个 li（官方 > li > span） */
.sidebar .sidebar_grandpa > li > .father_li_title { position: relative; }

.sidebar .sidebar_grandpa > li > a,
.sidebar .sidebar_grandpa > li > .father_li_title {
  display: block;
  padding: 6px 12px 6px 23px;
  color: #252b48;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  border-radius: 15px;
  text-decoration: none;
  cursor: pointer;
}

.sidebar .sidebar_grandpa > li .father_li_title a {
  display: flex;
  align-items: center;
  width: 100%;
  color: #252b48;
  text-decoration: none;
}

.sidebar .sidebar_grandpa > li > a:hover,
.sidebar .sidebar_grandpa > li .father_li_title:hover { background-color: #fafbff; }

.sidebar .sidebar_grandpa > li.current .father_li_title,
.sidebar .sidebar_grandpa > li.current .father_li_title a { color: #1a66ff; }

/* 可折叠组：箭头 + 展开态（show）*/
.sidebar .sidebar_grandpa > li > ul { display: none; }

.sidebar .sidebar_grandpa > li.show > ul { display: block; }

.sidebar .sidebar_grandpa > li > span .icon-downarrow,
.sidebar .sidebar_grandpa > li .father_li_title .icon-downarrow {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  color: #252b48;
  font-weight: 700;
  transition: transform .2s;
}

.sidebar .sidebar_grandpa > li.show > .father_li_title { background-color: #f5f8ff; color: #1a66ff; }
.sidebar .sidebar_grandpa > li.show > .father_li_title a { color: #1a66ff; }

.sidebar .sidebar_grandpa > li.show .father_li_title .icon-downarrow { transform: rotate(180deg); }

/* 组内二级（sidebar_father）：13px 常规，组标题 600 14px 缩进 30 */
.sidebar .sidebar_father { padding: 5px 0; }

.sidebar .sidebar_father > li.has_child { padding: 5px 0 0; }

.sidebar .sidebar_father > li.has_child:first-child { padding-top: 0; }

.sidebar .sidebar_father > li > span {
  display: block;
  margin: 10px 0;
  padding-left: 30px;
  color: #252b48;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}

.sidebar .sidebar_father > li > a {
  display: block;
  margin-left: 0;
  padding: 6px 0 6px 45px;
  color: rgba(37, 43, 72, .8);
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
}

.sidebar .sidebar_father > li.current > a,
.sidebar .sidebar_father > li > a:hover { color: #1a66ff; }

.sidebar .sidebar_son { margin-left: 30px; }

.sidebar .sidebar_son > li a {
  display: block;
  padding: 6px 0 6px 15px;
  color: rgba(37, 43, 72, .8);
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
}

.sidebar .sidebar_son > li a:hover { color: #1a66ff; }

.sidebar .sidebar_son > li.current a {
  color: #1a66ff;
  font-weight: 600;
}

.sidebar .sidebar_father > li:last-child .sidebar_son { border-bottom: none; }

/* ---------------- 右侧本页目录（官方 right_body_wrap，宽 220，sticky top 84） ---------------- */
.right_body_wrap {
  width: 220px;
  position: sticky;
  top: 84px;
  right: 0;
  align-self: flex-start;
}

.right_body { border-radius: 4px; }

.right_body .right_body_title {
  margin-bottom: 16px;
  color: #252b48;
  font-weight: 600;
  font-size: 15px;
}

.right_body .right_nav {
  padding: 10px;
  border-radius: 4px;
  background: #fff;
  transition: all .5s;
}

.right_body .right_nav_ul {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}

.right_body .right_nav_ul li {
  width: 100%;
  height: 22px;
  line-height: 22px;
  margin-bottom: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* 当前项左侧 4px 蓝色小竖条（官方 :before） */
.right_body .right_nav_ul li::before {
  display: block;
  float: left;
  content: "";
  width: 4px;
  height: 100%;
  background: none;
  border-radius: 2px;
}

.right_body .right_nav_ul li a {
  display: inline-block;
  width: 100%;
  padding-left: 13px;
  overflow: hidden;
  color: #252b48;
  font-weight: 400;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}

.right_body .right_nav_ul li.sublist a { padding-left: 28px; }

.right_body .right_nav_ul li.current::before { background: #1a66ff; }

.right_body .right_nav_ul li.current a { font-weight: 600; }

/* ---------------- 返回顶部悬浮钮（官方 quick_entrance） ---------------- */
.go2top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 90;
  display: none;
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background-color: #fff;
  box-shadow: 0 0 15px 0 rgba(8, 36, 92, .1);
  color: #1a66ff;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
}

.go2top.show { display: block; }

.go2top svg {
  display: block;
  margin: 10px auto 2px;
  width: 22px;
  height: 22px;
}

.go2top span { color: #5e5f63; }
