/* ============================================================
   GEO 监测系统 · 全局提示组件（S10 五、交互美化第一批）
   用法：元素加 data-tip="一句话说明"，引入本文件 + geo-tooltip.js 即可。
   术语角标（S14.5 U3 起统一写法，可键盘聚焦 + 读屏可读名）：
     <button type="button" class="info geo-term" data-tip="白话解释" aria-label="名词解释">?</button>
   零依赖、零布局占位（气泡 position:fixed，不进文档流 → 不改变任何页面的静态布局）
   ============================================================ */

/* S12 节 10.1：顶栏 sticky（六页通用——本样式被 assets/content/media/dashboard/showcase/publish 全部引入） */
.topnav {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: var(--bg, #ffffff) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04) !important;
  backdrop-filter: saturate(180%) blur(8px) !important;
}

/* S12 节 10.3：品牌管理双态——已停用品牌行灰底弱化（与 st-off 标签呼应） */
.brand-card.inactive {
  background: #f8f8fa;
  opacity: 0.62;
}
.brand-card.inactive:hover { opacity: 0.92; }
.brand-card .st-off { font-weight: 600; }

/* S12 节 10.2：建内容标准降权（次级按钮——不与新建条目/新建关键词抢占视线） */
button[data-act="kn-new"].ghost { color: var(--muted, #888); font-weight: 400; }
button[data-act="kn-new"].ghost:hover { color: var(--accent, #6d5dfc); }

.geo-tip-bubble {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  display: none;
  max-width: 260px;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .95);
  color: #fff;
  font: 12px/1.65 "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, Arial, sans-serif;
  letter-spacing: .2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  word-break: break-word;
  transition: opacity .12s ease;
  -webkit-text-size-adjust: 100%;
}

.geo-tip-bubble.show {
  display: block;
  opacity: 1;
}

/* 箭头（默认气泡在目标上方，尖朝下） */
.geo-tip-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(17, 24, 39, .95);
}

/* 上方放不下时翻到下方（尖朝上） */
.geo-tip-bubble.below::after {
  bottom: auto;
  top: -5px;
  border-top: 0;
  border-bottom: 5px solid rgba(17, 24, 39, .95);
}

/* S14.5 U3：帮助位统一为 button.info（可聚焦、可被读屏命名）——原生 button 归零，圆底由 .geo-term 提供 */
button.info {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: 0;
}

/* 术语「?」角标：inline 与术语同行，不占新行、不占信息位（S14.5 U5：字号 11px→12px，圆底 14→16px） */
.geo-term {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 3px;
  border-radius: 50%;
  background: rgba(83, 74, 183, .14);
  color: #534AB7;
  font: 700 12px/16px "Microsoft YaHei", system-ui, sans-serif;
  text-align: center;
  vertical-align: -2px;
  cursor: help;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.geo-term:focus {
  outline: 2px solid rgba(83, 74, 183, .35);
  outline-offset: 1px;
}

/* 提示中的关键行（术语白话解释用） */
.geo-tip-bubble b {
  color: #FFD9A0;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .geo-tip-bubble { transition: none; }
}
