/* © qiqicto.com 其其网ICT工具箱 · 未经许可禁止复制分发 */
/* ============================================================================
 * site.css — 站点通用组件（所有页面共用）
 * ============================================================================
 * 与 layout.css 的分工：
 *   layout.css  页面版式（取值已定，不再追加）
 *   site.css    站点级交互组件（顶栏按钮等），新页面自动继承
 *   home.css    首页专属
 *   tool-ui.css 工具页专属（结果表 / 速查表等）
 * ========================================================================== */

/* --- 结果复制按钮的「已复制」反馈 --- */
.btn.copied { background: #27ae60; }

/* --- 通用小徽标（工具页状态标注） --- */
.chip {
  background: var(--tool-line);
  border-radius: var(--tool-radius-s);
  color: var(--tool-neutral-dark);
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  vertical-align: 1px;
}
.chip.on { background: var(--tool-accent-weak); color: var(--theme-color); }

/* --- 工具页收藏按钮（由 tool-page.js 注入到标题区） --- */
.tool-fav { margin-top: 14px; }
.tool-fav .fa { margin-right: 6px; }
.tool-fav.is-fav { border-color: var(--tool-accent-line); color: var(--theme-color); }

/* --- 站内搜索悬浮结果（search.js；所有页面共用） -------------------------
   顶栏搜索输入时在下方弹出匹配工具清单，点击直达；首页同时保留卡片过滤。
   位置由脚本按搜索框实时坐标设置（fixed），这里只定义外观。 */
.ns-panel {
  background: var(--tool-surface);
  border: 1px solid var(--tool-line-strong);
  border-radius: var(--tool-radius-m);
  box-shadow: var(--tool-shadow-hover);
  max-height: min(62vh, 440px);
  overflow: auto;
  padding: 6px;
  position: fixed;
  z-index: 1003;
}
.ns-panel[hidden] { display: none; }
.ns-item {
  align-items: center;
  border-radius: var(--tool-radius-s);
  color: var(--theme-black-color);
  display: flex;
  gap: 10px;
  padding: 9px 11px;
  text-decoration: none;
}
.ns-item .fa { color: var(--theme-color); flex: none; font-size: 14px; text-align: center; width: 18px; }
.ns-name { font-size: 14px; }
.ns-meta { color: var(--theme-light-color); font-size: 12px; margin-left: auto; white-space: nowrap; }
.ns-item:hover, .ns-item:focus-visible, .ns-item.is-active { background: var(--tool-accent-weak); }
.ns-item:hover .ns-name, .ns-item.is-active .ns-name { color: var(--theme-color); }
.ns-all {
  align-items: center;
  border-top: 1px dashed var(--tool-line-strong);
  color: var(--theme-light-color);
  display: flex;
  font-size: 12px;
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
  padding: 9px 6px 5px;
  text-decoration: none;
}
.ns-all:hover { color: var(--theme-color); }
.ns-empty { color: var(--theme-light-color); font-size: 13px; line-height: 1.8; padding: 12px; }
.ns-empty b { color: var(--theme-black-color); display: block; margin-bottom: 2px; }
.ns-empty a { color: var(--theme-color); }

/* ----------------------------------------------------------------------------
 * 页脚版权区：版权一行、备案信息另起一行。
 * .cp 的颜色/行高在 layout.css 迁移段（不可改动），这里只补分行所需的最小样式。
 * ------------------------------------------------------------------------- */
footer.site-footer .cp p { margin: 0; }
footer.site-footer .cp .cp-beian a { margin-right: 20px; }
footer.site-footer .cp .cp-beian a:last-child { margin-right: 0; }


/* 桌面端：收藏按钮固定到标题区右上角，减少一行空白（对齐标题行） */
@media (min-width: 768px) {
  .tool-head { position: relative; }
  .tool-head h1, .tool-head p { padding-right: 110px; }
  .tool-fav { margin-top: 0; position: absolute; right: 0; top: 24px; }
}

/* ==== 分类分组标题（首页按子类分组） ==== */
.cat-group + .cat-group { margin-top: 14px; }
.cat-group-title {
  align-items: center; color: var(--theme-light-color);
  display: flex; font-size: 13px; font-weight: 600;
  gap: 6px; letter-spacing: .3px; margin: 18px 0 10px;
}
.cat-group-title .fa { color: var(--theme-color); font-size: 12px; }
.cat-group-title::after {
  background: var(--tool-line); content: ""; flex: 1; height: 1px; margin-left: 4px;
}

/* ==== 页面过渡（多页站进入/离开） ==== */
@media (prefers-reduced-motion: no-preference) {
  @keyframes lt-page-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lt-page-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(6px); }
  }
  body { transition: opacity .15s ease; }
  html.lt-enter body {
    animation: lt-page-in .34s cubic-bezier(.22, .61, .36, 1) both;
    animation-delay: .03s;
  }
  body.lt-leaving { animation: lt-page-out .17s ease forwards; pointer-events: none; }
  .card, .card.is-soon, .cat-nav-item { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
}
