/* Зимний режим okna33km: класс ok-winter ставит js/winter.js только с 1 декабря по 15 января */

/* Баннер: снежинки вместо листиков */
body.ok-winter .banner__leaves { background-image: url("images/winter/snowflakes.svg"); }

/* Баннер: снегопад */
body.ok-winter .banner { position: relative; }
body.ok-winter .ok-snow-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* Логотип: снежная шапка и снежинка вместо листика */
body.ok-winter #header .logo img.ok-logo-snow { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.logo img.ok-logo-snow { display: none; }
body.ok-winter #header .logo img.ok-logo-leaf { transform-origin: 61.2% 27%; animation: okFlakeIn 1s cubic-bezier(.2,.9,.3,1.2) .3s both, okFlakeSpin 7s ease-in-out 1.5s infinite; }
body.ok-winter #header .logo a:hover img.ok-logo-leaf { animation: okFlakeSpin 2s ease-in-out infinite; }
@keyframes okFlakeIn { from { transform: scale(0) rotate(-120deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes okFlakeSpin { 0%, 60%, 100% { transform: rotate(0); } 30% { transform: rotate(60deg); } }

/* Шапка: тонкая полоска снега по нижнему краю */
body.ok-winter #header::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; pointer-events: none; z-index: 2;
	background: radial-gradient(circle at 10px -2px, #fff 9px, transparent 9.5px) 0 0 / 20px 8px repeat-x,
	            radial-gradient(circle at 27px -4px, #fff 8px, transparent 8.5px) 0 0 / 34px 8px repeat-x;
	filter: drop-shadow(0 2px 1.5px rgba(40, 60, 80, .18));
}

/* Карточки категорий: снежинка на ценнике */
body.ok-winter .okmain-price { padding-left: 28px; }
body.ok-winter .okmain-price::before { content: ""; position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: url("images/winter/flake-w.svg") center / contain no-repeat; }

/* Снежные шапки на кнопках (форма шапки рисуется в winter.js под каждую кнопку) */
.ok-snowwrap { position: relative; display: inline-block; }
svg.ok-snowcap { position: absolute; left: 0; pointer-events: none; z-index: 3; overflow: visible; filter: drop-shadow(0 1.5px 1.2px rgba(25, 45, 70, .28)); }

/* Гирлянда на карточках */
.ok-garland { position: absolute; left: 22px; right: 22px; top: -4px; height: 30px; pointer-events: none; z-index: 4; }
.ok-garland i { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: url("images/winter/garland.svg") 0 0 / 320px 30px repeat-x; }
.ok-garland i.a { background-image: url("images/winter/garland-glow-a.svg"); animation: okTwinkle 3.2s ease-in-out infinite; }
.ok-garland i.b { background-image: url("images/winter/garland-glow-b.svg"); animation: okTwinkle 3.2s ease-in-out 1.6s infinite; }
@keyframes okTwinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	body.ok-winter #header .logo img.ok-logo-leaf { animation: none !important; }
	body.ok-winter .ok-snow-canvas { display: none; }
	.ok-garland i.a, .ok-garland i.b { animation: none; opacity: .6; }
}
