/* «Атом-мячик» (пілот 2026-11-20): атом з логотипу стрибає з шапки й котиться по верхніх краях секцій до футера.
   JS assets/js/wa-ball.js, підключення — functions.php (лише сайт-візитка, вмикається ?ball=1). Десктоп ≥1024, без prefers-reduced-motion. */
.wa-ball {
	position: absolute;
	left: 0;
	top: 0;
	width: 30px;
	height: 30px;
	z-index: 800; /* під липкою шапкою (1000) і меню розділів (900), над контентом */
	pointer-events: auto; /* пасхалка 2026-11-21: тап по мячику */
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	will-change: transform;
	contain: layout style;
}
.wa-ball.is-start { z-index: 1001; } /* поки вистрибує з шапки — над нею */
.wa-ball__body {
	display: block;
	width: 100%;
	height: 100%;
	transform-origin: 50% 100%;
	will-change: transform;
}
.wa-ball__spin {
	display: block;
	width: 100%;
	height: 100%;
	background: url("/wp-content/themes/webatom/assets/img/webatom-logo-img.png") no-repeat center / cover;
	will-change: transform;
}

/* підстрибування атома в шапці й оберт атома у футері — інлайн-переходи властивостей translate / rotate / scale з JS
   (окремі від transform, тому не перезапускають безкінечне обертання логотипа) */

/* ---- Пасхалка «спіймай атом» (2026-11-21): 3 тапи → промокод ATOM5, JS wa-ball.js ---- */
.wa-ball::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; } /* більша зона тапу (~50px) */
.wa-balltip {
	position: absolute;
	z-index: 801;
	transform: translate(-50%, -100%);
	padding: 2px 8px;
	border-radius: 999px;
	background: #14233a;
	color: #fff;
	font: 700 13px/1.5 "Montserrat", Arial, sans-serif;
	pointer-events: none;
	animation: wa-balltip 1s ease-out forwards;
}
@keyframes wa-balltip {
	0% { opacity: 0; translate: 0 6px; }
	15% { opacity: 1; translate: 0 0; }
	70% { opacity: 1; }
	100% { opacity: 0; translate: 0 -34px; }
}
.wa-ballpromo {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1002; /* над шапкою, під попапом заявки (10000) */
	width: 330px;
	max-width: calc(100vw - 32px);
	padding: 20px 20px 18px;
	border-radius: 18px;
	background: #fff;
	color: #14233a;
	box-shadow: 0 18px 50px rgba(20, 35, 58, .22), 0 2px 8px rgba(20, 35, 58, .08);
	font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	opacity: 0;
	transform: translateY(16px) scale(.97);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .3, 1.2);
}
.wa-ballpromo.is-in { opacity: 1; transform: none; }
.wa-ballpromo__x {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #5b6472;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.wa-ballpromo__x:hover { background: #f1f3f6; }
.wa-ballpromo__t { margin: 0 32px 6px 0; font: 700 18px/1.3 "Montserrat", Arial, sans-serif; }
.wa-ballpromo__d { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #3d4757; }
.wa-ballpromo__code {
	margin: 0 0 14px;
	padding: 8px 12px;
	border: 2px dashed #7dc91b;
	border-radius: 12px;
	background: #f4fbea;
	font: 800 22px/1.2 "Montserrat", Arial, sans-serif;
	letter-spacing: .12em;
	text-align: center;
	color: #3f7a0a;
}
.wa-ballpromo__btn {
	display: block;
	width: 100%;
	padding: 13px 16px;
	border: 0;
	border-radius: 999px;
	background: #7dc91b;
	color: #0e2a06;
	font: 700 15px/1.2 "Montserrat", Arial, sans-serif;
	cursor: pointer;
}
.wa-ballpromo__btn:hover { background: #72b818; }
@media (max-width: 767px) {
	.wa-ballpromo { left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; }
}
/* плашка в попапі заявки, коли промокод отримано */
.wa-form .wa-ballnote {
	margin: 0 0 16px;
	padding: 10px 14px;
	border: 1px dashed #7dc91b;
	border-radius: 14px;
	background: #f4fbea;
	color: #2f5c08;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}
