/* Новогоднее оформление autobezzabot.ru (mu-plugin abz-novyj-god). Всё работает только при html.abz-ny */

/* — снег на краю тёмной полосы меню и подвала (свисает «шапкой») — */
.abz-ny .new-header__bottom, .abz-ny .footer { position: relative; }
.abz-ny .new-header__bottom::before, .abz-ny .footer::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; z-index: 5; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M0 0h120v5c-6 0-8 6-15 6s-9-5-16-5-8 8-16 8-9-6-17-6-7 4-14 4S33 5 26 5 17 11 10 11 3 6 0 6z' fill='%23fff'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 14px;
	filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}

/* — шапочка на логотипе — */
.abz-ny .logo_new-header::before {
	content: ""; position: absolute; z-index: 2; pointer-events: none;
	width: 40px; height: 34px; left: -14px; top: -15px; transform: rotate(-24deg);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40'%3E%3Cpath d='M6 30C10 14 20 4 32 4c6 0 9 4 9 9-6-3-10 0-12 6l-3 11z' fill='%23d62a3a'/%3E%3Cpath d='M6 30C10 14 20 4 32 4c-8 6-13 14-16 26z' fill='%23a51625' opacity='.55'/%3E%3Crect x='3' y='28' width='27' height='8' rx='4' fill='%23fff'/%3E%3Ccircle cx='42' cy='15' r='5' fill='%23fff'/%3E%3C/svg%3E") no-repeat center / contain;
	filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}

/* — гирлянда шариков под шапкой — */
.abz-ny-garland { position: relative; height: 0; z-index: 60; pointer-events: none; }
.abz-ny-g { position: absolute; top: 0; }
.abz-ny-g--l { left: 0; } .abz-ny-g--r { right: 0; }
.abz-ny-b { position: absolute; top: 0; transform-origin: 50% 0; animation: abzNySwing 4.5s ease-in-out infinite; }
.abz-ny-b i { display: block; width: 1px; margin: 0 auto; background: linear-gradient(#d8c27a, rgba(216,194,122,.6)); }
.abz-ny-b svg { display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
@keyframes abzNySwing { 0%,100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }
html:not(.abz-ny) .abz-ny-garland, html:not(.abz-ny) .abz-ny-floor, html:not(.abz-ny) .abz-ny-snow { display: none !important; }

/* — шарики «лежат» на подвале — */
.abz-ny-floor { position: absolute; left: 60%; top: -26px; height: 30px; z-index: 6; pointer-events: none; display: flex; align-items: flex-end; }
.abz-ny-floor svg { display: block; margin-left: -6px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }

/* — снегопад — */
.abz-ny-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9990; }

/* — живая кнопка «Новогодний сертификат» — */
.abz-ny .abz-cert-pill { position: relative; overflow: hidden; animation: abzNyJingle 5s ease-in-out infinite, abzNyGlow 2.5s ease-in-out infinite alternate; }
.abz-ny .abz-cert-pill::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
	animation: abzNyShine 3.2s ease-in-out infinite;
}
@keyframes abzNyShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes abzNyJingle { 0%, 84%, 100% { transform: rotate(0); } 87% { transform: rotate(-4deg) scale(1.05); } 90% { transform: rotate(4deg) scale(1.05); } 93% { transform: rotate(-3deg); } 96% { transform: rotate(2deg); } }
@keyframes abzNyGlow { from { box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 6px rgba(226,180,245,.35); } to { box-shadow: 0 0 0 1px rgba(255,255,255,.45), 0 0 16px rgba(226,180,245,.85); } }

/* — переключатель для посетителя (снежинка в фиолетовой полосе) — */
.abz-ny-toggle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); cursor: pointer; opacity: .55; transition: opacity .2s, background .2s; }
.abz-ny-toggle:hover { opacity: 1; background: rgba(255,255,255,.22); }
.abz-ny .abz-ny-toggle { opacity: .9; }
.abz-ny-toggle svg { width: 16px; height: 16px; }

@media (max-width: 800px) {
	.abz-ny .logo_new-header::before { width: 30px; height: 26px; left: -10px; top: -11px; }
	.abz-ny-g--r { display: none; }
	.abz-ny-floor { left: 50%; transform: translateX(-50%) scale(.8); transform-origin: center bottom; }
	.abz-ny-toggle { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.abz-ny .abz-cert-pill, .abz-ny .abz-cert-pill::after, .abz-ny-b { animation: none !important; }
	.abz-ny-snow { display: none !important; }
}
