I think Plotly’s native onhover tooltips can be very limited when it comes to customization.
To achieve something as custom as yours, instead of trying to modify Plotly’s tooltips, I’d disable them and make our own (which we’ll have css styling freedom over), and combine Plotly’s on-plotly-hover event, and trace’s custom data to generate and update the tooltip.
I can try to throw a pen together later, but that’s the gist of the idea.