/**
 * File: assets/css/components/custom-cursor.css
 * Description: Desktop custom cursor styles.
 *
 * MAGIDA GLOBAL UI PASS 4.1:
 * - Adds a restrained cyan dot/ring cursor on desktop pointer devices only.
 * - Keeps the cursor disabled on mobile/tablet and reduced-motion contexts.
 */

.magida-custom-cursor {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 10050; /* MAGIDA COOKIE CONSENT HOTFIX PASS 23.6.0.1: keep the custom cursor visible above the cookie notice and other global overlays. */
	display: none;
	pointer-events: none;
}

.magida-custom-cursor__dot,
.magida-custom-cursor__ring {
	position: fixed;
	top: var(--magida-cursor-y, -120px);
	left: var(--magida-cursor-x, -120px);
	border-radius: var(--magida-radius-full);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transition:
		opacity var(--magida-transition-fast),
		width var(--magida-transition-fast),
		height var(--magida-transition-fast),
		border-color var(--magida-transition-fast),
		background-color var(--magida-transition-fast),
		box-shadow var(--magida-transition-fast);
	will-change: top, left;
}

.magida-custom-cursor__dot {
	width: 7px;
	height: 7px;
	background: var(--magida-cyan);
	box-shadow: 0 0 16px rgba(5, 223, 254, 0.38);
}

.magida-custom-cursor__ring {
	width: 34px;
	height: 34px;
	border: 1px solid rgba(5, 223, 254, 0.42);
	background: rgba(5, 223, 254, 0.035);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
	html.magida-custom-cursor-active,
	html.magida-custom-cursor-active body,
	html.magida-custom-cursor-active a,
	html.magida-custom-cursor-active button,
	html.magida-custom-cursor-active input,
	html.magida-custom-cursor-active textarea,
	html.magida-custom-cursor-active select,
	html.magida-custom-cursor-active label,
	html.magida-custom-cursor-active [role="button"] {
		cursor: none;
	}

	html.magida-custom-cursor-active .magida-custom-cursor {
		display: block;
	}

	html.magida-custom-cursor-active
		.magida-custom-cursor.is-visible
		.magida-custom-cursor__dot,
	html.magida-custom-cursor-active
		.magida-custom-cursor.is-visible
		.magida-custom-cursor__ring {
		opacity: 1;
	}

	/* MAGIDA GLOBAL UI PASS 4.1: Hover expansion for links, buttons, and form controls. */
	html.magida-custom-cursor-active
		.magida-custom-cursor.is-hovering
		.magida-custom-cursor__dot {
		width: 5px;
		height: 5px;
	}

	html.magida-custom-cursor-active
		.magida-custom-cursor.is-hovering
		.magida-custom-cursor__ring {
		width: 48px;
		height: 48px;
		border-color: rgba(124, 106, 251, 0.56);
		background: rgba(124, 106, 251, 0.075);
		box-shadow: var(--magida-glow-soft);
	}
}

@media (prefers-reduced-motion: reduce),
	(max-width: 1024px),
	(hover: none),
	(pointer: coarse) {
	.magida-custom-cursor {
		display: none !important;
	}
}
