/* Usage heat map: the canvas rides inside the zoomable layer, so it follows zoom and pan. */
.usage-heat {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* The two buttons float top-right; when the edit pencil is there too they sit to its left. */
.heat-tools {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}
.wall-photo-container:has(> .wall-edit-fab) .heat-tools { right: 62px; }

.heat-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--text);
    box-shadow: 0 2px 10px var(--shadow-md);
    cursor: pointer;
}
.heat-tool:hover { color: var(--text-heading); }
.heat-tool.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-icon.wall-edit-fab:not(.editing) { width: 44px; height: 44px; }

.heat-legend {
    position: absolute;
    z-index: 3;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
    color: var(--text);
    font-size: 0.75rem;
    box-shadow: 0 2px 10px var(--shadow-md);
}
.heat-legend-bar {
    height: 8px;
    margin: 4px 0;
    border-radius: 4px;
    background: linear-gradient(90deg, rgb(38 52 160), rgb(0 170 230), rgb(60 200 90), rgb(250 220 40), rgb(215 40 35));
}
.heat-legend-ends { display: flex; justify-content: space-between; gap: 12px; }

/* Per-hold counts: on with the toggle, or on their own once zoomed in past the threshold. */
.heat-badge { display: none; }
.panel-viewer.heat-counts .heat-badge,
.panel-viewer .photo-viewport[data-bw-zoomed="true"] .heat-badge { display: inline; }
.heat-badge circle { fill: #1c1c24; stroke: #fff; stroke-width: 0.25; }
.heat-badge text { fill: #fff; font-size: 1.7px; font-weight: 700; }
