/**
 * Interactive tooth cursor — desktop pointer only.
 */

.bluemed-cursor {
	--bm-cursor-size: 32px;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483646;
	width: var(--bm-cursor-size);
	height: var(--bm-cursor-size);
	margin: calc(var(--bm-cursor-size) / -2) 0 0 calc(var(--bm-cursor-size) / -2);
	pointer-events: none;
	opacity: 0;
	transform: translate3d(-100px, -100px, 0) scale(0.6);
	transition: opacity 0.2s ease, width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		margin 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.bluemed-cursor.is-visible {
	opacity: 1;
}

.bluemed-cursor.is-hover {
	--bm-cursor-size: 42px;
}

.bluemed-cursor.is-down {
	--bm-cursor-size: 26px;
}

.bluemed-cursor.is-text {
	opacity: 0;
}

.bluemed-cursor__ring {
	position: absolute;
	inset: -6px;
	border: 1.5px solid var(--primary-600, #153D8A);
	border-radius: 50%;
	opacity: 0;
	transform: scale(0.7);
	transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.2s ease;
}

.bluemed-cursor.is-hover .bluemed-cursor__ring {
	opacity: 0.55;
	transform: scale(1);
}

.bluemed-cursor__tooth {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 3px 8px rgba(21, 61, 138, 0.28));
	transition: filter 0.2s ease;
}

.bluemed-cursor.is-on-dark .bluemed-cursor__ring {
	border-color: #ffffff;
}

.bluemed-cursor.is-on-dark .bluemed-cursor__tooth {
	filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

html.bluemed-has-cursor,
html.bluemed-has-cursor * {
	cursor: none !important;
}

html.bluemed-has-cursor input,
html.bluemed-has-cursor textarea,
html.bluemed-has-cursor select,
html.bluemed-has-cursor [contenteditable="true"] {
	cursor: text !important;
}

@media (hover: none), (pointer: coarse) {
	.bluemed-cursor {
		display: none !important;
	}

	html.bluemed-has-cursor,
	html.bluemed-has-cursor * {
		cursor: auto !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bluemed-cursor {
		display: none !important;
	}

	html.bluemed-has-cursor,
	html.bluemed-has-cursor * {
		cursor: auto !important;
	}
}
