/**
 * Agex chrome UI — back-to-top and loading overlay styles.
 *
 * @package Agex
 * @license GPL-2.0-or-later
 */

.agex-back-to-top {
	position: fixed;
	right: 1rem;
	bottom: calc(var(--agex-bottom-nav-height, 64px) + 1rem);
	z-index: 70;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: var(--agex-radius-full, 9999px);
	background: var(--agex-color-primary, #006d37);
	color: #fff;
	cursor: pointer;
	box-shadow: var(--agex-shadow-clinical-sm);
	display: grid;
	place-items: center;
}

.agex-back-to-top::before {
	content: "↑";
	font-size: 1.1rem;
	line-height: 1;
}

.agex-loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	background: var(--agex-color-background, #f5fbf2);
	transition: opacity 0.35s ease;
}

.agex-loading.is-done {
	opacity: 0;
	pointer-events: none;
}

.agex-loading__spinner {
	width: 2.5rem;
	height: 2.5rem;
	border: 3px solid var(--agex-color-soft-gray, #e5e7eb);
	border-top-color: var(--agex-color-primary, #006d37);
	border-radius: 50%;
	animation: agex-spin 0.7s linear infinite;
}

@keyframes agex-spin {
	to {
		transform: rotate(360deg);
	}
}
