/* AAFE Site Effects — scroll progress bar + back to top. */

.aafe-progress {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99998;
	height: var(--aafe-progress-h, 3px);
	pointer-events: none;
}

.aafe-progress--top {
	top: 0;
}

.admin-bar .aafe-progress--top {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.aafe-progress--bottom {
	bottom: 0;
}

.aafe-progress > span {
	display: block;
	height: 100%;
	background: var(--aafe-progress-color, #8b5cf6);
	transform: scaleX(var(--aafe-progress, 0));
	transform-origin: 0 50%;
}

/* Browsers with scroll-driven animations need no JavaScript at all for the bar. */
@supports (animation-timeline: scroll()) {
	.aafe-progress > span {
		animation: aafe-progress-grow linear both;
		animation-timeline: scroll(root block);
	}
	@keyframes aafe-progress-grow {
		from { transform: scaleX(0); }
		to { transform: scaleX(1); }
	}
}

.aafe-btt {
	position: fixed;
	bottom: 24px;
	z-index: 99997;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--aafe-btt-bg, #111);
	color: var(--aafe-btt-color, #fff);
	box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(.9);
	transition: opacity .3s ease, visibility .3s ease, transform .4s cubic-bezier(.16, 1, .3, 1);
}

/* Beat theme / Elementor Kit button styles (e.g. ".elementor-kit-6 button:hover"). */
button.aafe-btt.aafe-btt,
button.aafe-btt.aafe-btt:hover,
button.aafe-btt.aafe-btt:focus {
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--aafe-btt-bg, #111);
	color: var(--aafe-btt-color, #fff);
	box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35);
	text-transform: none;
	min-height: 0;
}

.aafe-btt--right {
	right: 24px;
}

.aafe-btt--left {
	left: 24px;
}

.aafe-btt.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.aafe-btt:hover .aafe-btt__icon {
	transform: translateY(-3px);
}

.aafe-btt:focus-visible {
	outline: 2px solid var(--aafe-btt-bg, #111);
	outline-offset: 3px;
}

.aafe-btt__icon {
	width: 20px;
	height: 20px;
	transition: transform .3s ease;
}

.aafe-btt__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	pointer-events: none;
}

.aafe-btt__ring circle {
	fill: none;
	stroke: var(--aafe-btt-color, #fff);
	stroke-width: 2;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--aafe-progress, 0) * 100);
	opacity: .85;
}

@media (max-width: 767px) {
	.aafe-btt {
		bottom: 16px;
		width: 44px;
		height: 44px;
	}
	.aafe-btt--right {
		right: 16px;
	}
	.aafe-btt--left {
		left: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aafe-btt,
	.aafe-btt__icon {
		transition: none;
	}
}
