/* weather.tuti.lt — components: layout, cards, hero, hourly, days, AQ/UV, radar */

/* ---------- layout ---------- */
.wrap{max-width:1080px;margin:0 auto;padding:18px 16px 8px}
.locrow{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:4px 0 10px;flex-wrap:wrap}
h1{margin:0;font-size:26px;letter-spacing:-.3px}
#locMeta{margin-top:2px}

/* ---------- cards ---------- */
.card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:18px 20px;margin-bottom:16px}
.card h2{margin:0 0 12px;font-size:17px}
.cardHead{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.cardHead h2{margin:0}

/* ---------- hero ---------- */
.hero{padding:22px 24px}
.heroMain{display:flex;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.heroTempCol{display:flex;align-items:center;gap:10px}
.bigTemp{font-size:74px;font-weight:300;line-height:1;letter-spacing:-2px}
.bigIcon svg{width:92px;height:92px;display:block}
.bigIcon img{width:92px;height:92px;display:block;background:#d7e9fb;border-radius:50%}
.heroCond{margin-left:22px}
.cond{font-size:20px;font-weight:600}
.gustLine{margin-top:2px}
.facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px 18px;border-top:1px solid var(--line);padding-top:14px}
.fact .fl{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted)}
.fact .fv{font-size:15px;font-weight:600;margin-top:2px;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
/* wind direction arrows (OSS Weather, MIT) */
.wArrow{display:inline-flex;width:13px;height:13px;flex:none;vertical-align:-2px}
.wArrow svg{width:100%;height:100%}
.gustLine .wArrow{width:12px;height:12px}

/* ---------- hourly ---------- */
.hstrip{display:flex;overflow-x:auto;gap:2px;padding:4px 2px 8px;scrollbar-width:thin}
.hstrip::-webkit-scrollbar{height:8px}
.hstrip::-webkit-scrollbar-thumb{background:#cfe0f2;border-radius:99px}
.hchip{flex:none;width:66px;text-align:center;padding:8px 4px;border-radius:10px}
.hchip:hover{background:#f2f7fd}
.hchip .ht{font-size:12px;color:var(--muted)}
.hchip .hicon svg{width:30px;height:30px;margin:4px 0 2px}
.hchip .hicon img{width:30px;height:30px;margin:4px 0 2px}
.hchip .hval{font-weight:600;font-size:15px}
.hchip .hpp{font-size:11.5px;color:#1a73e8;height:16px}
.hchip .hwind{font-size:11px;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:3px}
.hchip .hwind .wArrow{width:9px;height:9px}
.hday{flex:none;display:flex;align-items:center;font-size:12px;font-weight:700;color:#174ea6;background:#e8f0fe;border-radius:999px;padding:3px 10px;margin:4px 4px;height:24px;align-self:center}
/* reserved heights so loading data never shifts the layout (CLS) */
.hstrip{min-height:118px}
#facts{min-height:96px}
/* chart (interaction ported from weather-chart-card, MIT) */
.chart{margin-top:8px;position:relative;aspect-ratio:960/236;cursor:crosshair}
.chart svg{display:block;width:100%;height:auto}
.chartTip{position:absolute;top:6px;z-index:5;transform:translateX(-50%);background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 6px 20px rgba(16,42,67,.16);padding:8px 12px;font-size:12px;line-height:1.55;pointer-events:none;white-space:nowrap}
.ctTitle{font-weight:700;margin-bottom:3px}
.ctRow{display:flex;align-items:center;gap:6px;color:#3c4a5c}
.ctRow .ctK{color:var(--muted);width:40px;flex:none}
.ctRow .wArrow{width:10px;height:10px}
/* guide + FAQ */
.guide h3{font-size:16px;margin:18px 0 6px}
.guide p{font-size:14.5px;line-height:1.7;color:#3c4a5c;margin:0 0 10px}

/* ---------- forecast days ---------- */
.day{border-top:1px solid var(--line)}
.day:first-child{border-top:0}
.dayHead{display:grid;grid-template-columns:118px 40px 1fr auto 18px;gap:10px;align-items:center;padding:11px 6px;cursor:pointer;user-select:none}
.dayHead:hover{background:#f6faff;border-radius:10px}
.dayName{font-weight:600;line-height:1.2}
.dayDate{font-weight:400;color:var(--muted);font-size:12.5px;display:block}
.dayIcon svg{width:34px;height:34px;display:block}
.dayIcon img{width:34px;height:34px;display:block;background:#d7e9fb;border-radius:50%}
.dayPhrase{color:#33475b}
.dayTemps{text-align:right;white-space:nowrap}
.tmax{font-weight:700}
.tmin{color:var(--muted);margin-left:6px}
.chev{color:var(--muted);transition:transform .18s}
.day.open .chev{transform:rotate(180deg)}
.dayDetail{padding:2px 8px 14px}
.bbc{background:#f4f9ff;border:1px solid #e1edfa;border-radius:12px;padding:12px 16px;margin:0 0 10px;font-size:14.5px;line-height:1.6}
.dhstrip{display:flex;overflow-x:auto;gap:2px}

/* ---------- AQ + UV ---------- */
.row2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:640px){ .row2{grid-template-columns:1fr} }
.row2 .card{margin-bottom:16px}
.aqTop{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.aqBadge{display:inline-flex;align-items:center;gap:10px;border-radius:999px;padding:8px 18px;font-weight:700;font-size:15px;color:#0b3a42}
.aqScore{font-size:28px;font-weight:700;line-height:1}
.pollut{display:flex;justify-content:space-between;border-top:1px dashed var(--line);padding:7px 2px;font-size:14px}
.uvTop{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:6px}
.uvBadge{display:inline-flex;align-items:center;gap:10px;border-radius:999px;padding:8px 18px;font-weight:700;font-size:15px;color:#fff}
.uvScore{font-size:28px;font-weight:700;line-height:1}
.uvbar{height:10px;border-radius:999px;background:linear-gradient(90deg,#43a047,#f9a825 42%,#ef6c00 58%,#c62828 83%,#8e24aa);position:relative;margin:16px 0 6px;max-width:420px}
.uvmark{position:absolute;top:-5px;width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid #202124;transform:translateX(-50%)}

/* ---------- radar ---------- */
#map{height:420px;border-radius:12px;border:1px solid var(--line);z-index:1}
.radarbar{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
/* weather-radar-card toolbar (MIT) — icons, scrubber timeline, speed, colour bar */
.cbar{display:flex;align-items:center;gap:10px;margin-top:10px}
.cbar img{display:block;height:8px;width:240px;max-width:60vw;border-radius:4px}
.rbtn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;border:1px solid var(--line);background:#fff;border-radius:8px;cursor:pointer;padding:0}
.rbtn:hover{background:#f6faff}
.rbtn img{width:20px;height:20px;display:block}
.rbtn.wide{width:44px;font-size:12px;font-weight:700;color:#174ea6}
.scrub{flex:1 1 140px;min-width:140px;accent-color:#1a73e8;height:8px;cursor:pointer}
/* briefsky-style unit switcher (MIT) */
.unitbar{display:flex;align-items:center;gap:8px;flex:none}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
.segbtn{border:0;background:transparent;padding:8px 12px;font-size:13px;font-weight:700;color:#5f6b7a;cursor:pointer}
.segbtn[aria-pressed="true"]{background:#1a73e8;color:#fff}
.segbtn:not([aria-pressed="true"]):hover{background:#f6faff;color:#174ea6}
.windsel,#windUnit{border:1px solid var(--line);border-radius:9px;background:#fff;padding:8px 10px;font-size:13px;font-weight:600;color:#2b3a4d;cursor:pointer}
/* wind chart toggle */
.linkbtn{border:0;background:none;color:#1a73e8;font-weight:600;font-size:13px;cursor:pointer;padding:0}
.linkbtn:hover{text-decoration:underline}
/* map layer picker */
#radar{position:relative}
.layHead{display:flex;justify-content:space-between;align-items:center;font-size:14px}
.layClose{border:0;background:#f4f7fb;border-radius:8px;width:26px;height:26px;cursor:pointer;color:#5f6b7a}
#layerPanel{position:absolute;right:12px;top:12px;z-index:600;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(15,40,80,.18);padding:12px 14px;width:280px;max-height:340px;overflow:auto}
#layerPanel h4{margin:10px 0 4px;font-size:11px;color:#5f6b7a;text-transform:uppercase;letter-spacing:.05em}
.layItem{display:block;width:100%;text-align:left;border:0;background:#f4f7fb;border-radius:8px;padding:6px 10px;margin:3px 0;font-size:13px;color:#2b3a4d;cursor:pointer}
.layItem:hover{background:#e8f1fd}
.layItem.on{background:#1a73e8;color:#fff;font-weight:700}
.layNote{font-size:11px;color:#8a95a5;margin-top:10px;line-height:1.55}
.layTF{margin:6px 0;width:100%;border:1px solid var(--line);border-radius:8px;padding:6px 8px;font-size:13px}
.layerLegend{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap;font-size:13px;color:#3c4a5c}
.layerLegend .lgbar{height:10px;border-radius:5px;min-width:170px;max-width:60vw;flex:none}
@media (max-width:640px){ #layerPanel{left:12px;width:auto;max-height:300px} }
@media (max-width:640px){ .unitbar{width:100%} .unitbar .seg{flex:1} .segbtn{flex:1} #windUnit{flex:1;min-width:96px} }
.frameTime{min-width:210px}
.opchk{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);cursor:pointer;user-select:none}
.opchk input{accent-color:var(--accent);width:15px;height:15px;cursor:pointer}
/* wind particles never swallow map interactions */
.velocity-overlay{pointer-events:none}
.op{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.op input{accent-color:var(--accent)}
.mapFallback{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted);text-align:center;padding:20px}

@media(max-width:640px){
  h1{font-size:22px}
  .hero{padding:18px}
  .bigTemp{font-size:56px}
  .bigIcon svg{width:70px;height:70px}
  .bigIcon img{width:70px;height:70px}
  .heroCond{margin-left:14px}
  /* mobile: exactly two fact tiles per row — rain chance next to max gust, wind next to humidity,
     pressure next to cloud cover, dew point next to UV index, sunrise next to sunset */
  .facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
  #facts{min-height:240px}
  .dayHead{grid-template-columns:88px 34px 1fr auto 14px;font-size:13.5px;gap:7px}
  #map{height:320px}
  .opchk,.op{margin-left:0}
}

/* ---------- IP-location pin on the radar map ---------- */
.ipPin{position:relative;width:18px;height:18px}
.ipPin::before{content:'';position:absolute;inset:0;border-radius:50%;background:rgba(26,115,232,.45);animation:ipPulse 2.2s ease-out infinite}
.ipPin::after{content:'';position:absolute;inset:3px;border-radius:50%;background:#1a73e8;border:2px solid #fff;box-shadow:0 1px 4px rgba(16,42,67,.4)}
@keyframes ipPulse{0%{transform:scale(.55);opacity:.9}70%,100%{transform:scale(2);opacity:0}}
.ipTip{background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 2px 8px rgba(16,42,67,.18);color:#2b3a4d;font-size:11.5px;font-weight:600;padding:3px 8px}
@media (prefers-reduced-motion:reduce){ .ipPin::before{animation:none;opacity:.35} }

/* ---------- blog teasers (index "From the weather blog" card) ---------- */
.blogTeasers{list-style:none;padding:0;margin:0}
.blogTeasers li{border-bottom:1px solid var(--line);padding:9px 0;font-size:14.5px}
.blogTeasers li:last-child{border-bottom:0}
.blogTeasers a{font-weight:600}

/* ---------- share bar ---------- */
.sharebar{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:20px 0 10px}
.shLabel{margin-right:3px}
.shbtn{display:inline-flex;align-items:center;background:#fff;border:1px solid #dadce0;border-radius:999px;padding:6px 13px;font-size:12.5px;font-weight:600;color:var(--ink);cursor:pointer;text-decoration:none;box-shadow:0 1px 2px rgba(16,42,67,.06)}
a.shbtn:hover{background:#f4f8fd;border-color:#bfcfe2;text-decoration:none;color:var(--accent)}
button.shbtn:hover{background:#f4f8fd;border-color:#bfcfe2;color:var(--accent)}
.shbtn.ok{border-color:#34a853;color:#188038}

/* ---------- static SEO content cards ---------- */
#about-this-site p,#data-sources p,#faq p,.townIntro p{margin:10px 0;max-width:78ch}
.featList{list-style:none;padding:0;margin:10px 0}
.featList li{border-bottom:1px solid var(--line);padding:8px 0;font-size:14.5px}
.featList li:last-child{border-bottom:0}
.featList b{color:var(--ink)}
#faq h3{font-size:15.5px;margin:16px 0 4px}
.faqNote{margin-top:14px}

/* ---------- breadcrumbs & town/hub page static content ---------- */
.crumbT{font-size:12.5px;color:var(--muted);margin:6px 0 2px}
.crumbT a{color:var(--accent)}
.townLede{margin:10px 0;max-width:78ch}
.pageHead{max-width:1080px}
.pageHead h1{margin:6px 0 8px}
.ledeT{color:var(--muted);max-width:78ch;margin:0 0 18px}
.hubList{list-style:none;padding:0;margin:0}
.hubList li{border-bottom:1px solid var(--line);padding:6px 0;font-size:14.5px}
.hubList li:last-child{border-bottom:0}

.moreinfo{margin:14px 0 4px;color:var(--muted);font-size:14px}
.moreinfo b{color:var(--ink)}
