/* Scoped to: ss-dental-faq */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-dental-faq"]');
  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-dental-faq"] ~ ' + 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
    (function () { setTimeout(function () { var faqItems = document.querySelectorAll(".faq-item"); faqItems.forEach(function (item) { var trigger = item.querySelector(".faq-trigger"); var content = item.querySelector(".faq-content"); var icon = item.querySelector(".faq-icon"); if (trigger && content) { trigger.addEventListener("click", function () { var isOpen = !content.classList.contains("hidden"); faqItems.forEach(function (otherItem) { var otherContent = otherItem.querySelector(".faq-content"); var otherIcon = otherItem.querySelector(".faq-icon"); if (otherItem !== item && otherContent) { otherContent.classList.add("hidden"); if (otherIcon) otherIcon.classList.remove("rotate-180"); } }); if (isOpen) { content.classList.add("hidden"); if (icon) icon.classList.remove("rotate-180"); } else { content.classList.remove("hidden"); if (icon) icon.classList.add("rotate-180"); } }); } }); }, 0); })();
  });
})();