tside
  document.addEventListener('click', (e) => {
    const isPopover = e.target.closest('.filter-popover');
    const isFilterValue = e.target.classList.contains('filter-badge-value');
    
    if (!isPopover && !isFilterValue) {
      closeValuePopover();
    }
  });
}

// Show value popover
function showValuePopover(targetElement) {
  // If popover is already active, don't reinitialize
  if (valuePopover.classList.contains('active')) {
    return;
  }
  
  const rect = targetElement.getBoundingClientRe