/* 门店数量热力图与点位坐标：图例卡片、省级悬停读数、坐标读数条、省级城市分布。加载顺序在 tech.css 之后。 */

/* ── 热力图图例卡片 ───────────────────────── */
.heat-legend {
  list-style: none;
  margin: 0;
  padding: 8px 14px 2px;
  /* 六档排成两列三行：右栏还有状态与排行两张卡，图例竖排会把排行挤到屏幕外 */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.heat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.heat-sw {
  flex: none;
  width: 20px;
  height: 9px;
  border: 1px solid rgba(150, 208, 255, 0.22);
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}

.heat-t { font-variant-numeric: tabular-nums; }
.heat-row.is-empty { color: var(--dim); }

/* ── 省级悬停读数 ─────────────────────────── */
.prov-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 16;
  min-width: 128px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  color: var(--text);
  background: rgba(6, 16, 30, 0.9);
  border: 1px solid rgba(96, 180, 255, 0.3);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: 0 10px 26px rgba(2, 8, 20, 0.62);
}

.prov-tip b { font-size: 12.5px; }
.pt-n { font-weight: 600; color: #9cc2ff; font-variant-numeric: tabular-nums; }
.pt-m { font-size: 10.5px; color: var(--dim); }

/* ── 点位坐标读数条 ───────────────────────── */
.coord-chip {
  position: absolute;
  left: 16px;
  bottom: 52px;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  padding: 7px 10px 7px 12px;
  color: var(--text);
  font-size: 11.5px;
  background: linear-gradient(180deg, rgba(20, 33, 55, 0.94), rgba(9, 17, 31, 0.96));
  border: 1px solid rgba(96, 158, 226, 0.3);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: 0 12px 30px rgba(2, 8, 20, 0.55);
}

.coord-chip[hidden] { display: none; }

.cp-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #7fd0ff;
  box-shadow: 0 0 8px rgba(120, 200, 255, 0.9), inset 0 0 4px rgba(120, 200, 255, 0.6);
}

.cp-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; white-space: nowrap; }

.cp-k {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--dim);
}

.cp-v {
  white-space: nowrap;
  font: 600 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #bfe4ff;
  font-variant-numeric: tabular-nums;
}

.cp-btn {
  padding: 4px 8px;
  font-size: 11px;
  color: #cfe6ff;
  background: rgba(30, 64, 120, 0.4);
  border: 1px solid rgba(96, 158, 226, 0.3);
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.cp-btn:hover { border-color: rgba(120, 190, 255, 0.62); color: #e6f4ff; }
.cp-btn.is-done { border-color: rgba(18, 183, 106, 0.7); color: #8ff0c4; }
.cp-btn.is-x { width: 22px; padding: 0; font-size: 13px; line-height: 20px; }

/* ── 地图上的坐标准星 ─────────────────────── */
/* 准星只是读数标记：必须让点击穿过它，否则量完一次坐标后，
   落在准星下方（26×26）的门店点位就再也点不动了。 */
.cp-pin { position: relative; width: 26px; height: 26px; pointer-events: none; }

.cp-pin i { position: absolute; }

.cp-dot {
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #eaf6ff;
  box-shadow: 0 0 10px #7fd0ff, 0 0 3px #fff;
}

.cp-ring {
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 1px solid rgba(140, 214, 255, 0.85);
  animation: cp-pulse 2.2s ease-out infinite;
}

.cp-hair-h {
  left: 0;
  top: 50%;
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, rgba(140, 214, 255, 0.12), rgba(170, 228, 255, 0.85) 32%,
    rgba(170, 228, 255, 0.85) 68%, rgba(140, 214, 255, 0.12));
}

.cp-hair-v {
  top: 0;
  left: 50%;
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, rgba(140, 214, 255, 0.12), rgba(170, 228, 255, 0.85) 32%,
    rgba(170, 228, 255, 0.85) 68%, rgba(140, 214, 255, 0.12));
}

@keyframes cp-pulse {
  0% { transform: scale(0.55); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-ring { animation: none; opacity: 0.5; }
}

/* ── 详情抽屉里的坐标与省级城市分布 ───────── */
.dp-coord {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: #bfe4ff;
}

.dp-actions.is-inline {
  padding: 2px 0 10px;
  border-top: 0;
  gap: 6px;
  flex-wrap: wrap;
}

.rg-list {
  list-style: none;
  margin: 0;
  padding: 2px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rg-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.rg-n {
  width: 92px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
}

.rg-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(120, 166, 235, 0.14);
  overflow: hidden;
}

.rg-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(61, 139, 255, 0.55), #7fd0ff);
}

.rg-v {
  width: 46px;
  text-align: right;
  color: #bfe4ff;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .coord-chip { left: 10px; bottom: 46px; }
  .rg-n { width: 76px; }
}
