eX(-50%)';
                } else if (tooltipRect.right > window.innerWidth - padding) {
                    let availableWidthLeft = left - padding;
                    let newWidth = Math.min(availableWidthLeft * 2, maxWidth);
                    newWidth = dynamicMinWidth < 150 ? dynamicMinWidth : newWidth;
                    tooltipEl.style.width = newWidth + 'px';

                    tooltipRect = tooltipEl.getBoundingClientRect();
                    let adjustedLeft = window.innerWidth - padding - 