document.addEventListener('wpcf7mailsent', function(event) {
const popup = event.target.closest('.pjbf-popup');
if (!popup) return;
popup.classList.add('pjbf-complete');
});
document.addEventListener('click', function(event) {
const button = event.target.closest('.pjbf-copy-btn');
if (!button) return;
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText('BLACK5').then(function() {
button.textContent = 'COPIED!';
}).catch(function() {
button.textContent = 'SELECT CODE ABOVE';
});
} else {
button.textContent = 'SELECT CODE ABOVE';
}
});