/*!
 * Wellmade Axis Pro - Magnetic
 * Module: magnetic
 *
 * The engine (wma-magnetic.js) drives the independent `translate` and `scale`
 * properties inline per frame, so almost no CSS is needed for motion. This file
 * provides:
 *   1. The optional glow, driven by the engine through the --wma-mag-g custom
 *      property (0 to 1) and gated by a class that is present only while the
 *      glow is visible, so the element's own box-shadow returns at rest and the
 *      element's own transitions are never overridden. Color-agnostic and
 *      dark-mode-agnostic: it uses the element's own currentColor so it inherits
 *      the surrounding palette instead of hardcoding a color.
 *   2. A reduced-motion safety net: if the engine ever fails to bail out, all
 *      magnetic motion is neutralized here.
 */

/* Optional glow while active. Defaults to currentColor (palette- and dark-mode-
   safe); an author can override the color per element, in which case the engine
   sets the --wma-mag-glow variable and it wins. Intensity comes from --wma-mag-g,
   eased by the engine, so no transition is declared on the element. */
.wma-magnetic-glowing {
	box-shadow:
		0 0 0 1px color-mix( in srgb, var( --wma-mag-glow, currentColor ) calc( 14% * var( --wma-mag-g, 1 ) ), transparent ),
		0 8px 30px color-mix( in srgb, var( --wma-mag-glow, currentColor ) calc( 26% * var( --wma-mag-g, 1 ) ), transparent );
}

@media (prefers-reduced-motion: reduce) {
	[data-wma-magnetic] {
		translate: none !important;
		scale: none !important;
	}
	.wma-magnetic-glowing {
		box-shadow: none !important;
	}
}
