=== Junk Removal Cost Calculator ===
Contributors: andrewjedi
Tags: junk removal, calculator, booking, pricing, estimates
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed a customizable junk removal pricing calculator with item-based, truck-volume, optional AI photo estimates, and booking request options.

== Description ==

Junk Removal Cost Calculator adds a configurable estimate tool for junk removal, cleanup, hauling, and similar service websites. Visitors can estimate a job by selecting specific items, choosing a truck-volume option, or uploading job photos for an optional Junkpath AI estimate. Site owners can edit pricing, labels, colors, booking behavior, AI settings, and notification settings from WordPress admin.

The calculator works with a shortcode and includes an optional Elementor widget when Elementor is active.

= Features =

* Shortcode: `[junkreco_calculator]`
* Specific item pricing with editable categories, items, images, and prices.
* Truck volume pricing with editable load names, descriptions, images, and prices.
* Optional Junkpath AI Photo Estimator with server-side API key handling.
* Client-side image optimization for AI estimator photos before upload.
* Junkpath account tools that automatically load estimator settings and extra fees after an API key is saved.
* Booking button that can redirect to a URL or open a built-in request form.
* Built-in request form with configurable recipient email, field visibility, required fields, optional ZIP code eligibility, optional photo uploads, and optional success redirect.
* Design controls for colors, typography, sizing, radius, shadow, and a mobile preview.
* Optional Elementor widget for easier page-builder placement.
* No JavaScript build step. Junkpath is optional and only used when the AI Photo Estimator is configured and enabled.

== Installation ==

1. Upload the plugin zip through **Plugins > Add New > Upload Plugin**, or upload the plugin folder to `/wp-content/plugins/`.
2. Activate **Junk Removal Cost Calculator**.
3. Go to **Settings > Junk Calculator** to configure pricing methods, catalog items, truck-volume pricing, AI settings, design, and booking behavior.
4. Add `[junkreco_calculator]` to any page or post.

== Frequently Asked Questions ==

= Does this plugin require an external service? =

No for item-based pricing, truck-volume pricing, settings, and the built-in booking form. The optional AI Photo Estimator requires a Junkpath account and API key. When enabled, estimate photos are optimized in the browser, then photos and optional notes are sent server-side to the Junkpath API.

= Can I use my own booking form instead? =

Yes. Set the booking action to redirect and enter the booking URL in **Settings > Junk Calculator > Booking Form**. You can also override the URL per shortcode with `booking_url`.

= Can I customize the prices and items? =

Yes. Use **Settings > Junk Calculator > Specific Item Pricing** and **Truck Volume Pricing** to edit the default rows or add your own.

= Does it work with Elementor? =

Yes. The shortcode works in Elementor's Shortcode widget. When Elementor is active, the plugin also registers a native **Junk Removal Calculator** widget.

= Does the built-in booking form store personal data? =

The built-in booking form sends the submitted request details to the configured recipient email using `wp_mail()`. Optional uploaded photos are attached to the email and removed from temporary storage after the email attempt.

When the optional AI Photo Estimator is enabled, photos uploaded for the AI estimate are sent to Junkpath to generate the estimate. Booking form photo attachments still use WordPress email delivery.

== Screenshots ==

1. Front-end item-based calculator with selected items, total price, and booking button.
2. Truck-volume estimator with load-size pricing cards and selected estimate.
3. Admin settings screen for pricing methods, shortcode placement, and configuration tabs.

== Changelog ==

= 1.0.2 =
* Add an optional Junkpath AI Photo Estimator pricing method with server-side API key handling.
* Add AI estimate photo uploads with browser-side image optimization before photos are sent to WordPress and Junkpath.
* Add Junkpath account-management controls that automatically load pricing settings, truck settings, and extra fees after an API key is saved.
* Show Junkpath-detected extra fees in AI estimate results and booking request summaries.
* Derive Junkpath extra-fee unit prices from plain-English fee instructions so admins do not need a duplicate price field.
* Show uploaded photo thumbnails in the AI estimate result and add a Start a new estimate button.
* Replace selected-photo filename/count lists with thumbnail previews that include an overlay remove button.

= 1.0.1 =
* Fix default catalog image normalization so admin item rows and frontend output replace bundled placeholder SVGs with bundled WebP catalog images.
* Improve mobile responsiveness across the calculator, method selector, truck-volume cards, and booking form.
* Add an interactive mobile preview to the Design & Branding settings tab.
* Remove empty booking photo placeholders and show uploaded previews only after photos are selected.
* Rename the photo upload button to Add Photos.
* Prevent the admin mobile preview booking button from saving WordPress settings.
* Add Booking Form guidance for WordPress/PHP upload limits and warn admins when the server limit is under 5 MB.
* Replace the search field icon with a cleaner SVG icon.
* Add dedicated Design & Branding controls for option button backgrounds and text colors.
* Show six popular items and an alphabetical All Items browser paged six at a time.
* Use file-based asset versions so CSS and JavaScript changes refresh reliably while the plugin remains version 1.0.1.
* Improve Design & Branding admin responsiveness so settings collapse cleanly on narrower WordPress admin screens.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 1.0.2 =
Adds the optional Junkpath AI Photo Estimator, browser-side AI photo optimization, Junkpath settings and extra-fee sync, detected extra-fee display, and cleaner thumbnail photo removal.

= 1.0.1 =
Improves mobile layout, default images, admin preview behavior, photo uploads, search icon rendering, and upload-limit guidance.

= 1.0.0 =
Initial public release.
