/* Cursore personalizzato — colori dalla palette Bricks "Bertolotti" */
.fm-cursor {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	border-radius: 50%;
	pointer-events: none;
	will-change: transform;
}

.fm-cursor--ring {
	width: 40px;
	height: 40px;
	border: 1.5px solid color-mix(in srgb, var(--green-700) 45%, transparent);
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.fm-cursor--dot {
	width: 8px;
	height: 8px;
	background-color: var(--green-700);
	transition: background-color 0.25s ease;
}

.fm-cursor--ring.is-hover {
	border-color: var(--green-700);
	background-color: color-mix(in srgb, var(--sage-400) 22%, transparent);
}

/* Sezioni scure: verde brand, verde profondo, footer */
.fm-cursor--ring.is-dark {
	border-color: color-mix(in srgb, var(--sage-100) 55%, transparent);
}

.fm-cursor--dot.is-dark {
	background-color: var(--sand);
}

.fm-cursor--ring.is-dark.is-hover {
	border-color: var(--sand);
	background-color: color-mix(in srgb, var(--sand) 16%, transparent);
}

.fm-cursor.is-hidden {
	display: none;
}

/* Nasconde il puntatore nativo solo quando il cursore personalizzato è attivo,
   escluse le aree con data-cursor="off" */
html.has-fm-cursor,
html.has-fm-cursor *:not([data-cursor="off"], [data-cursor="off"] *) {
	cursor: none !important;
}

/* data-cursor="off": torna il puntatore nativo. Specificità zero (:where),
   così l'opzione "Cursore" di Bricks sull'elemento o sui figli ha sempre la precedenza. */
:where(html.has-fm-cursor [data-cursor="off"]) {
	cursor: auto;
}

html.has-fm-cursor :is(input:not([type="range"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]), textarea, [contenteditable="true"]):not([data-cursor="off"] *) {
	cursor: text !important;
}
