=== AddonLogic Reduce-Motion Toggle ===
Contributors: snehalpancholi
Tags: accessibility, animation, reduce motion, a11y, vestibular
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Respects the visitor's prefers-reduced-motion OS setting and adds a manual toggle to disable CSS animations and transitions site-wide.

== Description ==

Reduce-Motion Toggle improves accessibility for visitors with vestibular disorders, motion sensitivity, or epilepsy by honouring their OS "Reduce Motion" preference and offering a manual control to disable animations at any time.

**Features:**
* Automatically detects and respects the `prefers-reduced-motion` media query
* Manual floating toggle button (four corner positions)
* `[reduce_motion_toggle]` shortcode for inline placement
* localStorage persistence — preference survives page navigation
* CSS injected as a `<style>` tag targeting a class on `<html>` — easy to scope or extend
* Custom CSS field: replace the built-in ruleset with your own
* OS-setting listener: if the user changes their OS preference during the session, the plugin responds live (unless they have already made a manual choice)
* Applies class to `<html>` immediately in the script to prevent animation flash on first load
* Zero jQuery dependency

== Installation ==

1. Upload the `reduce-motion-toggle` folder to `/wp-content/plugins/`.
2. Activate via **Plugins → Installed Plugins**.
3. Go to **Settings → Reduce Motion** to configure.

== Shortcodes ==

`[reduce_motion_toggle]`

| Attribute      | Default           | Description                           |
|----------------|-------------------|---------------------------------------|
| label_reduce   | *(from settings)* | Button text when motion is reduced    |
| label_restore  | *(from settings)* | Button text when motion is restored   |

== Frequently Asked Questions ==

= What CSS does this apply? =
By default it sets `animation-duration`, `animation-iteration-count`, `transition-duration`, and `scroll-behavior` to near-zero on all elements scoped under `.rmt-reduce-motion` on the `<html>` element. You can replace the CSS entirely in Settings.

= Will this break my theme's animations permanently? =
No. Animations are only suppressed while the visitor has the reduced-motion preference active. Removing the class (via the toggle button or clearing localStorage) restores all original styles.

= What does the OS auto-detection do? =
If `prefers-reduced-motion: reduce` is detected in the visitor's media environment, reduced motion is applied automatically. The visitor can still override this with the manual toggle button.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Floating toggle button in the corner.
2. Settings page showing OS auto-detect and custom CSS options.
