(function() {
  document.addEventListener('DOMContentLoaded', function() {
    document.querySelectorAll('[data-gf-form-id]').forEach(function(form) {
      form.classList.add('handwritten-memo');
      const fields = form.querySelectorAll('[data-gf-field-type] input, [data-gf-field-type] textarea, [data-gf-field-type] select');
      fields.forEach(function(el) {
        el.addEventListener('focus', function() {
          el.classList.add('ink-bloom');
        });
        el.addEventListener('blur', function() {
          el.classList.remove('ink-bloom');
        });
      });
    });
  });
})();
