That was not in your last updated code:
It was in the code before that.
What did you replace this with?
document.querySelector(".container.with-curtain").classList.add("hide");
In your updated code?
I would be able to do that with this line:
It would be changed to something else, but I am not sure what.
document.querySelector('.outer').classList.add('isOpen');