Custom Tooltip. Problem with positioning

Since Webflow doesn’t have tooltips I made this one:
https://gerards-fantastic-project.webflow.io/

The behavior is fine but depending on the size of the label I have to manually adjust the tooltip position. Anyone can improve it?

https://preview.webflow.com/preview/gerards-fantastic-project?utm_medium=preview_link&utm_source=designer&utm_content=gerards-fantastic-project&preview=e36a343a70bb44b2965ed12529cffd6c&mode=preview