/**
 * HALINK C8 — Back to top
 */

.c8-back-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.5rem;
	z-index: 440;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 20px 5px;
	background: var(--c8-primary, #121f38);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(18, 31, 56, 0.28);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(12px);
	transition:
		opacity 0.25s ease,
		visibility 0.25s ease,
		transform 0.25s ease,
		background 0.2s ease;
}

.c8-back-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.c8-back-top:hover,
.c8-back-top:focus-visible {
	background: var(--c8-secondary, #9a563a);
	color: #fff;
	outline: none;
}

.c8-back-top__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.c8-back-top__icon svg {
	display: block;
}

@media (max-width: 991px) {
	.c8-back-top {
		right: 0.85rem;
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
		width: 44px;
		height: 44px;
	}
}
