/* "Back to top" button (markup: inc/helpers.php, behaviour: assets/js/back-to-top.js) */

.naut-back-to-top {
	position: fixed;
	right: 20px;
	bottom: 88px;
	z-index: 9000;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 40px;
	padding: 0 16px;
	border-radius: 30px;
	background: #000;
	color: #fff;
	font: 400 14px/20px "Source Sans 3", sans-serif;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}

/* The theme sets a global `a { color: inherit !important }`, so link colours need !important. */
a.naut-back-to-top,
a.naut-back-to-top:visited,
a.naut-back-to-top:hover,
a.naut-back-to-top:focus {
	color: #fff !important;
	text-decoration: none !important;
}

a.naut-back-to-top > * {
	color: inherit !important;
}

.naut-back-to-top[hidden] {
	display: none;
}

.naut-back-to-top.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.naut-back-to-top:hover,
.naut-back-to-top:focus-visible {
	background: #222;
}

.naut-back-to-top:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.naut-back-to-top {
		width: 40px;
		padding: 0;
		justify-content: center;
		right: 16px;
	}

	.naut-back-to-top__label {
		display: none;
	}
}

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