.cs-scroll-to-top {
	position: fixed;
	right: max(24px, env(safe-area-inset-right));
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 9998;
	display: grid;
	width: 52px;
	height: 52px;
	padding: 0;
	place-items: center;
	color: #fff;
	background: linear-gradient(145deg, #c34c64 0%, #a72f49 100%);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	box-shadow:
		0 12px 30px rgba(86, 31, 43, 0.22),
		0 0 0 4px rgba(196, 169, 111, 0.12);
	cursor: pointer;
	opacity: 0;
	transform: translateY(16px) scale(0.88);
	pointer-events: none;
	transition:
		opacity 240ms ease,
		transform 240ms ease,
		box-shadow 240ms ease,
		background 240ms ease;
}

.cs-scroll-to-top.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.cs-scroll-to-top::after {
	content: "";
	position: absolute;
	inset: 5px;
	border: 1px solid rgba(239, 221, 183, 0.5);
	border-radius: inherit;
	pointer-events: none;
}

.cs-scroll-to-top-icon {
	position: relative;
	display: block;
	width: 16px;
	height: 18px;
}

.cs-scroll-to-top-icon::before {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 8px;
	height: 8px;
	border-top: 1.5px solid currentColor;
	border-left: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.cs-scroll-to-top-icon::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 7px;
	width: 1.5px;
	height: 13px;
	background: currentColor;
	border-radius: 2px;
}

.cs-scroll-to-top:hover {
	background: linear-gradient(145deg, #ca566d 0%, #99283f 100%);
	box-shadow:
		0 15px 34px rgba(86, 31, 43, 0.3),
		0 0 0 5px rgba(196, 169, 111, 0.16);
	transform: translateY(-3px) scale(1);
}

.cs-scroll-to-top:focus-visible {
	outline: 2px solid #b63f56;
	outline-offset: 4px;
}

@media (max-width: 767px) {
	.cs-scroll-to-top {
		right: max(16px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
		width: 46px;
		height: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cs-scroll-to-top {
		transition: opacity 1ms linear;
	}
}

