updating classes and styles for overlay