Ok, managed to do a bit of a bodge job with it. For anyone who wants to know how I did it, here it is...
I changed the button on the page to just a static button that opens the css window. At this stage, the product isn't actually added to the cart. The window opens and this is where I put in the add to cart button but displayed as the continue shopping or view cart button. When either button is clicked to close the window, the product is added to the cart.
I hope that makes sense.