/**
 * kbnx-reduced-motion.css — Global reduced motion overrides.
 *
 * When the user has prefers-reduced-motion: reduce enabled, this
 * stylesheet disables all CSS animations and transitions across
 * kbnexus components. Uses near-zero durations (0.01ms) instead
 * of 0 to avoid breaking animation-end event listeners.
 *
 * JS animations should use kbnx-motion.js getAnimationDuration()
 * to respect the same preference.
 *
 * @see WCAG 2.1 SC 2.3.1 (Three Flashes)
 * @see WCAG 2.1 SC 2.2.2 (Pause, Stop, Hide)
 */

@media (prefers-reduced-motion: reduce) {
    .kbnx-block *,
    .kbnx-block *::before,
    .kbnx-block *::after,
    [data-kbnx-component] *,
    [data-kbnx-component] *::before,
    [data-kbnx-component] *::after,
    .kbnx-skip-link,
    .kbnx-search-suggest {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Replace spinning loaders with static "Loading..." text. */
    .kbnx-spinner {
        animation: none !important;
    }

    .kbnx-spinner::after {
        content: 'Loading\2026';
        position: static;
        display: inline;
        border: none;
        width: auto;
        height: auto;
    }
}
