/* =====================================================================
   DIGITAL MOUSE - HUD / reticle style cursor (replaces the old blob cursor)
   Works only on real mouse devices. Touch screens keep the normal behaviour.
   ===================================================================== */

html.dm-on,
html.dm-on * { cursor: none !important; }

/* real text cursor inside form fields */
html.dm-on input,
html.dm-on textarea,
html.dm-on select,
html.dm-on [contenteditable] { cursor: text !important; }
html.dm-on select { cursor: pointer !important; }

.dm-dot,
.dm-ring,
.dm-label,
.dm-ping {
	position: fixed;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 2147483000;
	opacity: 0;
	will-change: transform;
	transition: opacity 0.25s ease;
}
html.dm-ready .dm-dot,
html.dm-ready .dm-ring { opacity: 1; }
html.dm-hide .dm-dot,
html.dm-hide .dm-ring,
html.dm-hide .dm-label { opacity: 0 !important; }

/* ---- pixel dot (exact pointer position) ---- */
.dm-dot {
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	background: #fd7513;
	border: 1.5px solid #ffffff;
	border-radius: 1px;                 /* square pixel = digital feel */
	box-shadow: 0 0 0 1px rgba(9, 37, 100, 0.55), 0 0 10px rgba(253, 117, 19, 0.85);
	transition: opacity 0.25s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease, background 0.2s ease;
}

/* ---- reticle (4 corner brackets, follows with a soft lag) ---- */
.dm-ring {
	width: 38px;
	height: 38px;
	margin: 0;
	transition: opacity 0.25s ease, width 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
	            height 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
	filter: drop-shadow(0 0 1.5px #ffffff) drop-shadow(0 0 7px rgba(9, 98, 213, 0.55));
}
.dm-ring i {
	position: absolute;
	width: 9px;
	height: 9px;
	border: 0 solid #0962d5;
	transition: border-color 0.25s ease, transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.dm-ring i:nth-child(1) { top: 0;    left: 0;  border-top-width: 2px;    border-left-width: 2px; }
.dm-ring i:nth-child(2) { top: 0;    right: 0; border-top-width: 2px;    border-right-width: 2px; }
.dm-ring i:nth-child(3) { bottom: 0; left: 0;  border-bottom-width: 2px; border-left-width: 2px; }
.dm-ring i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

/* idle: slow scanning breathe */
.dm-ring { animation: dm-breathe 2.8s ease-in-out infinite; }
@keyframes dm-breathe {
	0%, 100% { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 5px rgba(9, 98, 213, 0.45)); }
	50%      { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 11px rgba(9, 98, 213, 0.85)); }
}

/* hover on clickable things: reticle locks onto the element, turns orange */
.dm-ring.is-lock i { border-color: #fd7513; }
.dm-ring.is-lock { animation: none; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 9px rgba(253, 117, 19, 0.7)); }
html.dm-lock .dm-dot { background: #0962d5; box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 10px rgba(9, 98, 213, 0.9); }

/* mouse down: brackets squeeze in */
html.dm-down .dm-ring i:nth-child(1) { transform: translate(3px, 3px); }
html.dm-down .dm-ring i:nth-child(2) { transform: translate(-3px, 3px); }
html.dm-down .dm-ring i:nth-child(3) { transform: translate(3px, -3px); }
html.dm-down .dm-ring i:nth-child(4) { transform: translate(-3px, -3px); }
html.dm-down .dm-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }

/* click ping (digital pulse) */
.dm-ping {
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border: 2px solid #fd7513;
	border-radius: 2px;
	opacity: 0.9;
	animation: dm-ping 0.55s ease-out forwards;
	transition: none;
}
@keyframes dm-ping {
	from { opacity: 0.9; transform: var(--dm-pos) scale(0.6) rotate(0deg); }
	to   { opacity: 0;   transform: var(--dm-pos) scale(4.2) rotate(45deg); }
}

/* small mono label (e.g. DRAG on sliders) */
.dm-label {
	margin: 24px 0 0 24px;
	padding: 3px 7px;
	font: 700 11px/1 "Courier New", ui-monospace, monospace;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #ffffff;
	background: rgba(9, 37, 100, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 3px;
	white-space: nowrap;
	transform-origin: 0 0;
}
html.dm-label-on .dm-label { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	.dm-ring { animation: none; }
}
