/* Back-to-top button. See inc/back-to-top.php and assets/js/back-to-top.js. */

/* Same look as the old site: a dark see-through tab on the right edge with a white arrow. */
.back-to-top {
	position: fixed;
	right: 0;
	bottom: 125px;
	z-index: 100;
	display: flex;
	padding: 5px;
	border-radius: 5px 0 0 5px;
	background: rgb(0 0 0 / 40%);
	color: var(--wp--preset--color--base);
	transition: opacity 0.4s, transform 0.4s;
}

.back-to-top:hover,
.back-to-top:focus-visible {
	background: rgb(0 0 0 / 70%);
}

.back-to-top:focus-visible {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: -4px;
}

/* Slides in from the right edge when the page has been scrolled down. */
.back-to-top:not(.is-visible) {
	opacity: 0;
	transform: translateX(100%);
	pointer-events: none;
}

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