/**
 * WS40 Rain Radar styles.
 *
 * @author  Pasqualino De Marco
 * @license GPL-2.0-or-later
 */
.ws40-radar-wrap { margin: 0 0 12px; }
.ws40-radar__title { margin: 0 0 8px; font-size: 1.05em; font-weight: 600; }

.ws40-radar {
    width: 100%;
    min-height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #1b2430;
    z-index: 0;
}
.ws40-radar .leaflet-container { font: inherit; background: #1b2430; }

.ws40-radar__attr {
    margin: 6px 2px 0;
    font-size: 11px;
    line-height: 1.4;
    color: #6b7280;
}
.ws40-radar__attr a { color: #6b7280; text-decoration: none; }
.ws40-radar__attr a:hover { text-decoration: underline; }

/* Animation player (RainViewer) — bottom-centre, RainViewer-style */
.ws40-radar__bar {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: min(340px, calc(100% - 24px));
    padding: 9px 12px 8px;
    background: rgba(17, 24, 39, .82);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 12px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.ws40-radar__row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ws40-radar__btn {
    width: 30px; height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.ws40-radar__btn:hover { background: rgba(255, 255, 255, .28); }
.ws40-radar__play { background: #2563eb; }
.ws40-radar__play:hover { background: #1d4ed8; }
.ws40-radar__time {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.ws40-radar__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: transparent;
    flex: 0 0 auto;
}
.ws40-radar__bar.is-live .ws40-radar__dot {
    background: #ef4444;
    animation: ws40-radar-pulse 1.6s infinite;
}
.ws40-radar__bar.is-forecast .ws40-radar__tlabel { color: #fcd34d; }
@keyframes ws40-radar-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); }
    70%  { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.ws40-radar__timeline {
    position: relative;
    height: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.ws40-radar__timeline::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 4px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
}
.ws40-radar__tl-fill {
    position: absolute;
    left: 0; top: 50%;
    height: 4px;
    width: 0;
    transform: translateY(-50%);
    background: #60a5fa;
    border-radius: 999px;
    pointer-events: none;
}
.ws40-radar__tl-now {
    position: absolute;
    top: 50%;
    width: 2px; height: 12px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, .65);
    display: none;
    pointer-events: none;
}
.ws40-radar__tl-knob {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    pointer-events: none;
}
