Change class 'popup' for the dialog to fit in small spaces

When the Pad is in a very small space, the dialog becomes unusable. The proposal here is that the dialogs can get smaller in smaller environments, like iframes or small screens.