/* 大盘云图 —— 原生 Canvas 热力图,浅色风格,融入站点标准布局 */

.cm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cm-toolbar-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cm-title { font-size: 18px; font-weight: 700; color: var(--txt, #24292f); margin: 0; letter-spacing: -.01em; }
.cm-date { font-size: 12px; color: var(--txt2, #8a929c); font-variant-numeric: tabular-nums; }
.cm-toolbar-right { display: flex; align-items: center; gap: 8px; }

.cm-select {
  font-size: 13px;
  color: var(--txt, #24292f);
  background: var(--bg, #fff);
  border: 1px solid var(--border, #d0d7de);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color 120ms ease-out;
}
.cm-select:hover, .cm-select:focus { border-color: var(--accent, #185FA5); }

.cm-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #185FA5);
  background: rgba(24, 95, 165, .08);
  border: 1px solid rgba(24, 95, 165, .25);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}
.cm-btn:hover { background: rgba(24, 95, 165, .16); }

/* 色阶图例 */
.cm-legend { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin-bottom: 10px; }
.cm-legend-swatch {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.cm-legend-swatch:first-child { border-radius: 4px 0 0 4px; }
.cm-legend-swatch:last-child { border-radius: 0 4px 4px 0; }

/* 云图画布容器:占据中间主要空间的白卡片 */
.cm-canvas-wrap {
  position: relative;
  width: 100%;
  height: calc(100vh - 232px);
  min-height: 420px;
  background: var(--bg, #fff);
  border: 1px solid var(--border, #d0d7de);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(27, 31, 36, .06);
}
.cm-canvas-wrap canvas { display: block; width: 100%; height: 100%; }

/* hover 浮层 */
.cm-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  min-width: 150px;
  background: var(--bg, #fff);
  border: 1px solid var(--border, #d0d7de);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 31, 36, .16);
  padding: 8px 10px;
  font-size: 12px;
}
.cm-tooltip[hidden] { display: none; }
.cm-tt-name { font-size: 13px; font-weight: 700; color: var(--txt, #24292f); margin-bottom: 5px; }
.cm-tt-code { font-size: 11px; font-weight: 500; color: var(--txt2, #8a929c); font-variant-numeric: tabular-nums; }
.cm-tt-row {
  display: flex; justify-content: space-between; gap: 16px;
  line-height: 1.6; color: var(--txt2, #8a929c);
}
.cm-tt-row b { color: var(--txt, #24292f); font-variant-numeric: tabular-nums; }

/* 加载 / 错误 覆盖层 */
.cm-loading, .cm-error {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: var(--txt2, #8a929c);
  background: rgba(255, 255, 255, .9);
  padding: 10px 18px;
  border-radius: 8px;
}
.cm-loading[hidden], .cm-error[hidden] { display: none; }
.cm-error { color: #e5484d; }

.cm-hint {
  font-size: 12px;
  color: var(--txt2, #8a929c);
  margin-top: 10px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .cm-canvas-wrap { height: calc(100vh - 260px); min-height: 340px; }
}
