/* WRAL Time Control Bar - Adapted for Leaflet */
/* Debug: CSS geladen */
.wral-map-time-control {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    min-height: 45px !important; /* Smaller height */
    width: 390px ;
    border-radius: 10px !important;
    margin: 0 auto !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 10px !important; /* Kleinere Grundschrift */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 5px !important;
    position: fixed !important; /* Fixed instead of absolute for body positioning */
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10000 !important; /* Higher than other elements */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Verhindert Click-through */
    user-select: none !important; /* Verhindert Text-Selektion */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Leaflet Control Container Styling */
.leaflet-control.wral-map-time-control {
    position: absolute !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    color: white !important;
    min-height: 53px !important;
    width: 390px !important;
    border-radius: 10px !important;
    margin: 0 auto !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 10px !important; /* Kleinere Grundschrift */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.time-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    width: 100px;
}

.time-display p {
    margin: 0;
}

.set-time {
    font-size: 20px;
}

.set-time.slider-disabled {
    font-size: 24px;
}

.am-pm {
    font-size: 12px;
}

.am-pm.slider-disabled {
    font-size: 18px;
}

.time-diff {
    font-size: 13px;
}

.time-diff.slider-disabled {
    display: none;
}

.time-diff.positive {
    color: #5CD37C;
}

.time-diff.negative {
    color: white;
}

.layer-button {
    height: 25px;
    width: 25px;
    background: #575757;
    border: none;
    border-radius: 5px;
    padding: 0;
    margin-right: 10px;
    cursor: pointer;
}

.layer-button.shown {
    background: #1F97CC;
}

.layer-icon {
    width: 13px;
    height: 13px;
}

.slider-container {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0 10px;
    position: relative;
    width: 100%;
}

.slider-container.slider-disabled {
    opacity: 0.3;
}

.time-slider {
    position: relative;
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.time-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.time-slider::-ms-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.now-label {
    position: absolute;
    top: -20px;
    font-size: 10px;
    color: #ccc;
    transform: translateX(-50%);
}

.now-bar {
    position: absolute;
    top: 0;
    width: 2px;
    height: 8px;
    background: #5CD37C;
    transform: translateX(-50%);
}

.now-bar.is-now {
    background: #5CD37C;
}

.play-button {
    height: 25px;
    width: 25px;
    background: #575757;
    border: none;
    border-radius: 5px;
    padding: 0;
    margin-left: 10px;
    cursor: pointer;
}

.play-button.playing {
    background: #1F97CC;
}

.play-icon {
    width: 13px;
    height: 13px;
}

.settings-button {
    height: 25px;
    width: 25px;
    background: #575757;
    border: none;
    border-radius: 5px;
    padding: 0;
    margin-left: 10px;
    cursor: pointer;
}

.settings-icon {
    width: 21px;
    height: 21px;
}

/* Responsive Design */
@media (max-width: 480px) {
    
    .wral-map-time-control {
        width: 98% !important;
        bottom: 0.5vh !important;
        border-radius: 0;
        background: rgba(0, 0, 0, 1);
        box-shadow: 0 4px 8px rgba(220, 220, 220, 0.5);
        padding: 0 0.1rem 0 0.2rem;
    }
    
    .layer-button {
        display: none;
    }
    
    .settings-button {
        display: inline-block;
    }
    
    .play-button {
        margin-right: 14px;
    }
}

@media (min-width: 481px) and (max-width: 550px) and (orientation: portrait) {
    .wral-map-time-control {
        width: 100%;
        border-radius: 0;
        background: rgba(0, 0, 0, 1);
        box-shadow: 0 4px 8px rgba(220, 220, 220, 0.5);
        padding: 0;
    }
    
    .layer-button {
        display: none;
    }
    
    .settings-button {
        display: inline-block;
    }
    
    .play-button {
        margin-right: 14px;
    }
}

/* 2. Standard Smartphones (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) and (orientation: portrait) {
    .wral-map-time-control {
        width: 95% !important;
        bottom: 0.5vh !important;
        border-radius: 0;
        background: rgba(0, 0, 0, 1);
        box-shadow: 0 4px 8px rgba(220, 220, 220, 0.5);
        padding: 0;
    }
}

@media (orientation: landscape) {
    .wral-map-time-control {
        padding: 0 0.5rem 0 0.1rem;
    }
}

/* Integration mit Leaflet */
.leaflet-container .wral-map-time-control {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* Hide Leaflet attribution */
.leaflet-control-attribution {
    display: none !important;
}

/* Speed Control */
.wral-map-time-control-speed {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 10px !important;
    color: white !important;
}

.wral-map-time-control-speed-slider {
    width: 60px !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 2px !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.wral-map-time-control-speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 12px !important;
    height: 12px !important;
    background: white !important;
    border-radius: 50% !important;
    cursor: pointer !important;
}

.wral-map-time-control-speed-slider::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
    background: white !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    border: none !important;
}

.speed-label {
    font-size: 10px !important;
    color: white !important;
    font-weight: 500 !important;
} 

/* Radar controls display in WRALTimeControl */
.radar-controls-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    /* margin-bottom: 8px; */
}

.radar-controls-display .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.2s ease;
}

.radar-controls-display .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.radar-controls-display .btn:active {
    transform: translateY(0);
}

/* Ensure buttons are properly sized */
.radar-controls-display .btn i {
    font-size: 0.9rem;
} 