/* ============================================================
   Floating back-to-top button
   ------------------------------------------------------------
   Hidden by default; becomes visible after a small scroll
   (toggled via .is-visible from back-to-top.js).
   ============================================================ */

.hvv-back-to-top {
	position: fixed;
	right: 32px;
	bottom: 32px;
	z-index: 90;

	width: 74px;
	height: 62px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 26px;
	background: #FFFFFF;
	box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
	cursor: pointer;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	color: #1A8DA1;
	-webkit-appearance: none;
	   -moz-appearance: none;
	        appearance: none;

	/* hidden state */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(16px);
	transition:
		opacity      .25s ease,
		visibility   .25s ease,
		transform    .25s ease,
		background-color .2s ease,
		box-shadow   .2s ease;
}

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

.hvv-back-to-top:hover,
.hvv-back-to-top:focus-visible {
	background: #F4FAFB;
	box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.28);
	outline: none;
}

.hvv-back-to-top:focus-visible {
	outline: 2px solid #1A8DA1;
	outline-offset: 2px;
}

.hvv-back-to-top:active {
	transform: translateY(2px);
	box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.25);
}

.hvv-back-to-top__icon {
	display: block;
	width: 37px;
	height: auto;
	color: inherit;
	transform: rotate(180deg);
}

/* ----- Mobile (Figma 390px) ----- */
@media (max-width: 767px) {
	.hvv-back-to-top {
		right: 16px;
		bottom: 24px;
		width: 48px;
		height: 44px;
		border-radius: 18px;
		box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25);
	}
	.hvv-back-to-top__icon {
		width: 24px;
	}
	/* Respect iOS safe area at the bottom (notch / home indicator) */
	@supports (padding: env(safe-area-inset-bottom)) {
		.hvv-back-to-top {
			bottom: calc(24px + env(safe-area-inset-bottom));
		}
	}
}

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