=== Contractor Fence Estimate Calculator ===
Contributors: quietcitydesign
Requires at least: 6.2
Requires PHP: 7.4
Stable tag: 5.1.9.5
License: GPLv2 or later

A configurable fence cost estimator with lead capture, saved submissions, email delivery, and print-ready results.

== Installation ==
1. Upload and activate the plugin ZIP in WordPress.
2. Open Fence Estimates > Settings and configure the market, rates, contractor email, and booking link.
3. Add [fence_estimate_calculator] to a page.

== Pricing model ==
The included Canada and U.S. presets are starting points based on published 2025-2026 consumer cost guides. They are not promises of local pricing. Review every rate before publishing. Base rates represent an installed fence on a straightforward, level site and are adjusted for height, style, gates, removal, posts, finish, permits, terrain, soil, access, corners, and the regional multiplier.

== CSS hooks ==
Main wrapper: .cfec
Form: .cfec__form
Steps: .cfec__step
Choices: .cfec__choice
Result: .cfec__result
Line items: .cfec__line-items
Lead form: .cfec__lead
Buttons: .cfec__next, .cfec__back, .cfec__print, .cfec__email, .cfec__book

The plugin uses WordPress preset colours and inherited fonts by default. Set --cfec-accent, --cfec-text, --cfec-bg, and --cfec-border on .cfec for custom styling.

== Changelog ==

= 1.1.9.4 =
* Added an Email Notifications settings tab with rich-text controls for the lead introduction, scheduling message and signature.
* Added a Show Scheduling Button control while allowing links inside the scheduling message.
* Added lead and contractor email previews backed by the production email renderer.
* Increased email paragraph line height and standardized the responsive email container at 700px.
* Moved shared email rendering into the QCD estimator core build source.
* Kept the settings preview focused on the lead email; contractor notifications remain fully templated without a preview.
* Added an optional Media Library logo at the top of the lead email and enabled Add Media in the signature editor.
* Preserved rich-text editor paragraph breaks and added reliable spacing before the email signature with or without the scheduling button.
* Added a manifest-driven isolated estimator core foundation while preserving the existing shortcode, post type, settings and estimate data.
* Moved reusable settings fields, rich-text/media controls, multiplier panels and save actions into the shared admin UI core.
* Replaced the duplicated settings JavaScript with a generated prefix-aware shared admin script.
* Moved shared email-settings and Media Library control styling into a generated core stylesheet.
* Added core number-field safeguards that prevent incompatible decimal values and input steps from blocking settings saves.
= 1.9.4 =
* Renamed Product Configuration allowances heading and the Adjustments settings tab.
* Reworked the public calculator into five labelled steps.
* Let calculator h2, h3 and h4 elements inherit active theme heading typography.
* Increased the Ballpark project range label for stronger result-page hierarchy.

= 1.9.3 =
* Added an admin-only Test Estimate Form tab for checking saved pricing without saving leads, sending emails or triggering milestones.
* Added links from the setup checklist and settings save areas to the test form.

= 1.9.2 =
* Added a required City field to the final estimate contact form.
* Saved city with estimate submissions and included it in admin details and estimate emails.

= 1.9.1 =
* Updated the Start Here checklist heading case.
* Pointed the checklist Toolkit button to the main Toolkit page.

= 1.9.0 =
* Added a subtle Lead System Toolkit callout to the Start Here settings tab.
* Removed the homeowner scheduling button from contractor notification emails.
* Wrapped the contractor notification email Toolkit message in a bordered promo box.

= 1.8.9 =
* Pointed milestone notification CTA buttons to the Universal Inbox toolkit page.
* Added milestone notifications to the Fence Estimates listing page.
* Removed the static Lead System Toolkit promo from the Fence Estimates listing page.

= 1.8.8 =
* Renamed settings tabs to Business Info, Market Form, and Allowances & Adjustments.
* Updated setup checklist references to match the renamed tabs.
* Combined the multiplier explanation into one guidance block.

= 1.8.7 =
* Updated the opt-in confirmation heading and message.
* Removed the extra confirmation note below the subscribed email and date.

= 1.8.6 =
* Fixed Start Here opt-in spacing and field containment.
* Replaced the WordPress form-table layout with a contained responsive opt-in grid.

= 1.8.5 =
* Swapped the Start Here tab columns so calculator training appears first.
* Renamed Access Calculator Upgrades to Access Calculator Training.
* Aligned the opt-in button with the email field and checkbox.
* Removed the email-field helper text.

= 1.8.4 =
* Renamed the Welcome settings tab to Start Here.
* Revised the first-tab setup and opt-in copy.
* Removed the extra settings-page Toolkit promotion panel.
* Updated the opt-in button and checkbox language.

= 1.8.3 =
* Added a Welcome tab at the beginning of calculator settings.
* Moved the Quiet City Design opt-in into the Welcome tab with setup guidance and opt-in benefits.
* Kept the opt-in submission separate from calculator settings saving.

= 1.8.2 =
* Applied the highlighted Dashboard widget card treatment to all three summary boxes.

= 1.8.1 =
* Made the Dashboard widget total estimate count a larger headline metric.
* Converted the Dashboard widget footer link to a WordPress button.

= 1.8.0 =
* Added the main WordPress Dashboard Fence Estimate Activity widget.
* Added dashboard totals, estimated project value, current-month count and recent lead summary.
* Added optional Quiet City Design email opt-in on the settings page.
* Added successful opt-in confirmation state with local consent tracking.
* Added milestone detection at 10, 25, 50 and every additional 50 estimates.
* Added dismissible per-user milestone notices inside the dashboard widget.
* Added aggregate-only milestone event delivery to the Quiet City Design endpoint after successful opt-in.
* Added limited WP-Cron retry handling for failed milestone endpoint requests.
* Preserved homeowner privacy by keeping contact details out of dashboard summaries and QCD milestone payloads.

= 1.7.1 =
* Added a synchronized hexadecimal field beside the accent colour picker.
* Added a Clear option that removes the plugin override and uses the theme primary colour.

= 1.7.0 =
* Added a dynamically filtered fence-style selector to Question 2 without adding another step.
* Limited styles to choices compatible with the selected fence type.
* Removed the duplicate Decorative Details checkbox and activated the existing style multipliers.
* Removed unused 5 ft and 7 ft height multiplier controls.

= 1.6.3 =
* Displayed configured per-foot rates to two decimal places on fence option cards.
* Added an optional sales-tax setting and configurable tax rate.
* Added a customizable tax label and a clear notice when tax is not included.
* Included enabled sales tax in estimate ranges, line items, printouts, saved submissions and emails.
* Removed the redundant regional price multiplier from settings and calculations.

= 1.6.2 =
* Moved the Save Settings button to the bottom of every settings tab.

= 1.6.1 =
* Combined availability, base price and image controls into one fence-type configuration table.
* Added three disabled custom fence-type slots with editable names, prices and images.
* Added a built-in placeholder image and validation for incomplete custom products.

= 1.6.0 =
* Grouped calculator settings into Business & Market, Form Details, Product Configuration and Project Multipliers tabs.
* Added one prominent Save Settings button at the top of the page.
* Added tab-specific setup guidance and a warning before leaving with unsaved changes.

= 1.5.3 =
* Added a subtle Lead Toolkit link below Settings in the Fence Estimates admin menu.

= 1.5.2 =
* Grouped height, style, terrain, ground and accessibility multipliers into separate settings panels.
* Added plain-language calculation descriptions and visible percentage effects.
* Added a compounding multiplier example to the settings page.

= 1.5.1 =
* Updated the contextual toolkit messages on the settings and estimates pages.
* Changed the contractor email heading to identify a newly requested estimate.
* Added a welcome, ballpark reminder and site-name signature to the visitor email.

= 1.5.0 =
* Removed manual estimate creation from the WordPress admin.
* Added contextual Quiet City Design and Lead System Toolkit messaging to the settings and estimates pages.
* Added speed-to-lead and follow-up messaging to contractor notifications only.
* Added Quiet City Design author and plugin links.

= 1.4.2 =
* Added a customizable final contact-form heading.
* Added “Save and email your estimate” as the fallback heading when the setting is blank.

= 1.4.1 =
* Moved the selected fence-card border above custom images so it appears evenly around the full card.

= 1.4.0 =
* Added enable and disable controls for each fence type.
* Added WordPress Media Library image selectors and previews for fence option cards.
* Added fixed aspect-ratio cropping for custom images.
* Added server-side validation so disabled fence types cannot be submitted.

= 1.3.0 =
* Changed material cards to two columns on mobile.
* Bottom-aligned Q2 size fields and Q3 gate fields on mobile.
* Reworded the permit option around contractor-managed applications and paperwork.

= 1.2.5 =
* Forced the final contact form into one column on screens 800 pixels wide and below.

= 1.2.4 =
* Made the large form submission button the scheduling CTA.
* Added “Schedule a free on-site visit” as the fallback when its setting is blank.
* Removed the duplicate scheduling button below the print control.

= 1.2.3 =
* Prevented full-width theme input styles from stretching and misaligning project option checkboxes.

= 1.2.2 =
* Replaced unreliable theme accent detection with a required calculator colour setting.
* Applied the saved colour directly to every front-end calculator instance.

= 1.2.1 =
* Restored the original CTA and email button copy as defaults while preserving saved custom text.
* Changed the edit and print controls to white outline buttons, leaving the scheduling CTA as the only coloured result button.

= 1.2.0 =
* Tightened the default estimate range from plus or minus 25% to plus or minus 13%.
* Added customizable final-form CTA and button text.
* Added street address and required contact fields.
* Added the site-inspection scheduling link below the estimate range.
* Redirects successful submissions to the configured scheduling page.

= 1.1.3 =
* Fixed missing front-end configuration data that stopped all calculator JavaScript on the live page.
* Embedded calculator settings beside the form so script optimization cannot separate them.

= 1.1.2 =
* Changed the JavaScript asset filename to force cache invalidation after the calculator rebuild.

= 1.1.1 =
* Added a confirmation button to Question 1 instead of advancing as soon as a fence type is selected.

= 1.1.0 =
* Rebuilt the calculator as six simple, one-question screens.
* Added illustrated material choices and removed the length slider.
* Added walk-through and vehicle gate widths.
* Simplified terrain, accessibility and project option questions.

= 1.0.1 =
* Fixed nested pricing and multiplier settings not being saved.
* Fixed the length slider, number field, and step navigation JavaScript.
* Moved fence style before material and filtered incompatible materials by style.
