/* Scoped to: ss-education-template-explore_categories */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-education-template-explore_categories"]');
  componentRoots.forEach(function(componentRoot) {
    // Helper to query within component, with fallback to document for sibling elements
    var $ = function(sel) { 
      return componentRoot.querySelector(sel) || document.querySelector('[data-component-slug="ss-education-template-explore_categories"] ~ ' + sel) || document.querySelector(sel);
    };
    var $$ = function(sel) { 
      var results = componentRoot.querySelectorAll(sel);
      return results.length ? results : document.querySelectorAll(sel);
    };
    // Original component JS runs in this scope
    const tabs = document.querySelectorAll(".tab"); const contents = document.querySelectorAll(".tab-content"); tabs.forEach((tab) => { tab.addEventListener("click", () => { tabs.forEach((t) => t.classList.remove("active")); tab.classList.add("active"); contents.forEach((c) => c.classList.add("hidden")); document.querySelector(`[data-content="${tab.dataset.tab}"]`).classList.remove("hidden"); }); });
  });
})();