refactored overlay css/js