/* Danger Heat Map - Canvas overlay styles */

.heatmap-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.heatmap-container .plant-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.heatmap-container .heatmap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
}

.heatmap-container .heatmap-overlay canvas {
    width: 100%;
    height: 100%;
}

/* Zone Popup */
.heatmap-popup {
    position: absolute;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    z-index: 100;
    pointer-events: auto;
}

.heatmap-popup .zone-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.heatmap-popup .zone-risk {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.heatmap-popup .zone-risk.safe { color: var(--accent-green); }
.heatmap-popup .zone-risk.caution { color: #ffc832; }
.heatmap-popup .zone-risk.elevated { color: #ff8c00; }
.heatmap-popup .zone-risk.danger { color: var(--accent-red); }

.heatmap-popup .zone-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Color Legend */
.heatmap-legend {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.heatmap-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.heatmap-legend .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.heatmap-legend .legend-color.safe { background: #39ff14; }
.heatmap-legend .legend-color.caution { background: #ffc832; }
.heatmap-legend .legend-color.elevated { background: #ff8c00; }
.heatmap-legend .legend-color.danger { background: #ff3131; }

/* Plant level selector */
.plant-level-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.plant-level-selector button {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3rem 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.plant-level-selector button.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}