function getScrollbarWidth(){const outer=document.createElement('div');outer.style.visibility='hidden';outer.style.width='100px';outer.style.msOverflowStyle='scrollbar';document.body.appendChild(outer);const widthNoScroll=outer.offsetWidth;outer.style.overflow='scroll';const inner=document.createElement('div');inner.style.width='100%';outer.appendChild(inner);const widthWithScroll=inner.offsetWidth;outer.parentNode.removeChild(outer);return widthNoScroll-widthWithScroll;} document.documentElement.style.setProperty('--content-scrollbar-width',getScrollbarWidth()+'px');document.addEventListener("DOMContentLoaded",function(){if(window.innerWidth<=480){const sections=document.querySelectorAll(".wp-block-ubc-tab");sections.forEach(function(section){const trigger=section.querySelector(".ubc-accordion-tabs__accordion-trigger");trigger.addEventListener("click",function(){if(!section.classList.contains("active")){sections.forEach(function(s){s.classList.remove("active","is-open");s.classList.add("is-hidden");});section.classList.add("active","is-open");section.classList.remove("is-hidden");section.scrollIntoView({behavior:"smooth"});}else{section.classList.remove("active","is-open");section.classList.add("is-hidden");}});});}});document.addEventListener("DOMContentLoaded",function(){const paginationLinks=document.querySelectorAll(".wp-block-query-pagination a");paginationLinks.forEach(link=>{const href=link.getAttribute("href");link.setAttribute("href",href+"/#pagination-prev-post");});});const accordionTitles=document.querySelectorAll('.c-accordion__title');accordionTitles.forEach(element=>{const afterContent=window.getComputedStyle(element,'::after').getPropertyValue('content');if(afterContent==='"+"'){element.style.setProperty('--after-display','none');}});