/* 工具页浅色化：hideout-profit / barters 等 React 工具页，覆盖 tarkov-tools 深色终端主题，对齐全站浅色编辑风 */
/* 关键：原深色规则是 .takefu-source-tool #root .data-table ... !important，需用相同特异性前缀 + 后加载覆盖 */

/* ---- 1. 表格文字/单元格 浅色化 ---- */
.takefu-source-tool #root .data-table,
.takefu-source-tool #root .data-table td,
.takefu-source-tool #root .data-table .data-cell,
.takefu-source-tool #root .data-table .center-content,
.takefu-source-tool #root .data-table .wipe-length-cell,
.takefu-source-tool #root .data-table span {
  color: #2f3a41 !important;
}

/* ---- 2. 表头浅色 ---- */
.takefu-source-tool #root .data-table thead,
.takefu-source-tool #root .data-table thead tr,
.takefu-source-tool #root .data-table thead th {
  background: #f0f3ee !important;
  color: #243038 !important;
  border-bottom: 1px solid #dce1da !important;
  font-weight: 600 !important;
}

/* ---- 3. 单元格白底 + 浅分隔线 + 圆角容器 ---- */
.table-wrapper,
.takefu-source-tool #root .data-table {
  background: #ffffff !important;
  border-radius: 8px !important;
}
.table-wrapper .data-table table,
.takefu-source-tool #root .data-table table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #e3e7e1 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}
.takefu-source-tool #root .data-table td {
  background: #ffffff !important;
  border-bottom: 1px solid #ecefea !important;
  padding: 8px 12px !important;
}

/* ---- 4. 悬停行高亮 ---- */
.takefu-source-tool #root .data-table tr:hover td,
.takefu-source-tool #root .data-table tr:hover .data-cell {
  background: #f5f8f4 !important;
}

/* ---- 5. 表格内链接（原金色）---- */
.takefu-source-tool #root .data-table a {
  color: #1a7f37 !important;
}

/* ---- 6. 正/负收益语义色（加深到可读）---- */
.takefu-source-tool #root .data-table .is-good,
.takefu-source-tool #root .data-table td[class*="profit"] {
  color: #1a7f37 !important;
}
.takefu-source-tool #root .data-table .is-bad {
  color: #c0392b !important;
}

/* ---- 7. 工具区按钮文字可读（原透明底浅灰字在浅色页不可见）---- */
main button {
  color: #243038 !important;
  border-color: #c9d0c9 !important;
}

/* ---- 8. h1 对齐任务页（48px 粗体）---- */
.tarkov-source-hero h1,
.tfwipe-hero h1 {
  font-size: 48px !important;
  line-height: 1.1 !important;
  letter-spacing: -0.5px !important;
}

/* ---- 9. 精简表格列：隐藏「吞吐量/小时」「利润/小时」（第 5、7 列），首屏聚焦 奖励/成本/利润 ---- */
.takefu-source-tool #root .data-table th:nth-child(5),
.takefu-source-tool #root .data-table td:nth-child(5),
.takefu-source-tool #root .data-table th:nth-child(7),
.takefu-source-tool #root .data-table td:nth-child(7) {
  display: none !important;
}

/* ---- 10. 隐藏源站远程控制/免责 UI（本地化站点不需要，提前 CSS 隐藏消除闪现）---- */
#root .session-popup,
#root .id-wrapper,
#root .CookieConsent,
#root .navigation,
#root .desktop-menu,
#root .ghost-menu {
  display: none !important;
}

/* ===== 工具页右侧地图侧边栏（3D地图 + 互动地图，对齐物品/任务页风格）===== */
/* 背景覆盖需用 body.takefu-source-tool（与 tarkov-source.css 同特异性、后加载才赢） */
body.takefu-source-tool {
  background: #f5f7fa;
}
.tarkov-source-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}
.tarkov-source-main__content {
  flex: 1 1 0;
  min-width: 0;
  max-width: 1100px;
}
.tool-map-side {
  flex: 0 0 250px;
  min-width: 0;
  position: sticky;
  top: 76px;
}
.tool-map-side .item-guide-map-index {
  background: #ffffff;
  border: 1px solid #e3e9ef;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: rgba(15, 23, 42, 0.04) 0 8px 24px;
}
.tool-map-side .item-guide-map-index__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tool-map-side .item-guide-map-index__head h2 {
  margin: 0;
  font-size: 15px;
  color: #17202c;
}
.tool-map-side .item-guide-map-index__head h2 i {
  margin-right: 4px;
  color: #2563eb;
}
.tool-map-side .item-guide-map-index__head a {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}
.tool-map-side .item-guide-map-index__head a i {
  margin-left: 2px;
}
.tool-map-side .item-guide-map-index__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}
.tool-map-side .item-guide-map-index__grid a {
  font-size: 12px;
  color: #334155;
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-map-side .item-guide-map-index__grid a:hover {
  background: #f1f5f9;
  color: #2563eb;
}
@media (max-width: 1200px) {
  .tarkov-source-main {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-map-side {
    flex: none;
    width: 100%;
    position: static;
  }
  .tool-map-side .item-guide-map-index__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tarkov-source-main__content {
    max-width: none;
    width: 100%;
    min-width: 0;
  }
}

