/* DDConnect.Web.Shared/wwwroot/css/dialogs.css */

/* On a phone-sized screen every dialog fills the screen, whichever code opened it.
   ...
   IResponsiveDialogService already asked MudBlazor for FullScreen on small viewports, but only for
   the dialogs opened through it — around forty components call IDialogService directly, and message
   boxes went out un-adjusted even through the responsive service. Rather than convert each caller
   and rely on every future one remembering, the rule is stated once here, where it also covers the
   dialogs MudBlazor opens on its own.

   These are MudBlazor's own .mud-dialog-fullscreen declarations. The dialog's title and actions keep
   their place and .mud-dialog-content scrolls between them, which is why overflow-y is hidden here
   rather than auto. `position: static` undoes the inset that a corner-positioned dialog carries.

   The 600px edge is MudBlazor's Sm breakpoint: below it GetCurrentBreakpointAsync reports Xs, which
   is a phone. Sm and up starts at a small tablet, which has the room for a normal dialog. The same
   edge is stated in ResponsiveDialogService.IsMobileAsync — the two have to agree, or a dialog
   opened through that service would go fullscreen on a tablet while the rest did not.

   The specificity is deliberate. This file is linked ahead of MudBlazor.min.css, and the rules being
   overridden reach three classes (.mud-dialog-container.mud-dialog-topleft .mud-dialog), so the
   selector is repeated to outweigh them regardless of load order. */
@media (max-width: 599.98px) {
    .mud-dialog-container .mud-dialog.mud-dialog.mud-dialog {
        position: static;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: none;
        margin: 0;
        border-radius: 0;
        overflow-y: hidden;
    }
}
