/**
 * Image magnifier lens - see js/image-magnifier.js for the full feature
 * writeup. Not visually verified - no browser available to confirm the
 * lens actually renders and positions correctly.
 *
 * The (hover: hover) and (pointer: fine) gate here duplicates the same check
 * already made in JS before any listener is attached - this is a backstop,
 * not the primary gate, so the lens stays invisible even if some future edit
 * loosens the JS-side check without updating this file to match.
 */
@media (hover: hover) and (pointer: fine) {
	.kcb-magnifier-lens {
		position: fixed;
		top: 0;
		left: 0;
		width: 180px;
		height: 180px;
		border-radius: 50%;
		border: 3px solid rgba(255, 255, 255, 0.9);
		box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
		background-repeat: no-repeat;
		background-color: #111;
		pointer-events: none;
		z-index: 9999;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.12s ease-out;
	}

	.kcb-magnifier-lens.is-visible {
		opacity: 1;
		visibility: visible;
	}

	/*
	 * Hides the OS pointer over the source photo while the lens is actively
	 * showing (`.kcb-magnifier-zooming`, toggled by js/image-magnifier.js's
	 * armLens()/hideLens() alongside the lens's own `.is-visible` class) -
	 * the lens itself is a fixed-position circle that follows the cursor,
	 * not a cursor replacement, so without this the real arrow renders on
	 * top of it. Scoped to the class only, inside this same hover-capable
	 * media query, and removed by hideLens() on pointerleave, so the
	 * cursor is guaranteed back to normal everywhere else - a leaked
	 * `cursor: none` would be worse than the pointer just staying visible.
	 */
	a.fancy-gallery > img.kcb-magnifier-zooming {
		cursor: none;
	}

	@media (prefers-reduced-motion: reduce) {
		.kcb-magnifier-lens {
			transition: none;
		}
	}
}

/* Coarse pointers / no real hover (touch, most tablets): no lens, ever - a
 * deliberate exclusion, not an oversight. See js/image-magnifier.js's own
 * top-of-file comment for why a tap-to-toggle alternative wasn't built
 * instead (it would conflict with the existing tap-to-open lightbox on the
 * same element). */
@media not all and (hover: hover) and (pointer: fine) {
	.kcb-magnifier-lens {
		display: none;
	}
}
