=== PopupReply for Contact Form 7 ===
Contributors: dudaster
Tags: contact form 7, cf7 popup, form popup, contact form modal, success message popup
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show Contact Form 7 response messages in a clean, accessible popup modal.

== Description ==

PopupReply for Contact Form 7 turns standard Contact Form 7 response messages into elegant, accessible modal popups that visitors cannot miss.

By default, Contact Form 7 prints its response message inside the form, where it is easy to miss, often appears below the fold, and is styled inconsistently by the theme. PopupReply replaces that experience with a clear, modern popup — without writing a single line of code.

**Tested with WordPress 7**

PopupReply has been tested with WordPress 7.0 and the latest Contact Form 7 release. It uses no deprecated APIs and is ready for the current WordPress core.

**What it does**

* Displays Contact Form 7 success, validation, error and spam messages in a popup modal.
* Uses the actual message returned by Contact Form 7 — nothing is hardcoded, so it respects whatever you configured under the form's *Messages* tab.
* Works with the modern Contact Form 7 events: `wpcf7mailsent`, `wpcf7invalid`, `wpcf7mailfailed` and `wpcf7spam`.
* Reuses a single modal for every response type, so there is no markup bloat on the page.
* De-duplicates rapid repeat events, so a single submission never opens the popup twice.

**No more Colorbox**

This version is a full rewrite. It no longer uses Colorbox and no longer depends on the Lightbox Plus Colorbox plugin. The modal is built with plain, dependency-free JavaScript — no jQuery, no external libraries and no CDN assets. Everything is served from your own site.

**Accessible by design**

The popup is a proper dialog: `role="dialog"`, `aria-modal`, labelled and described for screen readers, with a focus trap, focus restored to the previously focused element on close, ESC support and an accessible close button. If you turn off every other way to close it, an OK button is shown automatically so the dialog can never trap the user.

**Global settings**

A global settings page under **Settings → PopupReply** lets you control:

* Enable or disable PopupReply site-wide.
* Which responses open a popup — all responses, success only, or errors only.
* Whether the original inline Contact Form 7 response also stays visible under the form.
* Close behaviour — close button, ESC key, click on the overlay, and optional auto-close with a configurable delay in seconds.
* Popup size — small, medium or large.
* Popup style — Clean, Rounded, Minimal or System.
* Disable the plugin CSS entirely, so you can style the modal yourself.
* Debug mode, which logs popup activity to the browser console.

**Per-form settings**

A **PopupReply** panel inside every Contact Form 7 form editor lets each form override the global behaviour:

* Use global settings, disable PopupReply for that form, enable it only for success messages, or enable it for all responses.
* Custom popup titles for success, error, validation and spam responses.
* A custom success message that replaces the Contact Form 7 message inside the popup.
* A custom CSS class added to the popup for that form only.

**Lightweight and self-contained**

No jQuery, no Colorbox, no external libraries, no CDN requests and no tracking. The plugin stays safely inactive if Contact Form 7 is not installed and never causes PHP errors.

== Installation ==

1. Install and activate Contact Form 7.
2. Install and activate PopupReply for Contact Form 7.
3. Go to **Settings → PopupReply** to configure the global behaviour.
4. Optionally open any Contact Form 7 form and use the **PopupReply** tab for per-form overrides.

== Frequently Asked Questions ==

= Does this still need Colorbox or Lightbox Plus? =

No. Those dependencies have been removed completely. The plugin is now self-contained.

= Does it require jQuery? =

No. The modal is built with vanilla JavaScript.

= What happens if Contact Form 7 is not active? =

The plugin stays safely inactive on the frontend, shows an admin notice, and the settings page remains accessible. It never causes PHP errors.

= Can I disable the popup for a single form? =

Yes. Open the form in the Contact Form 7 editor, go to the **PopupReply** tab and choose "Disable PopupReply for this form".

= Can I use my own CSS? =

Yes. You can disable the plugin CSS entirely from the settings page, or add a custom CSS class per form.

== Screenshots ==

1. A success response shown in the PopupReply modal.
2. The global settings page under Settings → PopupReply.
3. The PopupReply panel inside the Contact Form 7 form editor.

== Changelog ==

= 2.0.0 =
* Complete rewrite and rebrand to "PopupReply for Contact Form 7".
* Removed the Colorbox and Lightbox Plus Colorbox dependencies.
* Removed the jQuery requirement; the modal is now dependency-free vanilla JavaScript.
* Added an accessible modal dialog with focus trap, ESC, overlay click and auto-close.
* Added support for success, validation, error and spam responses.
* Added a global settings page and per-form settings inside the Contact Form 7 editor.
* No external or CDN assets.
* Tested with WordPress 7.0 and refreshed plugin assets (banner, icon and screenshots).

= 1.0 =
* Initial release (Colorbox-based).

== Upgrade Notice ==

= 2.0.0 =
Major rewrite. Colorbox is no longer required. Review Settings → PopupReply after updating.
