/* Back to top — a round white button with a brand-coloured progress ring. */

.eit-totop,
.eit-totop:focus,
.eit-totop:active {
	position: fixed;
	right: 22px;
	bottom: calc(22px + var(--eit-totop-lift, 0px));
	z-index: 9980; /* above the page and header, under the pop-ups */
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .96);
	color: var(--eit-ink, #15181f);
	box-shadow: 0 10px 28px -8px rgba(20, 30, 80, .35), 0 0 0 1px rgba(20, 30, 80, .05);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	opacity: 0;
	transform: translateY(14px) scale(.9);
	pointer-events: none;
	transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1), background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.eit-totop[hidden] { display: none; }
.eit-totop.is-on { opacity: 1; transform: none; pointer-events: auto; }

/* The theme's button reset paints buttons pink on hover; spelled out here. */
.eit-totop:hover {
	background: linear-gradient(135deg, #3b4fe8, #7c3aed);
	color: #fff;
	box-shadow: 0 14px 30px -8px rgba(59, 79, 232, .55);
	transform: translateY(-2px);
}
.eit-totop:focus-visible { outline: 3px solid rgba(59, 79, 232, .45); outline-offset: 3px; }

.eit-totop__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.eit-totop__track,
.eit-totop__bar { fill: none; stroke-width: 2.5; }
.eit-totop__track { stroke: #e6e9f3; }
.eit-totop__bar { stroke-linecap: round; stroke-dasharray: 135.1; stroke-dashoffset: 135.1; transition: stroke-dashoffset .12s linear; }
.eit-totop:hover .eit-totop__track { stroke: rgba(255, 255, 255, .3); }
.eit-totop:hover .eit-totop__bar { stroke: #fff; }

.eit-totop__arrow { position: relative; width: 22px; height: 22px; transition: transform .2s ease; }
.eit-totop:hover .eit-totop__arrow { transform: translateY(-2px); }

/* No button behind a modal. */
html.eit-lp-locked .eit-totop,
html.eit-ck-locked .eit-totop,
html.eit-preview-locked .eit-totop { opacity: 0; pointer-events: none; }

@media (max-width: 767px) {
	.eit-totop,
	.eit-totop:focus,
	.eit-totop:active { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom) + var(--eit-totop-lift, 0px)); width: 46px; height: 46px; }
	.eit-totop__arrow { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.eit-totop, .eit-totop__bar, .eit-totop__arrow { transition: none; }
}
