=== EstimateX Calculator ===
Contributors: estimatex
Tags: calculator, estimate, quote, cost calculator, embed, form
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 1.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed EstimateX calculators on your WordPress site with a simple shortcode or Gutenberg block.

== Description ==

EstimateX Calculator lets you embed interactive cost calculators, quote builders, and ROI estimators on any WordPress page or post.

**Features:**

* **Shortcode embed** — `[estimatex id="your-embed-key"]`
* **Gutenberg block** — visual block editor with live preview
* **Responsive iframe** — works on all screen sizes
* **Auto-resize** — iframe height adjusts to content automatically
* **Sandbox security** — calculator runs in a sandboxed iframe
* **Lazy loading** — optimized for page performance

**How it works:**

1. Create a calculator at [estimatex.ai](https://estimatex.ai)
2. Publish it and copy the embed key
3. Add `[estimatex id="your-key"]` to any page or post

== Installation ==

1. Upload the `estimatex-calculator` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu
3. Go to **Settings → EstimateX** to configure your API key
4. Use `[estimatex id="your-embed-key"]` in any page or post

== Frequently Asked Questions ==

= Where do I find my embed key? =
In your EstimateX dashboard, open a published calculator and click **Embed & Share**. The embed key is the slug shown in the hosted URL.

= Can I customize the height? =
Yes — use `[estimatex id="key" height="800"]` or change the default in Settings → EstimateX.

= Does this work with page builders? =
Yes. The shortcode works in Elementor, Beaver Builder, Divi, and any builder that supports shortcodes.

== Changelog ==

= 1.5.0 =
* Facebook / Meta Pixel on your site: calculator submissions are tracked as the standard Lead event (with the estimate as value)

= 1.4.0 =
* Calculator events (estimatex_form_start, estimatex_form_complete with the estimate as value, estimatex_pdf_download) are sent to your site's Google Analytics 4 / Google Tag Manager automatically

= 1.3.0 =
* After submitting, the page scrolls to the thank-you message (with the PDF download)

= 1.2.0 =
* Loading skeleton while the calculator loads, then a smooth fade-in

= 1.1.1 =
* Auto-resize no longer depends on the server setting matching exactly (no inner scrollbar)

= 1.1.0 =
* Default server is now https://app.estimatex.ai
* Auto-resize works on every page (page builders, widgets) and no longer needs jQuery
* Auto-resize works when the server setting has a trailing slash
* Estimate PDF opens in a normal tab so "Save as PDF" works

= 1.0.0 =
* Initial release
* Shortcode embed with responsive iframe
* Gutenberg block with live preview
* Admin settings page for API key and defaults
* Auto-resize via postMessage

== Releasing ==

After changing the plugin, run `npm run wp:zip` from the app root to refresh
the copy served from the dashboard (public/downloads/estimatex-calculator.zip).
