document.addEventListener('click', function (e) {
  document.querySelectorAll('.elementor-language-switcher').forEach(function (switcher) {
    if (switcher.contains(e.target)) {
      switcher.classList.toggle('is-open');
    } else {
      switcher.classList.remove('is-open');
    }
  });
});
