/* Unified map opacity panel */

:root {
    --ss-report-marker-opacity: 1;
}

/* Report marker opacity */
.storm-map-wrap .leaflet-marker-icon[src*="/markers/"],
.storm-map-wrap .leaflet-marker-icon[src*="markers/"],
.storm-map-wrap .ss-report-marker,
.storm-map-wrap .leaflet-marker-icon.ss-report-marker {
    opacity: var(--ss-report-marker-opacity, 1) !important;
}

/* Hide old radar opacity slider inside animation panels */
#nxrd-player .nxrd-slider-row,
#sr-nexrad-player .nxrd-slider-row,
#sr-nexrad-player input[type="range"] {
    display: none !important;
}

/* Keep old hidden panels hidden if previous cleanup created them */
.ss-clean-opacity-panel {
    display: none !important;
}

.ss-map-opacity-panel {
    display: none;
    position: absolute;
    left: 10px;
    top: 118px;
    z-index: 1350;
    width: min(280px, calc(100% - 20px));
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-accent);
    background: rgba(15,18,24,.92);
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ss-map-opacity-panel.active {
    display: block;
}

.ss-map-opacity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: .6px;
}

.ss-map-opacity-close {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ss-map-opacity-close:hover {
    color: var(--cyan);
}

.ss-map-opacity-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ss-map-opacity-group + .ss-map-opacity-group {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.ss-map-opacity-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 700;
}

.ss-map-opacity-value {
    color: var(--cyan);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ss-map-opacity-range {
    width: 100%;
    cursor: pointer;
    touch-action: none;
}

[data-theme="light"] .ss-map-opacity-panel {
    background: rgba(255,255,255,.94);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
