
                tooltipEl.style.minWidth = dynamicMinWidth + 'px';

                let left = rect.left + rect.width / 2;
                let top = rect.bottom + 8;

                tooltipEl.style.left = `${left}px`;
                tooltipEl.style.top = `${top}px`;
                tooltipEl.style.transform = 'translateX(-50%)';

                let tooltipRect = tooltipEl.getBoundingClientRect();

                if (tooltipRect.left < padding) {
                    let availableWidthRight = window.inne