/* Busiest times heatmap (stats_attendance.php) and How long members stay (stats_retention.php), functions_stats_academy.php.
   One sequential hue (categorical slot 1 blue), light to dark, stepped separately for the dark theme. */
:root { --sa-c: #2a78d6; --sa-tip-bg: rgba(11, 11, 16, 0.92); }
html[data-theme="dark"] { --sa-c: #3987e5; }

.bc-sa-note { margin: 14px 0 0; color: var(--bc-muted, #6b6b76); font-size: 12.5px; line-height: 1.55; }

/* Heatmap: weekdays down, hours across */
.bc-sa-heat { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); gap: 3px; align-items: center; }
.bc-sa-heat-h { font-size: 10.5px; color: var(--bc-muted, #6b6b76); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-sa-heat-d { font-size: 11.5px; color: var(--bc-muted, #6b6b76); text-align: center; padding-bottom: 2px; }
.bc-sa-heat-c { display: block; height: 18px; border-radius: 4px; background: var(--bc-surface-2, #f6f6f8); }
.bc-sa-heat-c[data-l="1"] { background: color-mix(in srgb, var(--sa-c) 16%, var(--bc-surface, #fff)); }
.bc-sa-heat-c[data-l="2"] { background: color-mix(in srgb, var(--sa-c) 34%, var(--bc-surface, #fff)); }
.bc-sa-heat-c[data-l="3"] { background: color-mix(in srgb, var(--sa-c) 54%, var(--bc-surface, #fff)); }
.bc-sa-heat-c[data-l="4"] { background: color-mix(in srgb, var(--sa-c) 76%, var(--bc-surface, #fff)); }
.bc-sa-heat-c[data-l="5"] { background: var(--sa-c); }
.bc-sa-heat-c.is-few { background: repeating-linear-gradient(135deg, var(--bc-line, rgba(15, 15, 25, 0.08)) 0 1px, transparent 1px 5px), var(--bc-surface-2, #f6f6f8); }
.bc-sa-heat .bc-sa-heat-c:hover { box-shadow: 0 0 0 2px var(--bc-ink, #0b0b10); }
.bc-sa-heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 12px; font-size: 11.5px; color: var(--bc-muted, #6b6b76); }
.bc-sa-heat-legend .bc-sa-heat-c { width: 14px; height: 14px; min-height: 0; }
.bc-sa-heat-legend > span:not(.bc-sa-heat-c) { margin: 0 4px; }
.bc-sa-heat-legend .bc-sa-heat-few { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; white-space: nowrap; }
@media (max-width: 560px) {
  .bc-sa-heat { grid-template-columns: 30px repeat(var(--cols), minmax(0, 1fr)); gap: 2px; }
  .bc-sa-heat-c { border-radius: 3px; }
}

/* One tooltip for every [data-tip] mark */
.bc-sa-tip { position: absolute; z-index: 60; max-width: 260px; padding: 8px 10px; border-radius: 10px; background: var(--sa-tip-bg); color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
