Reworked how overflow and pointer-events are set based on feedback from max.