/**
 * Cursore custom Longevion per le pagine interne: puntino (accent) + cerchio esterno
 * che segue il mouse con inerzia. Si allarga su link/menu/button; sul submit mostra "Iscriviti".
 * Attivo solo su dispositivi con mouse (pointer fine); su touch resta il cursore normale.
 */

#lv-cursor,
#lv-cursor-dot { display: none; }

@media (hover: hover) and (pointer: fine) {

	html.lv-has-cursor,
	html.lv-has-cursor * { cursor: none; }

	/* la barra admin di WordPress resta usabile col cursore normale */
	html.lv-has-cursor #wpadminbar,
	html.lv-has-cursor #wpadminbar * { cursor: auto; }

	#lv-cursor {
		position: fixed;
		top: 0;
		left: 0;
		width: 20px;
		height: 20px;
		border: 1px solid #aab1b5;
		border-radius: 50%;
		transform: translate(-50%, -50%);
		z-index: 9000;
		pointer-events: none;
		display: grid;
		place-items: center;
		mix-blend-mode: difference;
		transition: width .35s cubic-bezier(.22, .61, .36, 1),
			height .35s cubic-bezier(.22, .61, .36, 1),
			border-color .35s, background .35s, opacity .3s;
	}

	#lv-cursor .lv-lbl {
		font-family: 'IBM Plex Mono', ui-monospace, monospace;
		font-size: .5rem;
		letter-spacing: .1em;
		text-transform: uppercase;
		color: #e9ecee;
		opacity: 0;
		transition: opacity .3s;
		white-space: nowrap;
	}

	#lv-cursor-dot {
		position: fixed;
		top: 0;
		left: 0;
		width: 4px;
		height: 4px;
		border-radius: 50%;
		background: #46c98a;
		transform: translate(-50%, -50%);
		z-index: 9001;
		pointer-events: none;
		box-shadow: 0 0 8px rgba(70, 201, 138, .5);
		display: block;
	}

	/* stato "grow": cerchio più grande, accento (su menu, link, button, submit) */
	#lv-cursor.grow {
		width: 50px;
		height: 50px;
		border-color: #46c98a;
		background: rgba(70, 201, 138, .06);
		mix-blend-mode: normal;
	}

	#lv-cursor.grow .lv-lbl { opacity: 1; }

	#lv-cursor.hide,
	#lv-cursor-dot.hide { opacity: 0; }
}
