=== PocketBooking - Manage Appointments on the Go ===
Contributors: maksim85
Tags: appointment booking, scheduling, booking calendar, pwa, mobile booking
Tested up to: 6.9.1
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Professional booking system wich comes with its own Smartphone App (PWA) support. Manage appointments and staff easily. Includes offline access and push notifications.

== Description ==

**PocketBooking** is a professional, high-performance appointment scheduling system for WordPress. Ideal for salons, clinics, consultants, and service-based businesses.

**Key Features:**

* **Progressive Web App (PWA):** Install your booking system as a native mobile app on any device. Works offline, supports push notifications for new bookings, and provides an app-like experience with custom icons and splash screens.
* **Smart Frontend:** Responsive multi-step booking form with real-time availability, service selection, and staff assignment.
* **Powerful Backend:** Full management suite with filtering, sorting, manual bookings, and a visual dashboard with statistics.
* **Smart Search:** Quickly find bookings, services, or staff members with live search functionality. Search by name, email, phone, service, or staff member across all admin pages.
* **Quick Email Actions:** Accept or reject bookings directly from admin notification emails with styled quick-action buttons. No need to log into the backend!
* **Automatically Accept Bookings:** Optionally enable automatic booking confirmation in settings. New bookings are instantly confirmed and customers receive confirmation emails with cancellation links.
* **Push Notifications:** Receive instant notifications for new bookings directly on your mobile device (PWA mode only).
* **Dynamic Calendar Views:** Week and Day calendar views automatically adjust time slots based on your configured opening hours for optimal scheduling visibility.
* **Services & Staff:** Manage multiple services with custom durations and buffer times. Set individual working hours and profile photos for staff members.
* **Flexible Scheduling:** Manage regular weekly hours, holidays, and special opening hours that override defaults automatically.
* **Automated Communication:** Reminder and confirmation emails in 9 languages (DE, EN, IT, ES, FR, PL, RU, SV). Includes unique cancellation links for guest self-service.
* **Custom Design:** Adjust colors (background, buttons, tiles) and corner radius for both form and tiles with a live preview to match your brand. Customize form headers (date, service, employee, time, contact sections) for each language.
* **Flexible View Toggle:** Switch between table and card views in Services and Staff management pages. Card view defaults to grid layout with responsive design (2 columns on tablets, auto-fill on desktop). User preferences are saved in localStorage.
* **Booking Options per Service:** Define multiple pricing and duration variants for a single service—for example "1 Hour" at €50 and "2 Hours" at €90. Customers choose their preferred option via interactive tiles directly in the booking form, before selecting a staff member and time. Services with only one option auto-select it silently with no extra step for the customer.
* **Category-Filtered Shortcode:** Embed a booking form that shows only the services of a specific category using `[simpbook_bookingform kategorie="ID"]`. Perfect for landing pages or multi-location setups. The category shortcode is displayed directly in the Groups admin table and can be copied with a single click from the edit modal.
* **Drag & Drop Ordering for Booking Options:** Reorder booking options per service via drag & drop in the admin area. The saved order is immediately reflected in the customer-facing booking form.
* **Bulk Management:** Efficiently handle large amounts of data with bulk-delete for past or cancelled bookings and CSV export.
* **Security & Performance:** Built with WordPress best practices, featuring Nonce verification, SQL injection protection, and optimized AJAX handlers.

Professional features like iCal/ICS feeds and detailed booking analytics help you stay organized.

== Installation ==

**Installation via WordPress Dashboard (recommended):**

1. Navigate to `Plugins` > `Install` in your WordPress admin area.
2. Search for "PocketBooking".
3. Click `Install Now` and then `Activate`.
4. The setup wizard will automatically appear to guide you through the initial configuration.
5. Add the shortcode `[pocketbooking-form]` to the page where you want the form to be displayed.

**Manual Installation:**

1. Download the plugin file (`.zip`).
2. Extract the `.zip` file on your computer.
3. Upload the plugin folder to the `/wp-content/plugins/` directory on your server.
4. Go to `Plugins` in your WordPress admin area and activate "PocketBooking".
5. Add the shortcode `[pocketbooking-form]` to the desired page.

== Usage ==

=== Setup Wizard ===

After activation, the setup wizard will automatically appear to help you configure your booking system. The wizard guides you through 6 steps:

1. **Basic Information:**
   - Enter company name
   - Configure notification email address
   - Enable/disable email notifications

2. **Opening Hours:**
   - Activate weekdays for reservations
   - Set opening hours for each day
   - Configure time interval

3. **Service:**
   - Create your first service
   - Set service name, duration, and buffer time

4. **Staff:**
   - Add your first staff member
   - Set name, email, phone, and profile photo
   - Configure individual working hours (optional)

5. **Language:**
   - Select the desired language for frontend and backend
   - All texts will be automatically translated

6. **Complete:**
   - Review your settings
   - Access the dashboard to manage bookings

You can restart the setup wizard at any time by going to `PocketBooking` > `Settings` > "General" tab > "Setup Wizard" section and clicking "Reset Setup Wizard".

=== Getting Started ===

1. **Configure General Settings:**
   - Go to `PocketBooking` > `Settings` > "General" tab
   - Enter company name
   - Configure email address for notifications
   - Set maximum number of people and stay duration
   - Configure minimum advance time
   - **Appointment Reminders:** Enable/disable automatic reminder emails and set how many hours before the appointment they should be sent (1-168 hours)

2. **Set Up Opening Hours:**
   - "Opening Hours" tab > "Regular Weekly Opening Hours"
   - Activate desired weekdays
   - Set opening hours (start and end) for each day
   - Configure time interval (default: 30 minutes)

3. **Add Services:**
   - Go to `PocketBooking` > `Services`
   - Click on a service to edit or add a new one
   - Set service name, duration, and buffer time
   - Assign staff members who can perform this service

4. **Add Staff Members:**
   - Go to `PocketBooking` > `Staff`
   - Click on a staff member to edit or add a new one
   - Set name, email, phone, and profile photo
   - Configure individual working hours (optional)
   - Assign services this staff member can perform

5. **Add Holidays:**
   - "Opening Hours" tab > "Holidays & Special Opening Hours"
   - Select a date in the calendar
   - Click "Configure Selected Date"
   - Choose "Close entire day" or "Special opening hours"
   - Save settings

6. **Customize Email Templates:**
   - "Emails" tab
   - Select desired language
   - Customize subject and message for each email type:
     * Confirmation emails (sent when a booking is created)
     * Reminder emails (sent X hours before the appointment)
     * Cancellation emails (sent when a booking is cancelled)
     * Status change notifications
   - Use placeholders for dynamic content
   - Each booking automatically includes a cancellation link that guests can use to cancel their appointment

7. **Customize Design:**
   - "Design" tab
   - Select background color for the form
   - Adjust text, button, and tile background colors
   - Set corner radius for form (0-50 pixels)
   - Set corner radius for tiles (date/service/employee/time cards) separately (0-50 pixels)
   - Customize form section headers (date, service, employee, time, contact) for each language with language-specific defaults

8. **Select Language:**
   - "Language" tab
   - Select desired language for frontend and backend
   - All texts are automatically translated

9. **Embed Form:**
   - Create a new page or edit an existing one
   - Add the shortcode `[pocketbooking-form]`
   - Publish the page

=== Managing Bookings ===

**Dashboard:**
- Go to `PocketBooking` > `Dashboard`
- View overview statistics for today and this week
- See booking status breakdown (Confirmed, Pending, Cancelled)
- Quick access to common actions (New Booking, Settings, etc.)
- Display of the shortcode for embedding the booking form
- Automatically shown after completing the setup wizard

**Booking List:**
- Go to `PocketBooking` > `Bookings`
- Use filters to display specific bookings (All, Pending, Today, Upcoming, Past, Cancelled)
- **Quick Search:** Use the search field to find bookings by name, email, phone, service, or staff member
- Sort by various criteria
- Click on a booking to view details and change status
- Edit or delete bookings directly from the modal
- **Bulk Actions:** On "Past" and "Cancelled" tabs, select multiple bookings with checkboxes and delete them all at once with a single confirmation

**Services Management:**
- Go to `PocketBooking` > `Services`
- **Quick Search:** Find services by name, category, or description
- Switch between table and card views
- Click on a service to edit details or add a new one
- In the service edit modal, open the **"Booking Options"** tab to assign available options (duration + price variants) to this service

**Booking Options Management:**
- Go to `PocketBooking` > `Services` > `Options`
- Create global booking options with a name and duration (e.g. "1 Hour" = 60 minutes)
- Assign options to individual services via the service edit modal, setting a per-service price for each option
- Drag & Drop to reorder options — the order is saved instantly and displayed to customers in the booking form
- Enable/disable the entire booking options feature under `PocketBooking` > `Settings` > "Services" tab

**Staff Management:**
- Go to `PocketBooking` > `Staff`
- **Quick Search:** Find staff members by name, email, or phone
- Switch between table and card views
- Click on a staff member to edit details or add a new one

**Add Manual Booking:**
- Go to `PocketBooking` > `New Booking`
- Fill in all fields
- Select service, staff member, date and time
- Optional: Send email confirmation to guest
- Click "Create Booking"

**Calendar View:**
- Go to `PocketBooking` > `Calendar`
- View all bookings in a calendar format
- Filter by service and staff member
- Subscribe to calendar feed (iCal/ICS)

**Statistics:**
- Go to `PocketBooking` > `Statistics`
- View booking statistics and cancellation rates

**CSV Export:**
- Go to `PocketBooking` > `Bookings`
- Optionally select a filter
- Click "Export CSV"
- The file will be downloaded

== Frequently Asked Questions ==

= What is the Progressive Web App (PWA) feature? [PRO] =

The PWA feature allows you to install your booking system as a native app on any mobile device or desktop. Benefits include:
- **Offline Access:** Access your booking system even without an internet connection
- **Push Notifications:** Receive instant notifications for new bookings on your device
- **App-Like Experience:** Full-screen mode, custom app icon, and splash screen
- **Fast Performance:** Optimized loading times and smooth navigation
- **No App Store Required:** Install directly from your website with one click

To enable PWA, go to `PocketBooking` > `Settings` > "App" tab and configure your app name, icons, and push notifications.

= How do I install the app on my device? [PRO] =

**On Android/Chrome:**
1. Open your WordPress admin panel in Chrome
2. Look for the "Install" prompt in the address bar or click the menu (⋮) > "Install app"
3. Confirm installation

**On iOS/Safari:**
1. Open your WordPress admin panel in Safari
2. Tap the Share button (□↑)
3. Scroll down and tap "Add to Home Screen"
4. Tap "Add"

The app icon will appear on your home screen like any other app.

= Do push notifications work on all devices? [PRO] =

Push notifications require:
- HTTPS connection (SSL certificate)
- Supported browser: Chrome, Edge, Firefox, Samsung Internet (iOS Safari does not support push notifications)
- User permission to show notifications
- PWA app installed on the device

Push notifications are configured in `PocketBooking` > `Settings` > "App" tab > "Push Notifications" section.

= How many languages are supported? =

The plugin supports 9 languages: German (DE), English (US, UK), Italian (IT), Spanish (ES), French (FR), Polish (PL), Russian (RU), and Swedish (SV). English US is also available with 12-hour AMPM time format. Push notifications are automatically translated based on your selected language.

= How do I add the booking form to my website? =

Add the shortcode `[pocketbooking-form]` to the text editor of any page or post.

= Can I customize the form colors? =

Yes. Go to `PocketBooking` > `Settings` > "Design" tab. There you can adjust the background, text, button, and tile background colors as well as the corner radius.

= How do I set a day off, e.g. Monday? =

Go to `PocketBooking` > `Settings` > "Opening Hours" tab > "Regular Weekly Opening Hours". Simply uncheck "Allow reservations on this day" for "Monday" and save the changes.

= How do I close my business for a specific holiday? [PRO] =

Go to `PocketBooking` > `Settings` > "Opening Hours" tab > "Holidays & Special Opening Hours". Select the desired date in the calendar and click "Configure Selected Date". Make sure the "Close entire day" option is selected and save the settings.

= How do I set special opening hours for a day, e.g. December 24 from 2-6 PM? [PRO] =

Go to `PocketBooking` > `Settings` > "Opening Hours" tab > "Holidays & Special Opening Hours". Select the date (e.g. December 24) in the calendar, click "Configure Selected Date", choose "Special opening hours" and enter the times (14:00 - 18:00). Save the settings.

= Which languages are supported? =

The plugin supports 9 languages: German, English (US, UK), Italian, Spanish, French, Polish, Russian, and Swedish. The default language on first installation is English.

= How do I change the plugin language? =

Go to `PocketBooking` > `Settings` > "Language" tab and select the desired language. After saving, the entire interface will be displayed in the new language.

= Are emails sent in the selected language? =

Yes. Emails are automatically sent in the language selected in the plugin settings. You can create separate email templates for each language.

= Can I design email templates differently for different languages? =

Yes. Switch to the desired language in settings and customize the email templates. Each language has its own templates.

= How do reminder emails work? [PRO] =

Reminder emails are automatically sent to guests X hours before their appointment. You can configure this in `PocketBooking` > `Settings` > "General" tab > "Appointment Reminders" section. Enable or disable reminders and set the number of hours (1-168) before the appointment when the reminder should be sent. Reminder emails use their own templates (customizable in the "Emails" tab) and include a cancellation link for guests.

= How can guests cancel their bookings? [PRO] =

Each booking receives a unique cancellation token. A cancellation link is automatically included in confirmation and reminder emails. Guests can click this link to cancel their booking directly from the frontend. After cancellation, both the guest and the administrator receive a cancellation confirmation email.

= What is the setup wizard? =

The setup wizard is an interactive guide that appears automatically after plugin activation. It helps you configure the basic settings of your booking system in 6 steps: Basic Information, Opening Hours, Service, Staff, Language, and Completion. You can restart the wizard at any time from `PocketBooking` > `Settings` > "General" tab.

= How does availability checking work? =

The system considers:
- Regular opening hours of the weekday
- Special opening hours for the selected date (if available)
- Existing bookings
- Service duration and buffer time
- Staff member availability and individual working hours
- Maximum number of people
- Stay duration per booking
- Minimum advance time

= Can I accept or reject bookings directly from emails? =

Yes! Each admin notification email for a new booking contains three styled quick-action buttons:
- **Accept** - Immediately accepts the booking
- **Reject** - Rejects the booking
- **View** - Opens booking details in the backend

The buttons are styled like frontend tiles for a consistent look and allow you to manage bookings without opening the WordPress admin panel. You must be logged in to use these buttons.

== Screenshots ==

1. The user-friendly, multi-step booking form in the frontend with service and staff selection.
2. The clear booking list in the admin area with filter options and clickable rows.
3. The calendar view showing all bookings in a visual calendar format.
4. The services management page with service details and staff assignments.
5. The staff management page with individual working hours configuration.
6. The settings page for regular weekly opening hours.
7. [PRO] The management of holidays and special opening hours.
8. The design settings with color selection and corner radius for the form.
9. The email template management with language selection.
10. The language selection with 9 supported languages.
11. The statistics page with booking analytics.
12. The setup wizard guiding through initial configuration.
13. [PRO]The calendar view showing all bookings in the Smartphone. 
14. The dashboard overview with statistics and quick actions.
15. The App settings tab where you can configure your own smartphone app. (Pro)
16. Smartphone app dashboard view. (Pro)
17. Smartphone app calendar view. (Pro)
18. Reservation list in the smartphone app. (Pro)

== Changelog ==

= 1.4.0 =
* FIXED: Plugin update indicator not clearing after a WordPress update — after installing an update, WordPress re-ran the update check within the same PHP request using the old in-memory version, causing the stale API response ("update_available: true") to be re-cached. The updater now detects when the cached "latest version" is already <= the currently installed version, discards the stale transient immediately, and reports no pending update to WordPress.

= 1.3.9 =
* FIXED: UTF-8 BOM (0xEF 0xBB 0xBF) introduced into `includes/helpers.php` caused all AJAX requests to fail on production – "headers already sent" on plugin activation, "Fehler beim Laden der Mitarbeiter", and "Error saving" in the form builder. BOM removed.
* FIXED: Form builder displayed no fields (name, e-mail, phone) when the `simpbook_form_fields_config` DB option contained an empty fields array (written by a failed/corrupt previous save). `simpbook_get_form_fields_config()` now always ensures the three system fields are present, prepending any that are missing.
* FIXED: Saving the form builder could strip system fields if they were absent from the submitted config – the save handler now always prepends missing system fields before writing to the database.

= 1.3.8 =
* NEW: Custom Form Builder – administrators can define custom fields (text, textarea, checkbox, select, radio) per service in Settings > Form Builder. Fields appear in the booking form contact step and are validated in real-time.
* NEW: Custom field values are stored in the database (`custom_fields` column, added via automatic migration on update) and displayed in the booking detail view.
* NEW: Custom field values are included in guest confirmation emails via the `{message}` placeholder – each field's label and value is listed cleanly without a hardcoded prefix.
* NEW: HTML email system for guest confirmation emails – styled with company branding, logo, accent colour, and a fully responsive layout.
* NEW: Admin notification email redesigned as HTML with the same branding system, including Accept / Reject / View quick-action buttons.
* NEW: Email logo upload in Settings > Emails tab; live preview of the rendered HTML email is shown in the Design preview panel.
* IMPROVED: Design tab preview now renders the complete 4-step booking form (date → service/options → staff/time → summary) instead of only the contact step.
* IMPROVED: Booking form Step 4 summary now displays all custom field values entered by the customer before submission.
* FIXED: Hardcoded message label ("Ihre Nachricht:", "Your message:", and 8 other language equivalents) removed from all 10 language `bestaetigungs_nachricht` email template defaults – custom field output now appears as a clean block without an unwanted prefix.
* FIXED: Admin notification email no longer shows a hardcoded "Nachricht: Keine Nachricht angegeben" line – the message/custom-fields block is only included when content is present.

= 1.3.7 =
* Fixed plugin updates not being available during the trial period — the update checker now uses `simpbook_has_full_access()` instead of `simpbook_is_trial_period_active()`, covering valid license, active trial, and fresh installs (trial never started) alike.
* Fixed empty message line appearing in guest notification emails when the registrant left the message field blank — lines containing `{message}` or `{nachricht}` are now stripped from the template when no message was entered.

= 1.3.6 =
* IMPROVED: Settings page tab navigation redesigned as a pill-bar (dark blue background, rounded pill labels) – cleaner visual separation between tabs and content.
* IMPROVED: Settings page checkboxes converted to animated toggle switches for a modern, app-like UI.
* FIXED: Vacation period save bug – the POST handler was reading the wrong array key (`of` instead of `von`) causing vacation start dates to not be saved correctly.
* FIXED: Admin button icon/text vertical alignment – all buttons now use `inline-flex` + `align-items: center` for consistent icon and label alignment across all screen sizes.
* FIXED: Delete/trash buttons in modals were rendered grey instead of red due to the modal's generic `.button` rule overriding the delete colour – added scoped override rules with sufficient specificity.

= 1.3.5 =
* FIXED: Plugin activation warning "Das Plugin erzeugte 3 Zeichen mit unerwarteter Ausgabe" resolved – traced to PHP file header corruption (missing `<?php` tag) introduced during a bulk find-and-replace operation using a BOM-writing UTF-8 encoder.
* FIXED: `class-simpbook-db-reservierungen.php` had its PHP opening tag corrupted (`<?php` → `hp`) causing all AJAX handlers in the plugin to fail with "Ein unbekannter Fehler ist aufgetreten" – file header restored correctly.
* FIXED: BOM (Byte Order Mark, 0xEF 0xBB 0xBF) silently introduced into multiple PHP files by a PowerShell bulk-replace using `[System.Text.Encoding]::UTF8` – all affected files cleaned to BOM-free UTF-8.

= 1.3.4 =
* FIXED: German (de_DE) calendar and datepicker displayed month names in English – "March" is now correctly "März" and all month short names updated accordingly.
* FIXED: German (de_DE) weekday names in the datepicker were English (Sunday–Saturday) – replaced with correct German names (Sonntag–Samstag) including short (So–Sa) and min variants.
* FIXED: Einstellungen and Mitarbeiter-Bearbeiten admin pages passed hardcoded English day/month names to the datepicker instead of using the language-aware helper functions – both now use `simpbook_get_datepicker_month_names()` / `simpbook_get_datepicker_day_names()` consistently.
* CHANGED: Database table renamed from `{prefix}reservierungen` to `{prefix}buchungen` for cleaner, conflict-free namespacing.
* NEW: Automatic migration script added – on first admin load after update the old `{prefix}reservierungen` table is atomically renamed to `{prefix}buchungen` via `RENAME TABLE`, preserving all existing data, indexes, and constraints. No data loss.

= 1.3.3 =
* NEW: Added translations for "Confirmation Header" and its description to all 9 supported language files (de_DE, en_GB, en_US_AMPM, es_ES, fr_FR, it_IT, pl_PL, ru_RU, sv_SE) – both the POT template and all PO/MO binaries.
* IMPROVED: The `en_US_AMPM.l10n.php` PHP translation cache updated with both new strings.

= 1.3.2 =
* NEW: Configurable "Confirmation Header" for the booking form's final summary step – available in the Design settings (8th header card). Administrators can now customize the header text for each language.
* FIXED: The booking form's last step header "Confirm Your Reservation" was hardcoded in English – it now uses the same configurable header system as all other form steps, with language-specific defaults (e.g. "Buchung bestätigen" for German).

= 1.3.1 =
* FIXED: Admin notification email for German (de_DE) showed all field labels in English – "phone", "Date", "Time", "Service", "Staff", "Booking Option", "Price", "Message", and "No message provided" are now correctly displayed in German (Telefon, Datum, Uhrzeit, Dienstleistung, Mitarbeiter, Buchungsoption, Preis, Nachricht, Keine Nachricht angegeben).
* FIXED: "Reject" quick-action button in German admin notification emails was hardcoded in English – now correctly displays "Ablehnen".
* FIXED: Polish (pl_PL) admin email label for phone was hardcoded as English "phone" – now correctly "Telefon".
* FIXED: Swedish (sv_SE) admin email labels for phone ("phone") and date ("Date") were not translated – now correctly "Telefon" and "Datum".

= 1.3.0 =
* FIXED: German email subject lines for "Booking confirmed", "Booking request received" and "Appointment reminder" were incorrectly stored in English – all three are now correctly in German.
* FIXED: Swedish (sv_SE) and Russian (ru_RU) email templates were completely missing from the defaults array, causing all emails to fall back to English – both languages now have full templates for all 5 email types.
* FIXED: British English (en_GB) email templates were missing and silently falling back to US English – en_GB now has its own dedicated template set.
* FIXED: Language validation whitelist (`$valid_languages`) in `helpers.php` and the AJAX template handler excluded `en_GB`, `ru_RU` and `sv_SE`, causing them to be remapped to `en_US` before template lookup – all supported languages are now included.
* NEW: Added "90 minutes" as a selectable time interval option in the booking settings.

= 1.2.9 =
* IMPROVED: Country flags in the phone number prefix selector are now served locally from the plugin (`assets/flags/*.svg`) instead of being loaded from an external CDN – improves privacy, offline reliability, and removes external HTTP requests.

= 1.2.8 =
* FIXED: Removed `margin-right: 80px` from `.reservierung-container` in mobile view (`@media max-width: 768px`) – container now uses correct responsive padding (`padding-right: 10px`, `padding-left: 10px`) without unintended right margin cutting off the layout.

= 1.2.7 =
* NEW: Vacation & Season Management – define closed periods (e.g. holiday, seasonal break) that automatically block all included days for bookings.
* IMPROVED: Datepicker color-coding in backend booking pages (Neue Reservierung, Reservierung Bearbeiten) – vacation days shown in orange, special closed days in red, disabled weekdays in gray.
* FIXED: Datepicker color classes for disabled days were overridden by WordPress jQuery UI styles – now injected via `wp_add_inline_style` after jQuery UI to ensure correct rendering.
* NEW: Translations for all Vacation & Season Management strings added for all 9 supported languages (de_DE, en_GB, en_US, en_US_AMPM, es_ES, fr_FR, it_IT, pl_PL, ru_RU, sv_SE).

= 1.2.6 =
* FIXED: Datepicker prev/next navigation buttons in `mr-tischreservierungen-pro` used wrong CSS variable `--simpbook-button-color` instead of `--reservierung-button-color` – corrected across all 4 datepicker CSS files.
* FIXED: Disabled datepicker days in `mr-tischreservierungen-pro` used wrong background variable (`--simpbook-tile-bg` or `--reservierung-container-bg`) instead of `--reservierung-tile-bg` – corrected across all 4 datepicker CSS files.
* FIXED: Prev/next arrow icons in `mr-tischreservierungen-pro` frontend datepicker (`formular-style.css`) were rendered via `mask-image` with the text color, making them barely visible on the colored button – replaced with `background-image` white SVG, consistent with all other datepicker CSS files.
* IMPROVED: Prev/next navigation buttons in `mr-tischreservierungen-pro` now display as a square with rounded corners (`padding: 4px`, `border-radius: 4px`, `align-self: center`) instead of a tall stretched rectangle. Applies to all 4 datepicker CSS files.

= 1.2.5 =
* FIXED: Profile photo (Profilfoto) in staff edit form was not saved automatically when selecting via media library - caused by a wrong jQuery selector (`#profilfoto_url` instead of `#simpbook_profilfoto_url`). Photo is now correctly written to the hidden field on selection.
* FIXED: Mobile media library button (`#upload_foto_button-mobile`) in staff edit form had no JavaScript handler - photo selection now works correctly on mobile view as well.
* FIXED: Date selection tiles (Heute / Morgen / Anderes Datum) displayed in 4 columns on wide containers instead of the intended 3 - grid changed to `repeat(3, 1fr)` with centered max-width.
* IMPROVED: Datepicker prev/next navigation buttons now use `background-color: var(--simpbook-button-color)` with consistent left/right margins across all CSS files (formular-style.css, dienstleistungen.css, einstellungen-inline.css, neue-reservierung.css, reservierung-bearbeiten.css, mrtr formular-style.css).
* IMPROVED: Disabled datepicker days (`ui-state-disabled`) now consistently use `background-color: var(--simpbook-tile-bg, #f5f5f5)` across all CSS files instead of mixed hardcoded or container-bg values.
* IMPROVED: Service duration (e.g. "30 Min.") no longer shown in the staff member service assignment list - only service name and category are displayed.
* IMPROVED: Service assignment list in staff edit form is now sorted by category order (as defined under Groups/Gruppierungen) with visible group headers and separators.
* IMPROVED: Services marked as "Ohne Mitarbeiter" (no staff required) are no longer displayed in the staff member service assignment list.

= 1.2.4 =
* NEW: `{booking_preis}` placeholder for email templates - displays the booked price (booking option price or service base price) in customer-facing confirmation, reminder, and status-change emails. All 7 language default templates have been updated to include the price line automatically.
* NEW: Price shown in booking form summary (Step 4) - the selected price (booking option price or service base price) is now displayed in the pre-submission summary, so customers see the final price before confirming.
* NEW: Price line in admin notification email - the admin HTML notification email now shows the price below the booking option (or service base price when no option is selected), in the correct language.
* NEW: Per-service availability configuration - Each service can now define its own availability mode directly in the service edit modal: use global opening hours, set custom weekly opening hours (Reguläre Öffnungszeiten), or manage individual date/time slots (Spezielle Termine). This allows fine-grained scheduling control per service.
* NEW: Special appointment datepicker with visual closed-day indicators - Past dates are blocked (not selectable); globally excluded dates are highlighted in red; regularly closed weekdays in orange; backend-configured special Schließtage also marked in red. All marked dates remain clickable for admin override purposes.
* NEW: Special dates list sorted chronologically - Entries in the Spezielle Termine list are automatically sorted by date (earliest first) when loading and after each new entry is added.
* FIXED: Standalone services (no staff required) no longer block time slots for other standalone services - availability is now correctly scoped per service, so each standalone service (e.g. each rental boat) has independent availability.
* FIXED: UTF-8 BOM removed from core PHP files (class-simpbook-db-reservierungen.php, helpers.php) - these hidden BOM bytes were corrupting all AJAX responses, causing the Media Library, Staff, and Booking Options admin pages to fail globally.
* IMPROVED: Mutual exclusivity between "No staff required" and staff assignment in the service modal - checking "No staff required" disables and clears all staff checkboxes; selecting any staff member disables the "No staff required" option. Both states are correctly restored when editing an existing service.
* IMPROVED: Service edit modal layout - the image upload row is now positioned above the Booking Options section for better visual flow.

= 1.2.3 =
* IMPROVED: Button design settings now include text color and corner radius controls for the booking form buttons, with live preview support.
* IMPROVED: Service tiles now display smarter booking option info — tiles with multiple options show the option count (e.g. "3 Options") with a clock icon; tiles with exactly one option display that option's duration and price directly; services without options behave as before. Single-option services skip the option selection step entirely.
* FIXED: Duplicating a service now copies all related data 1:1 — including assigned staff members, the "No staff required" setting, and all booking options with their individual prices.

= 1.2.2 =
* FIXED: White bar appearing on frontend pages when plugin is active - caused by UTF-8 BOM (Byte Order Mark) in language files (l10n.php). BOM has been removed from all 9 affected translation files.

= 1.2.1 =
* FIXED: White page / blank screen when clicking "Check for Updates" - removed server-side redirect that failed on some hosting configurations; the settings page now renders fresh update data inline without any redirect.

= 1.2.0 =
* FIXED: JavaScript error "Cannot read properties of undefined (reading 'trim')" on pages where the booking form is not displayed - the country code selector (phone input) now only initialises when the form is actually present in the DOM.
* FIXED: White page / blank screen when clicking "Check for Updates" in settings - the update check no longer performs a live HTTP request during page rendering. The fresh API call now runs before the redirect and results are read from cache on the settings page.

= 1.1.8 =
* NEW: Category-Filtered Shortcode - Use `[simpbook_bookingform kategorie="ID"]` to embed a booking form that shows only the services of a specific category. Match by category ID or name (case-insensitive). The ready-to-use shortcode is displayed in the Groups table and can be copied with a single click from the category edit modal.
* NEW: Booking Options per Service - Define multiple duration/price variants for a single service (e.g. "1 Hour" at €50, "2 Hours" at €90). Customers select their preferred option via interactive tiles in the booking form, before choosing a staff member and time slot.
* NEW: Smart booking option display logic - Services with no options or a single option skip the option step entirely (single option is auto-selected). Services with two or more options show a dedicated named-tile selection step.
* NEW: Booking option duration used for time calculation - When a customer selects a booking option, its specific duration overrides the default service duration for accurate real-time availability checking.
* NEW: Drag & Drop reordering for booking options in the admin area - Reorder options per service or globally. Order is saved instantly and reflected in the customer-facing booking form.
* NEW: Dedicated "Options" management page under Services menu (visible only when the feature is enabled in settings)
* NEW: Booking Options feature toggle in Settings > Services tab - Enable or disable the entire feature with a single switch
* IMPROVED: Service card in the booking form no longer shows "0 Min." when the service uses booking options (duration varies by chosen option)
* NEW: Drag & Drop reordering for services in card view - Drag services within their category group to change the display order. Order is saved instantly and affects both admin view and frontend booking form.
* NEW: Dedicated settings page for services (Services > Settings) - Service-specific options like "Show service duration" have been moved here for better organization.
* NEW: Live preview of the booking form in the backend design settings - See color and style changes in real time without switching to the frontend.
* IMPROVED: "Closed" days tooltip in opening hours settings now displays correctly on hover.
* IMPROVED: Service card layout switched to Flexbox for better drag-and-drop compatibility and responsive behavior.

= 1.1.6 =
* NEW: Automatic update system integrated - Plugin updates are now automatically detected from the Mobile-Refuel license server
* NEW: Update notification in admin settings showing available updates with version information
* NEW: Manual update check button to immediately search for new versions
* NEW: License validation before update download to ensure only active licenses can update
* NEW: Support period check - Updates only available with active support
* NEW: 12-hour cache for update checks to optimize server performance
* IMPROVED: Update information displayed in Settings > General tab with current version and update status

= 1.1.5 =
* NEW: [PRO] Progressive Web App (PWA) support - Install as native mobile app
* NEW: [PRO] Push notifications for new bookings (PWA mode with HTTPS required)
* NEW: [PRO] Custom app icons (192x192, 512x512) and splash screens
* NEW: [PRO] PWA-optimized mobile interface with bottom navigation
* NEW: [PRO] App installation prompt with custom overlay
* NEW: [PRO] Multilingual push notifications (9 languages)
* NEW: Swedish language support (sv_SE)
* NEW: Russian language support (ru_RU)
* NEW: [PRO] Automatically accept bookings option in settings - Skip manual confirmation and instantly confirm new bookings
* NEW: Service categories/grouping system - Organize services into custom categories
* NEW: Category display in services table with colored badges
* NEW: Card view grouped by category for better service organization
* NEW: Category names shown in staff assignment view (e.g., "Haircut (30 Min.) - Men")
* NEW: Delete confirmation for categories shows linked services count
* NEW: Live search functionality for bookings - Search by name, email, phone, service, or staff member
* NEW: Live search functionality for services - Search by name, category, or description
* NEW: Live search functionality for staff - Search by name, email, or phone
* NEW: Search works in both table and card views with instant filtering
* NEW: Clear button for quick search reset
* IMPROVED: Mobile-optimized layouts for all admin pages
* IMPROVED: Responsive navigation for touch devices
* IMPROVED: Color theming system unified across app and design settings

= 1.1.4 =
* NEW: Email quick action buttons - Accept and reject bookings directly from admin notification emails
* NEW: Buttons are styled like frontend tiles for design consistency
* IMPROVED: Button styling optimized for maximum email client compatibility

= 1.1.3 =
* NEW: Complete internationalization with 6 supported languages (DE, EN, IT, ES, FR, PL)
* NEW: Language-specific email templates with standard templates for all languages
* NEW: Translated calendars (months and weekdays) in frontend and backend
* NEW: Corner radius setting for form design
* NEW: Special opening hours are considered when manually creating bookings
* NEW: Services and staff management system
* NEW: Calendar view with FullCalendar integration
* NEW: Dynamic calendar time slots - Week and Day views automatically adjust to opening hours configuration
* NEW: Statistics page with booking analytics
* NEW: [PRO] Calendar subscription feature (iCal/ICS feed)
* NEW: Individual working hours for staff members
* NEW: Tile background color customization
* NEW: Setup wizard for easy initial configuration
* NEW: Dashboard overview with statistics and quick actions
* NEW: [PRO] Automated reminder emails X hours before appointments
* NEW: [PRO] Guest cancellation via unique cancellation links in emails
* NEW: Responsive card view for tablet and mobile devices
* NEW: Custom popup confirmation system for all delete actions
* NEW: Bulk delete functionality for multiple bookings on Past and Cancelled tabs
* NEW: Checkbox selection for batch operations on booking list
* NEW: Improved staff selection logic for new bookings (backend and frontend) - ensures correct staff member selection and prevents overbooking errors
* IMPROVED: Booking list with clickable rows and modal details
* IMPROVED: Responsive design for all admin pages
* IMPROVED: Card-based grid layout for better UX and mobile responsiveness
* IMPROVED: Custom styled confirmation dialogs (simpbook-dialog system) for all confirmations
* IMPROVED: Staff member selection validation in both backend manual booking creation and frontend form to prevent booking errors

= 1.1.0 =
* NEW: [PRO] Management for holidays and special opening hours added. Days can now be completely closed or given different hours.
* NEW: CSV export function for bookings.

= 1.0.0 =
* First release of the plugin.
* Main features: Online booking form, backend management, customizable emails, and weekly opening hours.

== Support ==

For support, questions, or feedback, please visit https://mobile-refuel.de

== Credits ==

Developed by Maxim Ristow / maksim85 for Mobile-Refuel.

---