=== AddonLogic BMI & Calculator Shortcodes ===
Contributors: snehalpancholi
Tags: bmi calculator, tip calculator, percentage calculator, shortcode, calculator
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

Three inline calculators (BMI, tip, percentage) via shortcodes with styled inputs and instant JavaScript results. No external libraries.

== Description ==

AddonLogic BMI & Calculator Shortcodes provides three ready-to-use calculators you can embed anywhere on your WordPress site with a shortcode.

**Included calculators:**

* **[bmi_calculator]** — Body Mass Index calculator supporting both metric (cm/kg) and imperial (ft-in/lbs) units. Shows BMI value, category (Underweight / Normal / Overweight / Obese), and a colour-coded scale bar.
* **[tip_calculator]** — Bill + tip calculator with configurable percentage and a bill-split feature for groups.
* **[percentage_calculator]** — Three-mode percentage tool: X% of Y, "X is what % of Y?", and percentage change between two values.

All calculations run instantly in the browser with no page reload or server round-trip. No jQuery dependency.

**Features:**
* Metric and imperial unit support for BMI
* Configurable accent colour
* Dark mode compatible (respects prefers-color-scheme)
* Keyboard accessible (Enter key triggers calculation)
* Zero external dependencies

== Installation ==

1. Upload the `bmi-calculator-shortcodes/` folder to `/wp-content/plugins/`.
2. Activate via **Plugins → Installed Plugins**.
3. Configure defaults at **Settings → Calculator Shortcodes**.
4. Add `[bmi_calculator]`, `[tip_calculator]`, or `[percentage_calculator]` to any post or page.

== Shortcodes ==

`[bmi_calculator unit="metric"]`
Attributes: `unit` — `metric` (default) or `imperial`

`[tip_calculator]`
No attributes. Default tip is 18%.

`[percentage_calculator]`
No attributes. Tabs switch between the three calculation modes.

== Frequently Asked Questions ==

= Are calculations done server-side? =
No. All calculations are performed instantly in the visitor's browser using vanilla JavaScript.

= Can I change the button colour? =
Yes — navigate to **Settings → Calculator Shortcodes** and pick an accent colour.

= Does it work with page builders? =
Yes. Use the shortcode in any page builder shortcode widget or block.

== Changelog ==

= 1.0.0 =
* Initial release. BMI, tip, and percentage calculators.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
