e.left = `${rect.left + window.scrollX}px`;
  }
  
  valuePopover.style.top = `${rect.bottom + window.scrollY + 10}px`;
  
  // Set the current value
  const valueInput = document.getElementById('valueInput');
  if (activeFilter && activeFilter.value) {
    valueInput.value = activeFilter.value;
  } else {
    valueInput.value = '';
  }
  
  valuePopover.classList.add('active');
  valueInput.focus();
}

// Close value popover
function closeValuePopover() {
  valuePopover.classList.remove('active');
  
  // 