If the base is still attached to the window, you should be able to slide the mirror over it again, and secure it.
Hyundai offers free technical information at www.hmaservice.com ...register and check it out. Identical information to what dealer technicians get.
The rear view mirror has a screw where it attaches to the base. Inside the base there is a piece of metal with 4 trongs.
I think the screw fits in the metal piece. But the metal piece move around so I can get the screw back inside of it. Do I need to remove the base maybe?