WARNING: This page is about a different car, the 2016 Mazda MX-5 Miata. However, it is still accessible from the selected car via links, so may be relevant.
Install the front header trim with the sunvisor open. Otherwise, the vanity mirror may be damaged.