Fix flickering popover animations

Closes #4138

- Removed JS animation to close in favour of CSS animations
I'm clearly in a muddle with my true/false values. Giving it a rework now.