/**
 * ChaCha Home — DEV-10 Back to Top v1.0
 */

.chacha-floating-actions {
	--chacha-floating-right: 24px;
	--chacha-floating-bottom: 24px;
	position: fixed;
	right: calc(var(--chacha-floating-right) + env(safe-area-inset-right, 0px));
	bottom: calc(var(--chacha-floating-bottom) + env(safe-area-inset-bottom, 0px));
	z-index: 85;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	pointer-events: none;
}

.chacha-back-to-top {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(32, 26, 23, 0.22);
	border-radius: 50%;
	background: rgba(255, 253, 252, 0.94);
	color: var(--chacha-espresso, #201A17);
	box-shadow: 0 8px 24px rgba(32, 26, 23, 0.10);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px);
	transition:
		opacity 180ms ease,
		visibility 180ms ease,
		transform 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease,
		color 180ms ease;
}

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

.chacha-back-to-top svg {
	display: block;
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
	.chacha-back-to-top:hover {
		border-color: var(--chacha-brass, #B08D57);
		background: var(--chacha-espresso, #201A17);
		color: #FFFDFC;
	}
}

.chacha-back-to-top:focus-visible {
	outline: 2px solid var(--chacha-brass, #B08D57);
	outline-offset: 4px;
}

@media (max-width: 1024px) {
	.chacha-floating-actions {
		--chacha-floating-right: 20px;
		--chacha-floating-bottom: 20px;
	}

	.chacha-back-to-top {
		width: 44px;
		height: 44px;
	}
}

@media (max-width: 767px) {
	.chacha-floating-actions {
		--chacha-floating-right: 16px;
		--chacha-floating-bottom: 16px;
		gap: 8px;
	}

	.chacha-back-to-top {
		width: 42px;
		height: 42px;
	}
}

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