
/* ===== Factory Heatmap Controls ===== */
/* Sprint 003 Task 2.3: Factory Activity Heatmap Layer */

.heatmap-controls {
    position: absolute;
    bottom: var(--space-4);
    right: var(--space-4);
    z-index: var(--z-panel, 500);
    display: flex;
    gap: var(--space-2);
}

.heatmap-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.heatmap-toggle:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-accent);
}

.heatmap-toggle--active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(245, 158, 11, 0.2));
    border-color: #f59e0b;
    color: #facc15;
}

.heatmap-mode {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
}

.heatmap-mode__label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.heatmap-mode__value {
    color: var(--color-text);
    font-weight: 600;
}

.heatmap-legend {
    position: absolute;
    bottom: 140px;
    right: var(--space-4);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    z-index: var(--z-panel, 500);
    min-width: 120px;
}

.heatmap-legend__title {
    font-weight: 600;
    margin-bottom: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.heatmap-legend__scale {
    height: 120px;
    width: 12px;
    border-radius: 6px;
    position: relative;
    margin-bottom: var(--space-2);
    background: linear-gradient(to bottom, #dc2626, #f59e0b, #22c55e, #2563eb);
}

.heatmap-legend__labels {
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.heatmap-legend__label {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* Heatmap layer transition */
.leaflet-heatmap-layer {
    transition: opacity 0.3s ease;
}

[data-heatmap-hidden="true"] .leaflet-heatmap-layer {
    opacity: 0;
    pointer-events: none;
}
