/*
 * Scroll-to-top button — mirrors inc/footer/scroll-top.php.
 *
 * A fixed circle in the bottom-right corner. It renders with the `hidden`
 * attribute and stays invisible until assets/js/scroll-top.js adds
 * .j2e-scroll-top--visible once the header has scrolled out of view; the
 * default state below only defines the hidden end of that fade.
 */

.j2e-scroll-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: var(--j2e-sticky-z);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--j2e-purple);
	color: #fff;
	box-shadow: var(--j2e-shadow-dropdown);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease,
		background-color 0.2s ease;
}

.j2e-scroll-top--visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.j2e-scroll-top:hover,
.j2e-scroll-top:focus-visible {
	background: var(--j2e-purple-hover);
}

.j2e-scroll-top:focus-visible {
	outline: 2px solid var(--j2e-cyan);
	outline-offset: 2px;
}

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