/* Kišomer na stranici stanice (inc/stations/vm-station-precip.php) — v1.0, 2026-10-13 */
#vm-section-precip {
    --spr-bg: var(--vm-card-bg, #ffffff);
    --spr-border: var(--vm-border-color, #e2e8f0);
    --spr-text: var(--vm-text-primary, #0f172a);
    --spr-muted: var(--vm-text-secondary, #475569);
    --spr-soft: #f1f5f9;
    --spr-bar: #0284c7;
    --spr-bar-wet: #0369a1;
    --spr-accent: #2563eb;
    margin: 24px 0;
    padding: 20px;
    border: 1px solid var(--spr-border);
    border-radius: 16px;
    background: var(--spr-bg);
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05);
    color: var(--spr-text);
    scroll-margin-top: 110px;
}
[data-theme="dark"] #vm-section-precip { --spr-soft: #0f172a; --spr-bar: #38bdf8; --spr-bar-wet: #7dd3fc; --spr-accent: #60a5fa; }
#vm-section-precip .vm-spr__title { margin: 0 0 6px; font-size: 1.25rem; line-height: 1.3; color: var(--spr-text) !important; }
#vm-section-precip .vm-spr__sub { margin: 0 0 10px; font-size: 1rem; color: var(--spr-text) !important; }
#vm-section-precip .vm-spr__lead,
#vm-section-precip .vm-spr__note { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--spr-muted) !important; text-align: left !important; }
#vm-section-precip .vm-spr__note { margin: 12px 0 0; font-size: 13px; }

.vm-spr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.vm-spr-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--spr-border); border-radius: 12px; background: var(--spr-soft); }
.vm-spr-tile--main { border-left: 4px solid var(--spr-bar); }
.vm-spr-tile--live { border-left: 4px solid #16a34a; }
#vm-section-precip .vm-spr-tile__label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--spr-muted) !important; }
#vm-section-precip .vm-spr-tile__value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--spr-text) !important; white-space: nowrap; }
#vm-section-precip .vm-spr-tile__sub { font-size: 12px; color: var(--spr-muted) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vm-spr-chartwrap { margin: 20px 0 0; }
.vm-spr-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 160px auto; column-gap: 8px; }
.vm-spr-chart__scale { box-sizing: border-box; padding-top: 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
#vm-section-precip .vm-spr-chart__scale span { font-size: 11px; line-height: 1; color: var(--spr-muted) !important; font-variant-numeric: tabular-nums; }
.vm-spr-chart__bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 16px 2px 0; box-sizing: border-box; border-bottom: 1px solid var(--spr-border); background: linear-gradient(var(--spr-border), var(--spr-border)) no-repeat content-box 0 50% / 100% 1px; }
.vm-spr-bar { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.vm-spr-bar i { position: relative; display: block; width: 100%; min-height: 0; border-radius: 3px 3px 0 0; background: var(--spr-bar); }
.vm-spr-bar--wet i { background: var(--spr-bar-wet); }
.vm-spr-bar--suspect i { background: repeating-linear-gradient(45deg, var(--spr-bar) 0 3px, transparent 3px 6px); border: 1px solid var(--spr-bar); }
.vm-spr-bar--excluded i { background: repeating-linear-gradient(45deg, rgba(148,163,184,.4) 0 3px, transparent 3px 7px); border-radius: 3px; }
.vm-spr-bar--none i { height: 2px !important; background: var(--spr-border); }
#vm-section-precip .vm-spr-bar b { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); font-size: 10px; font-weight: 700; font-style: normal; color: var(--spr-text) !important; white-space: nowrap; pointer-events: none; }
.vm-spr-chart__axis { grid-column: 2; display: flex; justify-content: space-between; padding-top: 4px; }
#vm-section-precip .vm-spr-chart__axis span { font-size: 11px; color: var(--spr-muted) !important; }

.vm-spr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--spr-muted); }
.vm-spr-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.vm-spr-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; background: var(--spr-bar); }
.vm-spr-sw--suspect { background: repeating-linear-gradient(45deg, var(--spr-bar) 0 2px, transparent 2px 4px); border: 1px solid var(--spr-bar); }
.vm-spr-sw--excluded { background: repeating-linear-gradient(45deg, rgba(148,163,184,.7) 0 2px, transparent 2px 4px); border: 1px solid #94a3b8; }
.vm-spr-sw--none { height: 2px; background: var(--spr-border); }

.vm-spr-faq { margin: 12px 0 0; border: 1px solid var(--spr-border); border-radius: 12px; background: var(--spr-bg); }
#vm-section-precip .vm-spr-faq summary { cursor: pointer; padding: 11px 14px; font-weight: 700; font-size: 14px; color: var(--spr-text) !important; }
#vm-section-precip .vm-spr-faq p { margin: 0; padding: 0 14px 12px; font-size: 14px; line-height: 1.55; color: var(--spr-muted) !important; text-align: left !important; }
#vm-section-precip .vm-spr__links { margin: 14px 0 0; font-size: 14px; text-align: left !important; }
#vm-section-precip .vm-spr__links a { color: var(--spr-accent) !important; font-weight: 700; text-decoration: none; border-bottom: none !important; }
#vm-section-precip .vm-spr__links a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    #vm-section-precip { padding: 14px; border-radius: 14px; }
    .vm-spr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #vm-section-precip .vm-spr-tile__value { font-size: 18px; }
    .vm-spr-chart { grid-template-rows: 130px auto; }
    .vm-spr-chart__bars { height: 130px; gap: 2px; background-image: none; }
    #vm-section-precip .vm-spr-bar b { display: none; }
}
