Add `centered` class for detached overlays

This centers the overlay horizontally (can do because of fixed width), but we
still need to center it vertically (which can only be done with JS since height
is dynamic).