Inversion animation messing with cart

Hi all,
I have a website I’m working on where I have a “invert” function done in IX to change the background of the site from white to black. Whenever this is switched on (dark mode) the cart becomes the size of the entire page instead of just the viewport.

Can anyone help me with this one?

Here is my public share link: LINK
(how to access public share link)