(function(){const targetIds=['practicesddl','insightsddl','industriesddl'];function addStyles(styles){const styleElement=document.createElement('style');styleElement.textContent=styles;document.head.appendChild(styleElement);} addStyles(` .insightspanel .innerwrap .leftwrap .list-collapse li #practicesddl.content, .insightspanel .innerwrap .leftwrap .list-collapse li #insightsddl.content, .insightspanel .innerwrap .leftwrap .list-collapse li #industriesddl.content{ position: relative; height: 238px; display: flex; flex-direction: column; padding: 0 !important; } .insightspanel .innerwrap .leftwrap .list-collapse li:has(#practicesddl, #insightsddl, #industriesddl) .clear-filter { position: sticky; top: 0; padding: 8px 22px 5px 24px; background: #f1f4f8; z-index: 1; margin: 0; opacity: 0.8 } .insightspanel .innerwrap .leftwrap .list-collapse li .form-group-wrapper { overflow-y: auto; padding: 0 24px 20px 24px; } .insightspanel .innerwrap .leftwrap .list-collapse li:has(#practicesddl, #insightsddl, #industriesddl) .clear-filter a { display: flex; justify-content: flex-end; font-size: 18px !important; align-items: center; column-gap: 5px; line-height: 100% } `);function updateClearFilterVisibility(content){if(!content)return;const clearFilter=content.querySelector('.clear-filter');const checkboxes=content.querySelectorAll('.form-group.customcheckbox input[type="checkbox"]');let isAnyChecked=Array.from(checkboxes).some(checkbox=>checkbox.checked);clearFilter.style.visibility=isAnyChecked?'visible':'hidden';} function initializeFilter(content){if(!content)return;let wrapper=content.querySelector('.form-group-wrapper');if(!wrapper){wrapper=document.createElement('div');wrapper.className='form-group-wrapper';Array.from(content.querySelectorAll('.form-group.customcheckbox')).forEach(el=>{wrapper.appendChild(el);});const clearFilter=content.querySelector('.clear-filter');if(clearFilter){clearFilter.after(wrapper);}else{content.appendChild(wrapper);}} updateClearFilterVisibility(content);content.addEventListener('change',function(event){if(event.target.type==='checkbox'){updateClearFilterVisibility(content);}});const clearAllButton=content.querySelector('.clearAll');if(clearAllButton){clearAllButton.addEventListener('click',function(event){event.preventDefault();const checkboxes=content.querySelectorAll('.form-group.customcheckbox input[type="checkbox"]');checkboxes.forEach(checkbox=>{checkbox.checked=false;});updateClearFilterVisibility(content);});}} function initializeAllFilters(){targetIds.forEach(id=>{const content=document.getElementById(id);if(content){initializeFilter(content);}});} setTimeout(function(){if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',initializeAllFilters);}else{initializeAllFilters();}},300);})();;;