/* Widget "Torna su Lab591" (inc/widgets/class-back-to-top-widget.php). */

.lab-top {
	--lab-top-size: 48px;
	--lab-top-offset: 32px;
	--lab-top-color: #ffffff;
	--lab-top-hover: #5ac134;
	--lab-top-border: #403a3b;
	--lab-top-bg: rgba(23, 20, 21, .72);
	position: fixed;
	right: var(--lab-top-offset);
	bottom: var(--lab-top-offset);
	z-index: 90;
	display: grid;
	place-items: center;
	width: var(--lab-top-size);
	height: var(--lab-top-size);
	border: 1px solid var(--lab-top-border);
	border-radius: 50%;
	background: var(--lab-top-bg);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .35s ease, transform .35s ease, visibility .35s, color .25s ease, border-color .25s ease;
}

/* Selettore rafforzato: lo stile dei link del kit (verde) non deve prevalere. */
.elementor-widget-lab591-back-to-top a.lab-top {
	color: var(--lab-top-color);
}

.elementor-widget-lab591-back-to-top a.lab-top:hover,
.elementor-widget-lab591-back-to-top a.lab-top:focus-visible {
	color: var(--lab-top-hover);
	border-color: var(--lab-top-hover);
}

.lab-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.lab-top svg {
	width: 45%;
	height: 45%;
	fill: currentColor;
	transition: transform .25s ease;
}

/* Icona da font (anteprima nell'editor). */
.lab-top i {
	font-size: calc(var(--lab-top-size, 48px) * .42);
	line-height: 1;
	transition: transform .25s ease;
}

.lab-top:hover i {
	transform: translateY(-2px);
}

.lab-top:hover svg {
	transform: translateY(-2px);
}

/* Nell'editor: fermo e visibile, per poterlo selezionare. */
.lab-top--editor {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	margin-left: auto;
}

@media (prefers-reduced-motion: reduce) {
	.lab-top,
	.lab-top svg {
		transition: none;
	}
}
