/*
 * Chartreuse Digital cursor.
 * A precise dot morphs into an outlined circle over interactive elements.
 */

.cd-cursor {
	--cd-cursor-size: 34px;
	--cd-cursor-dot-size: 7px;
	--cd-cursor-stroke: 1.5px;
	--cd-cursor-fg: #151515;
	--cd-cursor-edge: #f4f3ee;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483646;
	width: var(--cd-cursor-size);
	height: var(--cd-cursor-size);
	contain: layout style paint;
	opacity: 0;
	pointer-events: none;
	transform: translate3d(-100px, -100px, 0);
	transition: opacity 80ms linear;
	will-change: transform;
}

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

.cd-cursor__shape {
	position: absolute;
	inset: 0;
	transform-origin: 50% 50%;
	will-change: transform;
}

.cd-cursor__dot,
.cd-cursor__ring {
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	transition: background-color 90ms linear, border-color 90ms linear, box-shadow 90ms linear;
	will-change: transform, opacity;
}

.cd-cursor__dot {
	width: var(--cd-cursor-dot-size);
	height: var(--cd-cursor-dot-size);
	margin: calc(var(--cd-cursor-dot-size) / -2) 0 0 calc(var(--cd-cursor-dot-size) / -2);
	background: var(--cd-cursor-fg);
	box-shadow: 0 0 0 0.65px var(--cd-cursor-edge);
}

.cd-cursor__ring {
	width: var(--cd-cursor-size);
	height: var(--cd-cursor-size);
	margin: calc(var(--cd-cursor-size) / -2) 0 0 calc(var(--cd-cursor-size) / -2);
	border: var(--cd-cursor-stroke) solid var(--cd-cursor-fg);
	box-shadow:
		0 0 0 0.65px var(--cd-cursor-edge),
		inset 0 0 0 0.35px var(--cd-cursor-edge);
	opacity: 0;
	transform: scale(0.2);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	html.cd-cursor-ready,
	html.cd-cursor-ready body,
	html.cd-cursor-ready a,
	html.cd-cursor-ready button,
	html.cd-cursor-ready summary,
	html.cd-cursor-ready [role="button"],
	html.cd-cursor-ready [data-cursor-hover] {
		cursor: none;
	}

	html.cd-cursor-ready input:not([type]),
	html.cd-cursor-ready input[type="text"],
	html.cd-cursor-ready input[type="search"],
	html.cd-cursor-ready input[type="email"],
	html.cd-cursor-ready input[type="url"],
	html.cd-cursor-ready input[type="tel"],
	html.cd-cursor-ready input[type="password"],
	html.cd-cursor-ready input[type="number"],
	html.cd-cursor-ready textarea,
	html.cd-cursor-ready [contenteditable="true"] {
		cursor: text;
	}

	html.cd-cursor-ready select,
	html.cd-cursor-ready input,
	html.cd-cursor-ready [data-native-cursor],
	html.cd-cursor-ready #wpadminbar,
	html.cd-cursor-ready #wpadminbar * {
		cursor: auto;
	}

	html.cd-cursor-ready [disabled],
	html.cd-cursor-ready [aria-disabled="true"] {
		cursor: not-allowed;
	}
}

@media (prefers-reduced-motion: reduce),
	(hover: none),
	(pointer: coarse),
	(forced-colors: active) {
	.cd-cursor {
		display: none !important;
	}

	html.cd-cursor-ready,
	html.cd-cursor-ready body,
	html.cd-cursor-ready a,
	html.cd-cursor-ready button,
	html.cd-cursor-ready summary,
	html.cd-cursor-ready [role="button"],
	html.cd-cursor-ready [data-cursor-hover] {
		cursor: auto;
	}
}
