tooltipRect.width / 2;
                    tooltipEl.style.left = `${adjustedLeft}px`;
                    tooltipEl.style.transform = 'translateX(-50%)';
                }
            }

            function removeTooltip() {
                document.querySelectorAll('.tooltip-popup').forEach(el => el.remove());
                tooltipEl = null;
                currentTarget = null;
            }

            function isElementVisible(el) {
                const style = window.getComputedStyle(el);
       