Improved JS dropdown container detection, styling