:root {
    --radar-color-light: #50b5ff;
    --radar-color-moderate: #00d400;
    --radar-color-strong: #ffff00;
    --radar-color-intense: #ff8000;
    --radar-color-extreme: #ff0000;
}

/* Radar Sektion Container */
.bsw-radar-section {
    margin-top: 2.5rem;
    background: rgba(38, 40, 53, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Summary Styling (Kopfzeile) */
.bsw-radar-section summary {
    padding: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.bsw-radar-section summary h2 {
    margin: 0;
}

.bsw-radar-section summary::-webkit-details-marker {
    display: none;
}

/* Content Wrapper */
.bsw-radar-content {
    padding: 0 1rem 1rem 1rem;
}

.bsw-radar-map-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

/* Die Karte selbst */
#bsw-radar-map {
    height: 350px;
    width: 100%;
    background-color: #262835;
    /* Fallback Farbe passend zum Dark Mode */
    z-index: 1;
    /* Sicherstellen, dass sie korrekt gestapelt wird */
}

/* Leaflet Anpassungen für Dark Mode */
.leaflet-container {
    font-family: inherit;
    /* Schriftart vererben */
    background: #262835;
}

/* Popup Styling */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: rgba(38, 40, 53, 0.9);
    color: #eee;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content {
    margin: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Entfernen des weißen Hintergrunds bei Controls */
.leaflet-bar a {
    background-color: rgba(38, 40, 53, 0.8);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none !important;
    /* Unterstriche entfernen */
}

.leaflet-bar a:hover {
    background-color: rgba(102, 178, 255, 0.3);
    color: #fff;
    text-decoration: none !important;
}

/* Aquamorph Slider Controls */
.bsw-radar-controls {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0.75rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    outline: none !important;
}

/* Slider Reset & Styling */
.bsw-radar-slider {
    flex-grow: 1;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    height: 24px;
    /* Ausreichend Höhe für Touch */
    border: none !important;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.bsw-radar-slider:focus {
    outline: none;
    box-shadow: none;
}

.bsw-radar-slider::-moz-focus-outer {
    border: 0;
}

/* Webkit Track (Chrome, Safari, Edge) */
.bsw-radar-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Webkit Thumb (Chrome, Safari, Edge) */
.bsw-radar-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #7dd3fc, #0ea5e9 65%, #0284c7);
    margin-top: -7px; /* (8px Track - 20px Thumb) / 2 - 1px Border */
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 12px rgba(14, 165, 233, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    cursor: grab;
}

.bsw-radar-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.bsw-radar-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bsw-radar-slider:active::-webkit-slider-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.8), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Firefox Thumb */
.bsw-radar-slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #7dd3fc, #0ea5e9 65%, #0284c7);
    box-shadow: 
        0 0 12px rgba(14, 165, 233, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    cursor: grab;
}

.bsw-radar-slider::-moz-range-thumb:active {
    cursor: grabbing;
}

.bsw-radar-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bsw-radar-slider:active::-moz-range-thumb {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.8), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Firefox Track */
.bsw-radar-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bsw-radar-time {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.bsw-radar-play {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    flex-shrink: 0;
}

.bsw-radar-play:hover {
    background: rgba(14, 165, 233, 0.3);
    border-color: rgba(14, 165, 233, 0.5);
    color: #7dd3fc;
    transform: scale(1.05);
}

.bsw-radar-play:active {
    transform: scale(0.95);
}

.bsw-radar-play .material-symbols-rounded {
    font-size: 2rem;
}

/* Legende für Radar */
.bsw-radar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bsw-radar-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.bsw-radar-legend-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
}

.bsw-radar-legend-label {
    font-size: 0.7rem;
    color: #aaa;
    font-weight: 500;

}

/* Radar Loader Overlay */
.bsw-radar-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 40, 53, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Über der Karte */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border-radius: 0.5rem;
}

.bsw-radar-loader.active {
    opacity: 1;
    pointer-events: all;
}

.bsw-radar-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #0ea5e9;
    animation: bsw-radar-spin 1s ease-in-out infinite;
}

@keyframes bsw-radar-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Radar Layer für weiche Übergänge und bessere Lesbarkeit */
.bsw-radar-layer {
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}