managing z-indexes for modals and header