/*
 * GamingBroject retro cursor rotation.
 * Original, lightweight recreations inspired by documented Windows 9x cursor
 * schemes. The active scheme is assigned in the document head for 24 hours.
 */
:root[data-gb-cursor="windows-default"] {
	--gb-cursor-arrow: url("cursors/win98-default-arrow.png") 2 1, default;
	--gb-cursor-link: url("cursors/win98-default-hand.png") 10 2, pointer;
}

:root[data-gb-cursor="3d-bronze"] {
	--gb-cursor-arrow: url("cursors/win98-bronze-arrow.png") 2 1, default;
	--gb-cursor-link: url("cursors/win98-bronze-hand.png") 10 2, pointer;
}

:root[data-gb-cursor="3d-white"] {
	--gb-cursor-arrow: url("cursors/win98-white-arrow.png") 2 1, default;
	--gb-cursor-link: url("cursors/win98-white-hand.png") 10 2, pointer;
}

:root[data-gb-cursor="dinosaur"] {
	--gb-cursor-arrow: url("cursors/win98-dinosaur-arrow.png") 2 1, default;
	--gb-cursor-link: url("cursors/win98-dinosaur-hand.png") 10 2, pointer;
}

:root[data-gb-cursor="old-fashioned"] {
	--gb-cursor-arrow: url("cursors/win98-old-fashioned-arrow.png") 2 1, default;
	--gb-cursor-link: url("cursors/win98-old-fashioned-hand.png") 10 2, pointer;
}

:root[data-gb-cursor="windows-rainbow"] {
	--gb-cursor-arrow: url("cursors/win98-rainbow-arrow.png") 2 1, default;
	--gb-cursor-link: url("cursors/win98-rainbow-hand.png") 10 2, pointer;
}

@media (hover: hover) and (pointer: fine) {
	html[data-gb-cursor] body {
		cursor: var(--gb-cursor-arrow) !important;
	}

	html[data-gb-cursor] body :is(
		a,
		button,
		summary,
		label[for],
		select,
		[role="button"],
		[role="tab"],
		[role="link"],
		[onclick],
		input[type="button"],
		input[type="submit"],
		input[type="reset"],
		input[type="checkbox"],
		input[type="radio"],
		input[type="range"]
	) {
		cursor: var(--gb-cursor-link) !important;
	}

	html[data-gb-cursor] body :is(
		input[type="text"],
		input[type="search"],
		input[type="email"],
		input[type="url"],
		input[type="tel"],
		input[type="password"],
		input[type="number"],
		textarea,
		[contenteditable="true"]
	) {
		cursor: text !important;
	}

	html[data-gb-cursor] body #contentHub[data-simple-editorial="true"] .cards .article-card.simple-post.gb-unified-card,
	html[data-gb-cursor] body #contentHub[data-simple-editorial="true"] .cards .article-card.simple-post.gb-unified-card:first-child,
	html[data-gb-cursor] body #contentHub .cards .article-card,
	html[data-gb-cursor] body #contentHub .cards .article-card:first-child {
		cursor: var(--gb-cursor-arrow) !important;
	}
}
