/* Розробка та дизайн: Oleg Dez · dezoleg@gmail.com · https://dez.kiev.ua */
/* Кнопка «Нагору»: справа внизу, з'являється після прокрутки. На < 768 px — над мобільною панеллю дзвінка / панеллю ціни. */

.neova-to-top {
	position: fixed;
	right: var(--wp--preset--spacing--40);
	bottom: var(--wp--preset--spacing--40);
	z-index: 39; /* нижче мобільної панелі (40), панелі ціни (41) і header (50) */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 2px solid var(--wp--preset--color--white); /* видно і на темних секціях */
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	cursor: pointer;
	box-shadow: var(--wp--preset--shadow--sticky);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s, background-color .15s ease;
}

.neova-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.neova-to-top:hover {
	background-color: var(--wp--preset--color--ink);
}

.neova-to-top svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 767px) {
	.neova-to-top {
		bottom: calc(var(--wp--custom--mobile-bar--height) + var(--wp--preset--spacing--40) + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.neova-to-top {
		transition: none;
	}
}
