=== 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.1.0
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.

Choose from five responsive calculator templates—Classic Split, Focused Steps, Visual Catalog, Pricing Ledger, and Quote Workspace—without changing your pricing, content, or branding. Set a template globally, override it for individual shortcodes or Elementor widgets, and preview it interactively at laptop, iPad, and phone widths before saving.

When visitors continue from a Junkpath AI estimate into the built-in booking form, their optimized estimate photos and the key price, volume, and detected-item details follow into the booking request automatically.

= 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.
* Five responsive calculator templates: Classic Split, Focused Steps, scrollable Visual Catalog, Pricing Ledger, and Quote Workspace.
* Design controls for colors, typography, sizing, radius, shadow, and interactive laptop, iPad, and phone previews.
* 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.

= Optional Junkpath Service =

The AI Photo Estimator is an optional integration with [Junkpath](https://junkpath.com/), a hosted service that analyzes job photos and returns an estimated junk volume and price. A Junkpath account and API key are required. See the [Junkpath API documentation](https://junkpath.com/api-docs).

No visitor data is sent to Junkpath unless a site administrator saves a Junkpath API key, enables the AI Photo Estimator, and a visitor chooses to submit an AI estimate. When used, the plugin sends the visitor's optimized job photos and optional notes to Junkpath through a server-side request. Junkpath returns estimate details such as price, volume, detected items, and applicable extra fees. The plugin does not expose the saved API key to frontend JavaScript.

Administrators can also use the AI Photo Estimator settings tab to load or update Junkpath account configuration, pricing, truck settings, and extra-fee rules. Those actions send the saved API key and the settings an administrator explicitly loads or saves through authenticated server-side requests; they do not send visitor booking details.

== 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.

= Can I use a different calculator layout? =

Yes. Choose one of five Calculator Templates under **Settings > Junk Calculator > Design & Branding**. The current Classic Split design remains the default. Focused Steps, Visual Catalog, Pricing Ledger, and Quote Workspace provide different interaction and layout styles while preserving your saved branding controls. Visual Catalog displays every category in a vertical scroll area without pagination arrows. You can also override the template per shortcode with `template` or select a template in the native Elementor widget.

= What happens to AI estimate photos when a visitor requests pickup? =

When a visitor continues from an AI estimate into the built-in booking form, the same optimized photos appear in the booking summary and are attached to the configured booking email. WordPress removes its temporary attachment copies after the email attempt.

= 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 specific item-based pricing with selected items, running total, and booking button.
2. Front-end truck volume-based pricing with load-size cards and selected estimate.
3. Built-in booking request form with estimate summary, contact details, address, schedule, and job options.
4. AI Photo Estimator with uploaded job photo, notes, and estimate request workflow.
5. General settings tab with pricing method controls and shortcode examples.
6. Design & Branding settings tab with five calculator templates, color, typography, layout, and interactive laptop, iPad, and phone preview controls.
7. Specific Item Pricing settings tab with editable item categories, sub-items, images, and prices.
8. Booking Form settings tab with booking action, email delivery, copy, fields, ZIP eligibility, and photo upload options.
9. Truck Volume Pricing settings tab with editable load sizes, descriptions, images, and prices.
10. AI Photo Estimator settings tab with Junkpath connection, frontend copy, photo limits, and account tools.

== Changelog ==

= 1.1.0 =
* Add four new responsive calculator templates alongside Classic Split: Focused Steps, Visual Catalog, Pricing Ledger, and Quote Workspace.
* Add global template selection with per-shortcode and Elementor template overrides.
* Make Visual Catalog display every category in one arrow-free vertical scroll area while preserving browsing position and keyboard focus.
* Upgrade Design & Branding with interactive 1200 px laptop, 768 px iPad, and 390 px phone previews.
* Carry AI estimate photos into the built-in booking request and attach them to the booking notification email.
* Add a streamlined AI booking summary with estimated price, cubic yards, detected items, and photo thumbnails.
* Improve responsive embeds, keyboard focus visibility, high-contrast support, and reduced-motion behavior.
* Add suggested WordPress privacy-policy text for booking requests and the optional Junkpath data transfer.
* Remove saved AI estimator settings when the plugin is uninstalled.

= 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.1.0 =
Adds four new calculator templates, an arrow-free Visual Catalog, laptop/iPad/phone previews, and a smoother AI estimate-to-booking handoff.

= 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.
