/* ── WD Radar Map ── */

.wd-radar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wd-radar-header .wd-section-title {
    margin-bottom: 0;
}

.wd-radar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wd-radar-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1;
}

.wd-radar-live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: wd-radar-pulse 1.5s ease-in-out infinite;
}

@keyframes wd-radar-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.wd-radar-updated {
    font-size: 12px;
    color: var(--wd-text-faint, #777);
    font-variant-numeric: tabular-nums;
}

.wd-radar-wrap {
    position: relative;
    border-radius: var(--wd-radius-md);
    overflow: hidden;
}

#wd-radar-map {
    width: 100%;
    height: 400px;
    min-height: 300px;
    z-index: 0;
}

#wd-radar-map .leaflet-tile-pane .leaflet-layer {
    transition: opacity 0.4s ease;
}

.wd-radar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 0;
}

.wd-radar-controls button {
    background: var(--wd-bg-card, #1e1e1e);
    border: 1px solid var(--wd-border, #444);
    color: var(--wd-text-mid, #ccc);
    border-radius: var(--wd-radius-sm, 4px);
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.wd-radar-controls button:hover {
    background: var(--wd-bg-hover, rgba(255,255,255,0.08));
}

#wd-radar-scrubber {
    flex: 1;
    cursor: pointer;
    accent-color: var(--wd-green, #4fc3f7);
    height: 6px;
}

#wd-radar-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--wd-text, #e0e0e0);
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.wd-radar-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wd-font-size-sm, 13px);
    color: var(--wd-text-mid, #aaa);
    pointer-events: none;
    z-index: 500;
}

.wd-radar-credit {
    font-size: 11px;
    color: var(--wd-text-faint, #777);
    text-align: right;
    padding-top: 6px;
}

.wd-radar-credit a {
    color: var(--wd-text-mid, #aaa);
    text-decoration: none;
}

.wd-radar-credit a:hover {
    text-decoration: underline;
}

/* ── Rainfall intensity key ── */

.wd-radar-key {
    padding-top: 10px;
}

.wd-radar-key__bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(
        to right,
        #88bbee 0%,
        #88bbee 20%,
        #f0e050 35%,
        #f0e050 55%,
        #e04020 70%,
        #e04020 100%
    );
}

.wd-radar-key__labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--wd-text-faint, #777);
    padding-top: 3px;
}

@media (max-width: 480px) {
    #wd-radar-map {
        height: 26vh;
        min-height: 220px;
    }
}
