/* ─── Heatmap controls + cells (assets/js/heatmap.js) ─── */

.hm-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-swatch {
  display: inline-block;
  flex-shrink: 0;
  width: 44px;
  height: 10px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.hm-trigger.filter-select { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding-right: 30px; font-weight: 700; }

.multiselect-panel.hm-panel { width: 300px; max-height: min(460px, calc(100vh - 120px)); overflow-y: auto; padding: 8px; }
.hm-group + .hm-group { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border-subtle); }
.hm-group-label {
  margin: 4px 8px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hm-option {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-primary);
  font: 700 12.5px var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: background var(--ease-fast);
}
.hm-option .hm-swatch { width: 64px; height: 12px; border-radius: 6px; }
.hm-option:hover { background: var(--bg-hover); }
.hm-option.is-active { background: var(--primary-light); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent); }
.hm-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.hm-option-kind { font-size: 10.5px; font-weight: 600; color: var(--text-muted); }

.hm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.hm-legend-bar { width: 180px; height: 8px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.hm-legend-note { font-weight: 500; margin-left: 6px; }

/* Heat cells read as a mosaic: a 1px surface gap between tiles. The
   colours themselves are inline (cellStyle), which beats the row-hover
   background — a hovered row gets a slight darken instead. */
.os-table td.os-heat,
.campaign-pivot-table td.cp-heat { box-shadow: inset 0 0 0 1px var(--bg-surface); font-weight: 700; }
/* Darken via an inset shadow, not filter: a filter would put hovered
   cells in their own stacking layer next to the frozen label column. */
.os-table tbody tr:hover td.os-heat,
.campaign-pivot-table tbody tr:hover td.cp-heat { box-shadow: inset 0 0 0 1px var(--bg-surface), inset 0 0 0 999px rgba(0, 0, 0, 0.06); }
.os-table.is-heat td { padding-top: 8px; padding-bottom: 8px; }
