/* Weather at home: widget (every page) + shared pieces of the /weather/ page. Loaded site-wide. */
.wx { --wx-text: #000; --wx-muted: #5f5f5f; --wx-accent: #1f7a1f; --wx-card: #fff; --wx-border: rgba(0,0,0,.14);
  font-family: "Montserrat", "Raleway", sans-serif; color: var(--wx-text); text-align: left; }
.wx, .wx * { box-sizing: border-box; letter-spacing: normal; text-transform: none; line-height: 1.35; }
.wx a { padding: 0; margin: 0; display: inline; font-size: inherit; font-weight: inherit; color: inherit; white-space: normal; border-radius: 0; background: none; text-decoration: none; }
.wx h4 { margin: 0 0 10px; padding: 0; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--wx-accent); text-align: left; }
.wx ul { margin: 6px 0 0; padding-left: 18px; }
.wx li { margin: 2px 0; }
.wx svg { overflow: visible; }
.wx-muted { color: var(--wx-muted); }
.wx-small { font-size: 12.5px; }
.wx-empty { display: none; }

/* Placement: left column under the "Michael's Journal" mark when it fits, otherwise the footer. */
.wx-side { display: none; position: absolute; left: 24px; width: 262px; z-index: 95; pointer-events: auto; }
#overlord .wx-side { top: calc(100% + 4px); }
.wx-side.wx-side-free { top: 92px; }
.wx-side.wx-measuring { display: block !important; visibility: hidden !important; }
html.wx-side-on .wx-side { display: block; }
html.wx-side-on .wx-foot-wrap { display: none; }
.wx-side-title { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1f7a1f; margin: 0 0 8px 2px; }
.wx-foot-wrap { max-width: 440px; margin: 28px auto 26px; }
.wx-foot-wrap .wx-foot-title { margin: 0 0 8px; text-align: center; }
body.weather-theme-page .wx-foot-wrap { display: none; }

/* Sky card */
.wx-sky { position: relative; overflow: hidden; color: #fff; border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: background 1.2s ease; }
.wx-sky > .wx-in { position: relative; }
.wx-sky-sunny { background: linear-gradient(160deg, #1f7fe0 0%, #4fa6f5 55%, #8fd0ff 100%); }
.wx-sky-partly { background: linear-gradient(160deg, #3d7fc4 0%, #6aa3d9 55%, #a9cbe9 100%); }
.wx-sky-cloudy { background: linear-gradient(160deg, #5b7391 0%, #8299b2 60%, #b0bfcf 100%); }
.wx-sky-fog { background: linear-gradient(160deg, #6f7d8a 0%, #96a3ae 60%, #c0c8cf 100%); }
.wx-sky-rain { background: linear-gradient(160deg, #47596e 0%, #6b7f96 60%, #93a5b8 100%); }
.wx-sky-storm { background: linear-gradient(160deg, #2b2f45 0%, #4a4f6e 60%, #6f7091 100%); }
.wx-sky-night { background: linear-gradient(160deg, #0b1636 0%, #1b2c5e 60%, #34497f 100%); }
.wx-sky-offline { background: linear-gradient(160deg, #5d6470 0%, #7f8794 60%, #a3aab5 100%); }
.wx-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7dffa8; margin-right: 6px; vertical-align: 1px; animation: wx-pulse 2.4s ease-in-out infinite; }
.wx-live-stale { background: #ffd27d; animation: none; }

.wx-card { padding: 16px 18px 13px; }
.wx-place { font-size: 13px; opacity: .92; display: flex; align-items: center; gap: 5px; }
.wx-top { display: flex; align-items: center; justify-content: space-between; }
.wx-card .wx-temp { font-size: 54px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.wx-card .wx-temp sup { font-size: 22px; vertical-align: top; position: relative; top: 7px; letter-spacing: 0; }
.wx-cond { font-size: 15px; font-weight: 600; margin-top: 2px; }
.wx-hl { font-size: 12.5px; opacity: .88; }
.wx-card .wx-icon { width: 86px; height: 86px; flex: none; }
.wx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.22); }
.wx-stat { font-size: 11px; opacity: .88; }
.wx-stat b { display: block; font-size: 13.5px; font-weight: 600; opacity: 1; margin-top: 1px; white-space: nowrap; }
.wx-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11.5px; opacity: .92; }
.wx-foot a { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.wx-offline-msg { font-size: 15px; font-weight: 600; margin: 14px 0 4px; }

/* Compact card for the left column */
.wx-side .wx-card { padding: 14px 15px 12px; }
.wx-side .wx-temp { font-size: 46px; }
.wx-side .wx-temp sup { font-size: 19px; top: 6px; }
.wx-side .wx-icon { width: 70px; height: 70px; }
.wx-side .wx-stats { grid-template-columns: repeat(2, 1fr); gap: 8px 10px; }
.wx-side .wx-hl { font-size: 12px; }

/* Sky + icon animation */
.wx-spin { transform-origin: 50px 50px; animation: wx-spin 40s linear infinite; }
.wx-glow { transform-origin: 50px 50px; animation: wx-glowk 4s ease-in-out infinite; }
.wx-drift { animation: wx-drift 7s ease-in-out infinite; }
.wx-drift2 { animation: wx-drift 9s ease-in-out infinite reverse; }
.wx-drop { animation: wx-fall 1.1s linear infinite; }
.wx-bolt { animation: wx-flash 5s steps(1) infinite; }
.wx-tw { animation: wx-tw 3s ease-in-out infinite; }
.wx-bgcloud { position: absolute; left: 0; opacity: .13; pointer-events: none; animation: wx-slide 60s linear infinite; }
.wx-bgcloud-a { top: 6%; width: 240px; }
.wx-bgcloud-b { top: 50%; width: 170px; animation-duration: 85s; animation-delay: -40s; }
.wx-bgrain { position: absolute; inset: 0; pointer-events: none; opacity: .25; }
.wx-bgrain i { position: absolute; top: -20px; width: 1.5px; height: 16px; background: #fff; border-radius: 2px; animation: wx-rainfall linear infinite; }
.wx-flashlayer { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: wx-skyflash 9s infinite; }
.wx-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-glowk { 0%, 100% { transform: scale(1); opacity: .35; } 50% { transform: scale(1.12); opacity: .55; } }
@keyframes wx-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes wx-fall { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes wx-flash { 0%, 86%, 92%, 100% { opacity: 1; } 88%, 94% { opacity: .15; } }
@keyframes wx-tw { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes wx-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(125,255,168,.5); } 50% { box-shadow: 0 0 0 5px rgba(125,255,168,0); } }
@keyframes wx-slide { from { transform: translateX(-30%); } to { transform: translateX(130%); } }
@keyframes wx-rainfall { to { transform: translateY(420px); } }
@keyframes wx-skyflash { 0%, 90%, 93%, 100% { opacity: 0; } 91% { opacity: .18; } 94% { opacity: .1; } }

html[data-theme="dark"] .wx { --wx-text: #e7ece8; --wx-muted: #a3b2a8; --wx-card: rgba(18,30,21,.96); --wx-border: rgba(126,168,138,.40); }
html[data-theme="dark"] .wx-side-title { color: #7fc795; }

@media (prefers-reduced-motion: reduce) {
  .wx *, .wx *::before, .wx *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 560px) {
  .wx-stats { grid-template-columns: repeat(2, 1fr); }
}
