/**
 * Brandberry custom cursor — shared (touch + container scope).
 */

:root {
	--brandberry-cursor-z-index: 2147483646;
}

/*
 * Top-layer portal for cursor markup (demos 1, 3, 4, 5–8).
 * Must sit above sticky headers (.bb-sticky-shell defaults to z-index 999).
 */
#brandberry-cursor-root,
.brandberry-cursor-root {
	position: fixed;
	top: 0;
	left: 0;
	width: 0;
	height: 0;
	overflow: visible;
	pointer-events: none;
	z-index: var(--brandberry-cursor-z-index);
}

html > .brandberry-cursor-root,
html > .brandberry-cursor,
html > .brandberry-cursor-blend-layer,
html.brandberry-custom-cursor-active:not(.brandberry-custom-cursor-scope-container) > .brandberry-cursor,
html.brandberry-custom-cursor-has-blend > .brandberry-cursor-blend-layer {
	position: fixed;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: var(--brandberry-cursor-z-index);
}

/*
 * Blend cursors mount on <html> (outside #smooth-content) so mix-blend-mode
 * composites against page content and stays fixed while scrolling.
 */
html > .brandberry-cursor.brandberry-cursor--demo2,
html > .brandberry-cursor.brandberry-cursor--demo3,
html > .brandberry-cursor.brandberry-cursor--demo4,
html > .brandberry-cursor-blend-layer,
html.brandberry-custom-cursor-has-blend > .brandberry-cursor {
	width: 0;
	height: 0;
	overflow: visible;
}

@media (pointer: coarse) {
	body.brandberry-custom-cursor-hide-touch.brandberry-custom-cursor-active,
	body.brandberry-custom-cursor-hide-touch.brandberry-custom-cursor-active a,
	body.brandberry-custom-cursor-hide-touch.brandberry-custom-cursor-active button {
		cursor: auto !important;
	}

	html.brandberry-custom-cursor-hide-touch .brandberry-cursor,
	body.brandberry-custom-cursor-hide-touch .brandberry-cursor {
		display: none !important;
	}
}

.brandberry-custom-cursor-scope-container .brandberry-cursor-area {
	position: relative;
}
