/* Scoped reset: the global [data-slot] { display: none } rule (from the product
   page slot system) would hide the widget's temp/label/claim/link because
   Claude Design reused data-slot here. Restore normal display inside #liveWidget. */
#liveWidget [data-slot] {
	display: revert !important;
}
#liveWidget [data-slot="temp"] {
	display: inline-flex !important;
	align-items: baseline;
}
#liveWidget [data-slot="claim"] {
	display: block !important;
}
#liveWidget [data-slot="link"] {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
}
#liveWidget [data-slot="label"] {
	display: inline !important;
}

.ww {
	--ww-pad: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	min-height: 144px;
	padding: var(--ww-pad);
	background: var(--cream-warm);
	border: 1px solid var(--line);
	color: var(--charcoal);
	position: relative;
	transition:
		border-color 0.22s ease,
		background-color 0.22s ease,
		transform 0.22s ease;
}

.ww:hover {
	border-color: var(--line-strong);
	background: var(--cream-deep);
}

/* row 1: icon + temp */
.ww__head {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
}
.ww__icon {
	width: 32px;
	height: 32px;
	color: var(--charcoal);
	flex: 0 0 auto;
}
.ww__temp {
	font:
		700 28px / 1 "Inter",
		sans-serif;
	letter-spacing: -0.015em;
	color: var(--charcoal);
	font-variant-numeric: tabular-nums;
}
.ww__temp .u {
	font-size: 18px;
	font-weight: 500;
	margin-left: 1px;
	opacity: 0.55;
}

/* row 2: condition label · city */
.ww__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font:
		500 10.5px / 1 "JetBrains Mono",
		monospace;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--charcoal);
}
.ww__meta .dash {
	color: var(--red);
	opacity: 0.55;
	font-weight: 600;
}
.ww__meta .city {
	color: var(--ink-grey);
	letter-spacing: 0.12em;
}

/* row 3: claim — use explicit charcoal-ish for body + red for accent child
   so it stays readable regardless of host site's CSS vars */
.ww__claim {
	font:
		italic 500 13.5px / 1.45 "Fraunces",
		serif;
	/* v12.5-phase8: bumped from #3a2d26 → #201614 for max contrast.
	   User reported "kinnitus kuni 28 m/s." rendering as unreadable on hero photo bg. */
	color: #201614 !important;
	margin: 2px 0 auto;
	text-wrap: pretty;
	max-width: 100%;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ww__claim u {
	color: #c0392b !important;
	text-decoration: underline;
	text-decoration-color: rgba(192, 57, 43, 0.45);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	font-weight: 600;
}

/* row 4: link */
.ww__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font:
		500 12px / 1 "Inter",
		sans-serif;
	color: var(--red);
	border-top: 1px solid var(--line);
	padding-top: 10px;
	margin-top: 2px;
	transition: color 0.15s ease;
}
.ww__link:hover {
	color: var(--red-dark);
}
.ww__link .arr {
	display: inline-block;
	transition: transform 0.22s ease;
}
.ww__link:hover .arr {
	transform: translateX(3px);
}

/* =========================================================
   ICON ANIMATIONS — single-color line art (stroke currentColor)
   ========================================================= */

/* reduce all animation if user prefers */
@media (prefers-reduced-motion: reduce) {
	.ww__icon * {
		animation: none !important;
		transform: none !important;
	}
}

/* ---- Snow: flakes staggered fade ---- */
.ico-snow .flake {
	animation: snow-flake 2.4s ease-in-out infinite;
	transform-origin: center;
	transform-box: fill-box;
}
.ico-snow .flake-2 {
	animation-delay: 0.4s;
}
.ico-snow .flake-3 {
	animation-delay: 0.8s;
}
@keyframes snow-flake {
	0%,
	100% {
		opacity: 0.25;
		transform: translateY(-1px);
	}
	50% {
		opacity: 1;
		transform: translateY(1px);
	}
}

/* ---- Wind: lines drift x ---- */
.ico-wind .line-a {
	animation: wind-a 2.4s ease-in-out infinite;
}
.ico-wind .line-b {
	animation: wind-b 2.4s ease-in-out infinite 0.15s;
}
.ico-wind .line-c {
	animation: wind-c 2.4s ease-in-out infinite 0.3s;
}
@keyframes wind-a {
	0%,
	100% {
		transform: translateX(-1px);
		opacity: 0.85;
	}
	50% {
		transform: translateX(2px);
		opacity: 1;
	}
}
@keyframes wind-b {
	0%,
	100% {
		transform: translateX(0);
		opacity: 0.7;
	}
	50% {
		transform: translateX(3px);
		opacity: 1;
	}
}
@keyframes wind-c {
	0%,
	100% {
		transform: translateX(-1px);
		opacity: 0.6;
	}
	50% {
		transform: translateX(2px);
		opacity: 0.95;
	}
}

/* ---- Rain: drops fall ---- */
.ico-rain .drop {
	animation: rain-drop 1.4s ease-in infinite;
	transform-origin: top;
	transform-box: fill-box;
	opacity: 0;
}
.ico-rain .drop-2 {
	animation-delay: 0.3s;
}
.ico-rain .drop-3 {
	animation-delay: 0.6s;
}
@keyframes rain-drop {
	0% {
		transform: translateY(-3px);
		opacity: 0;
	}
	20% {
		opacity: 1;
	}
	80% {
		opacity: 0.8;
	}
	100% {
		transform: translateY(5px);
		opacity: 0;
	}
}

/* ---- Sun: slow rotate ---- */
.ico-sun .rays {
	animation: sun-rotate 60s linear infinite;
	transform-origin: 12px 12px;
	transform-box: fill-box;
}
@keyframes sun-rotate {
	to {
		transform: rotate(360deg);
	}
}

/* ---- Frost: subtle crystal twinkle (not fully static per brief but minimal) ---- */
.ico-frost .crystal {
	animation: frost-tw 3.6s ease-in-out infinite;
	transform-origin: center;
	transform-box: fill-box;
}
@keyframes frost-tw {
	0%,
	100% {
		opacity: 0.5;
	}
	50% {
		opacity: 1;
	}
}

/* ---- Mist: bands opacity pulse ---- */
.ico-mist .band-a {
	animation: mist-a 3s ease-in-out infinite;
}
.ico-mist .band-b {
	animation: mist-b 3s ease-in-out infinite 0.4s;
}
.ico-mist .band-c {
	animation: mist-c 3s ease-in-out infinite 0.8s;
}
@keyframes mist-a {
	0%,
	100% {
		opacity: 0.45;
	}
	50% {
		opacity: 1;
	}
}
@keyframes mist-b {
	0%,
	100% {
		opacity: 0.6;
	}
	50% {
		opacity: 0.9;
	}
}
@keyframes mist-c {
	0%,
	100% {
		opacity: 0.35;
	}
	50% {
		opacity: 0.85;
	}
}

/* =========================================================
   HERO CONTEXT — real homepage-ish scene showing widget in place
   ========================================================= */

.hero-demo {
	position: relative;
	height: 560px;
	padding: 56px 48px;
	background:
		linear-gradient(
			135deg,
			rgba(32, 22, 20, 0.55) 0%,
			rgba(32, 22, 20, 0.3) 60%,
			rgba(61, 90, 63, 0.4) 100%
		),
		radial-gradient(ellipse at 30% 20%, #3a3a3a 0%, #201614 60%, #14100e 100%);
	color: #fdfbf7;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero-demo::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.03) 0 1px,
		transparent 1px 80px
	);
	pointer-events: none;
}

.hero-demo__eyebrow {
	font:
		500 11px / 1 "JetBrains Mono",
		monospace;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--red);
	margin: 0 0 16px;
}
.hero-demo__eyebrow::before {
	content: "— ";
	color: #fdfbf7;
	opacity: 0.4;
}

.hero-demo__title {
	font:
		700 clamp(44px, 5.5vw, 84px) / 1.02 "Inter",
		sans-serif;
	letter-spacing: -0.025em;
	margin: 0 0 20px;
	max-width: 720px;
	text-wrap: balance;
}

.hero-demo__sub {
	font:
		400 17px / 1.55 "Inter",
		sans-serif;
	color: rgba(253, 251, 247, 0.78);
	max-width: 56ch;
	margin: 0;
}

/* dark-hero variant of widget */
.hero-demo .ww {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 260px;
	background: rgba(250, 247, 242, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.15);
	backdrop-filter: saturate(1.1);
	box-shadow:
		0 20px 60px -20px rgba(0, 0, 0, 0.4),
		0 2px 0 rgba(255, 255, 255, 0.04);
}

/* v17ab — raised breakpoint from 720px → 1023px. Below 1023px the homepage
   hero stats run wider/stacked and the absolute-positioned widget at top:24px
   right:24px overlapped them. Static/inline placement keeps the weather card
   visible without covering "27 000+" + "8.1 mln" stat blocks. */
@media (max-width: 1023px) {
	.hero-demo {
		height: auto;
		padding: 40px 24px 24px;
	}
	.hero-demo .ww {
		position: static;
		width: 100%;
		margin-top: 28px;
		background: var(--cream-warm);
		box-shadow: none;
		border-color: var(--line);
	}
}

/* =========================================================
   DEV CONTROLS (force state via ?weather=snow etc.)
   ========================================================= */

.dev-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 8px;
	padding: 14px 16px;
	background: #fdfbf7;
	border: 1px solid var(--line);
	align-items: center;
}
.dev-bar__label {
	font:
		500 10.5px / 1 "JetBrains Mono",
		monospace;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-grey);
	margin-right: 6px;
}
.dev-bar button {
	font:
		500 11px / 1 "JetBrains Mono",
		monospace;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 8px 12px;
	border: 1px solid var(--line);
	background: var(--cream);
	color: var(--charcoal);
	transition: all 0.15s;
}
.dev-bar button:hover {
	border-color: var(--charcoal);
}
.dev-bar button.is-active {
	background: var(--charcoal);
	color: var(--cream);
	border-color: var(--charcoal);
}
.dev-bar .spacer {
	flex: 1;
	min-width: 12px;
}
.dev-bar .state-out {
	font:
		500 11px / 1 "JetBrains Mono",
		monospace;
	color: var(--ink-grey);
	letter-spacing: 0.14em;
}
.dev-bar .state-out b {
	color: var(--red);
	font-weight: 600;
}

/* =========================================================
   NOTES (tiny integration hint blocks)
   ========================================================= */
