=== Advanced Appointment Booking ===
Contributors:      yourwordpressusername
Tags:              appointment, booking, scheduler, elementor, calendar
Requires at least: 5.9
Tested up to:      6.5
Requires PHP:      7.4
Stable tag:        1.0.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

A fully dynamic, Elementor-based appointment booking system with a backend-driven form engine, multi-step flow, and advanced style controls.

== Description ==

**Advanced Appointment Booking** is a SaaS-level booking plugin that gives your visitors a smooth, professional, multi-step appointment booking experience — all powered by a no-code backend configuration system.

### ✨ Key Features

**Multi-Step Booking Flow**
A clean 4-step experience: Service Selection → Date & Time → Customer Information → Summary & Confirmation.

**Elementor Widget**
A first-class Elementor widget with full design controls: colors, typography, border radius, button styles, card styles, themes, compact mode, and more.

**Backend-Driven Dynamic Form Engine**
All customer form fields are configured from the WordPress admin. Add, remove, or reorder fields without touching a single line of code. Supports: Text, Email, Phone, Number, Textarea, Select, Radio, Checkbox, Date.

**Smart Time-Slot Engine**
Working hours are fully configurable. Slots are calculated based on service duration and already-booked appointments are automatically blocked.

**5 Built-In Themes**
Modern Blue (SaaS), Minimal White, Green Clinic, Dark Mode Pro, Custom Brand.

**Feature Flag System**
Toggle Service Filter Search, Email Notifications, SMS Notifications (integration-ready), Multi-Service Booking, and Payment Integration from one backend screen.

**Email Notifications**
HTML email notifications sent to both the admin and customer on new bookings. Fully customizable subjects and a rich placeholder system.

**REST API**
Full REST API (`/wp-json/aab/v1/`) for services, slots, form fields, and booking creation — ready for headless or mobile integrations.

**WordPress.org Standards**
Built to meet all WordPress.org plugin review guidelines: proper sanitization, escaping, nonces, capability checks, and `$wpdb->prepare()` throughout.

### 🔌 Shortcode

Not using Elementor? Use the shortcode instead:

`[advanced_booking]`

### 🔧 Requirements

* WordPress 5.9+
* PHP 7.4+
* Elementor (free) for the widget — optional, shortcode works without it

== Installation ==

1. Upload the `advanced-appointment-booking` folder to `/wp-content/plugins/`.
2. Activate the plugin through **Plugins → Installed Plugins**.
3. Go to **Appointments → Services** and add your services.
4. Go to **Appointments → Form Fields** and configure your customer form.
5. Go to **Appointments → Settings** and configure working hours, notifications, and style defaults.
6. In Elementor, search for **"Advanced Appointment Booking"** and drag the widget onto any page.

== Frequently Asked Questions ==

= Does this plugin work without Elementor? =
Yes. Use the `[advanced_booking]` shortcode on any page or post.

= Can I add custom form fields without coding? =
Yes. Go to **Appointments → Form Fields** in your WordPress admin and add, reorder, or delete fields with a drag-and-drop interface.

= How are time slots calculated? =
The plugin reads your working hours configuration and the selected service's duration to generate available slots. Already-booked slots are automatically removed.

= Can I customize the look and feel? =
Yes. In Elementor, the widget has full design controls. Outside Elementor, use the **Settings → Default Style** screen to set global colors, border radius, button style, and theme.

= Is this compatible with caching plugins? =
Yes. All dynamic data (services, slots) is fetched via the REST API, so page caching does not interfere with real-time availability.

= Does it support payment? =
A payment integration feature flag is included. Full payment gateway support (Stripe/PayPal) will be added in a future release.

== Screenshots ==

1. Multi-step booking widget — Step 1 (Service Selection)
2. Multi-step booking widget — Step 2 (Date & Time)
3. Multi-step booking widget — Step 3 (Customer Form)
4. Multi-step booking widget — Step 4 (Summary)
5. Admin — All Bookings
6. Admin — Services management
7. Admin — Form Field builder
8. Admin — Settings with Feature Flags
9. Elementor widget controls panel

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
