/* icp-footer.css — 全站 footer 备案信息样式 (构建管线注入)
 *
 * 供所有站点共用: 灰色 12px 小字, 居中, 备案号链接下划线, 平台名称链接加粗。
 * 浅色主题 #666, 深色主题自动切换为浅灰 (兼容美化版与文档站深色模式)。
 * 类名统一 icp-footer-* 前缀, 避免影响站点其他元素。
 */

/* 备案区: 与上方内容保持 28px 间距, 居中 (覆盖文档站无继承居中) */
.icp-footer {
  margin-top: 28px;
  text-align: center;
}

/* 文档站回退注入场景: 美化版 langref 桌面端把 body 变为 grid 容器,
   追加到 body 末尾的备案区被自动放置进导航列 (18rem 窄条) 不可见,
   此处强制横跨全部轨道, 恢复内容下方全宽居中展示。
   非 grid 宿主 (主站/原版站/std) 该规则惰性无副作用 */
body > .icp-footer {
  grid-column: 1 / -1;
}

/* 旧 autodoc std 文档站 (body.canvas 内部滚动 app): 备案号行下方
   留出底部空间, 滚动到底不贴边 (与 .docs 底部 padding 量级一致) */
body.canvas .icp-footer {
  margin-bottom: 2.5rem;
}

/* 中英文备案声明段落: 灰色 12px */
.icp-footer-notice {
  display: block;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

/* 仅英文段落与中文段落之间保留 28px 间距, 中文段落与备案号之间无间距 */
.icp-footer-notice:first-child {
  margin-bottom: 28px;
}

/* 备案号行: 前缀与链接同色同字号, 链接以下划线区分 */
.icp-footer-license-line,
.icp-footer-label {
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

.icp-footer-license {
  color: #666;
  font-size: 12px;
  line-height: 1.5;
  font-weight: normal;
  text-decoration: none;
  text-underline-offset: 3px;
}

.icp-footer-license:hover {
  color: #000;
  text-decoration: underline;
}

/* 公安备案块: 与 ICP 备案号分行展示 (换行独立成行) */
.icp-footer-mps {
  display: block;
  margin-top: 2px;
}

/* 公安备案 logo: 14px 高与 12px 字号匹配, 与编号之间以两个空格分隔 */
.icp-footer-mps-logo {
  width: 13px;
  height: 14px;
  vertical-align: -3px;
}

/* 监管平台名称链接 (声明内): 自持灰色加粗, 不继承父样式,
   默认无下划线, hover 时显示下划线 */
.icp-footer-link {
  color: #666;
  font-weight: 600;
  text-decoration: none;
}

.icp-footer-link:hover {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 深色主题: 文字切换浅灰, 保持可读 */
@media (prefers-color-scheme: dark) {
  .icp-footer-notice,
  .icp-footer-license-line,
  .icp-footer-label,
  .icp-footer-license,
  .icp-footer-link {
    color: #a1a1aa;
  }

  .icp-footer-license:hover {
    color: #fff;
  }

  .icp-footer-link:hover {
    color: #fff;
  }
}
