/* Winter ambience for the home page, see winter.js. Everything shows only while <html> has the class "winter-on".
   The theme sets "position" on many elements, therefore the !important rules. */

#winter-tint, #winter-frost, #winter-snow {
	display: none;
	position: fixed !important;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;   /* the page stays clickable */
}

html.winter-on #winter-tint, html.winter-on #winter-frost, html.winter-on #winter-snow { display: block; }

#winter-tint {
	z-index: 900;
	background:
		linear-gradient(180deg, rgba(90,160,235,.16) 0%, rgba(90,160,235,.03) 35%, rgba(90,160,235,0) 65%, rgba(170,210,255,.10) 100%);
	box-shadow: inset 0 0 120px rgba(150,205,255,.16);
}

#winter-frost { z-index: 901; }
#winter-snow  { z-index: 902; }

/* snow lying on top of the news and the side boxes */
.winter-cap {
	display: none;
	position: absolute !important;
	left: -2px;
	right: -2px;
	top: -8px;
	height: 22px;
	z-index: 20;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 22' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23b9d8f5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 8C10 2 24 3 36 5C52 0 70 1 84 5C100 3 112 2 128 5C146 0 166 2 180 5C196 3 214 1 230 5C248 2 262 0 280 5C296 3 314 2 330 5C348 0 368 1 382 5C390 3 396 4 400 7V10C392 9 388 11 384 13C380 18 374 18 371 12C362 8 350 10 340 11C334 12 332 21 326 20C321 19 323 11 314 10C300 8 286 14 274 11C268 10 266 16 260 15C255 14 256 9 246 9C232 8 220 12 208 11C202 11 201 19 195 18C190 17 192 10 182 9C168 8 158 13 146 11C140 10 138 15 133 14C128 13 129 9 118 9C104 8 92 12 80 11C74 11 73 22 66 21C60 20 63 11 52 10C40 8 30 13 20 11C14 10 12 16 7 15C2 14 3 11 0 11Z'/%3E%3C/svg%3E") left top / 100% 100% no-repeat;
	filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)) drop-shadow(0 0 6px rgba(170,215,255,.45));
}

html.winter-on .winter-cap { display: block; }
html.winter-on section.sidebox { overflow: visible; }

/* the news boxes cut off what sticks out, so the snow lies just inside their top edge */
article.news-article > .winter-cap { top: -1px; left: 0; right: 0; height: 18px; }

/* on / off button */
#winter-toggle {
	position: fixed !important;
	left: 16px;
	bottom: 16px;
	width: 44px;
	height: 44px;
	padding: 0;
	z-index: 1030;
	border-radius: 50%;
	border: 1px solid #5d6f85;
	background: rgba(10,16,26,.85);
	color: #7f93aa;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0,0,0,.6);
	transition: transform .25s ease, box-shadow .25s ease, color .25s ease;
}

#winter-toggle:hover { transform: scale(1.1) rotate(30deg); }
#winter-toggle:focus-visible { outline: 2px solid #d6ecff; outline-offset: 2px; }

html.winter-on #winter-toggle {
	color: #eaf6ff;
	border-color: #a9d4ff;
	box-shadow: 0 0 14px rgba(150,205,255,.75), 0 3px 12px rgba(0,0,0,.6);
}
