/* ============================================================
   /tools 频道增量样式（v=1）
   只新增类名，不改 tools.css 里现有的任何规则：
     1) 工具能力标签 tl-flag-chip / tl-card-meta / tl-badge-flag
     2) 「最近使用」区块的标题与清空按钮
     3) 深色模式开关 tl-theme
   由 common/header.html 在 chrome_light 时引入（仅 /tools 频道）。
   ============================================================ */

/* ---------- 1. 能力标签（批量 / 大文件 / 离线可用） ---------- */
.tl-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px;
}
.tl-card-meta .tl-card-tag {
  margin-top: 0;                     /* 与标签排在同一行，去掉原来的上边距 */
  /* 分类名在这里只是「出处」，不是能力：褪成灰字，别跟能力标签抢眼 */
  padding: 0; background: none; color: #94a3b8; font-size: 11px;
}
.tl-flag-chip {
  display: inline-block; font-style: normal; white-space: nowrap;
  font-size: 11px; line-height: 1.6; padding: 1px 7px; border-radius: 6px;
  border: 1px solid transparent;
}
.tl-flag-chip.is-blue  { color: #1d4ed8; background: #eff6ff; border-color: #dbeafe; }
.tl-flag-chip.is-amber { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.tl-flag-chip.is-gray  { color: #64748b; background: #f4f6fa; border-color: #e9edf4; }

/* 工具页头部的 .tl-badges 沿用原尺寸，只换标签配色 */
.tl-badges .tl-badge-flag { font-weight: 600; }
.tl-badges .tl-badge-flag.is-blue  { color: #1d4ed8; background: #eff6ff; }
.tl-badges .tl-badge-flag.is-amber { color: #b45309; background: #fffbeb; }
.tl-badges .tl-badge-flag.is-gray  { color: #475569; background: #eef2f8; }

/* 表格里的分组行（状态码速查表用 JS 生成，原来写的是内联颜色，深色下会留白） */
.tl-table .tl-td-group { background: #f8fafc; font-weight: 700; color: #334155; }

/* ---------- 2. 最近使用 ---------- */
/* 「只存在本机」是 h2 里的小字，不能被 h2 的 19px/800 带跑 */
.tl-sec-h h2 .tl-sec-n {
  font-size: 12px; font-weight: 400; letter-spacing: 0; color: #94a3b8; margin-left: 2px;
}
.tl-recent-x {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; color: #94a3b8;
}
.tl-recent-x:hover { color: #2563eb; }

/* ---------- 3. 深色模式开关 ---------- */
/* 固定在右下角：不挤占正文，也不用在首页和 27 个工具页各排一次版 */
.tl-theme {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid #e2e8f0; background: #fff; color: #475569;
  box-shadow: 0 6px 20px -8px rgba(15, 23, 42, .35);
  cursor: pointer; transition: color .16s, border-color .16s, transform .16s;
}
.tl-theme:hover { color: #2563eb; border-color: #c7d2fe; transform: translateY(-1px); }
.tl-theme-i { display: none; }
.tl-theme-moon { display: block; }                       /* 浅色：月亮（点它变黑） */
html[data-theme="dark"] .tl-theme-moon { display: none; }
html[data-theme="dark"] .tl-theme-sun { display: block; }

@media (max-width: 560px) {
  .tl-theme { right: 12px; bottom: 12px; width: 38px; height: 38px; }
}
@media print { .tl-theme { display: none; } }
