@layer legacy {
/* What stays here (#727). The TabMenu and WorkspaceMenuPanel rules are in their .razor.css files and the
   MudBlazor popover frames, lists and overlays are in popovers.css.
   - --shell-unsaved-color is a token read by TabMenu.razor.css, so it stays global.
   - The global search dialog frame is a MudBlazor dialog frame opened by the Header; it has no
     .razor.css owner yet.
   - The save-command and edit-trigger spans are display: contents wrappers used by three owners. */
:root {
    --shell-unsaved-color: var(--mud-palette-warning);
}

body.is-phone-layout .mud-dialog.t-globalsearch-dialog-wrapper {
    position: fixed;
    inset: var(--shell-visible-top, 0px) 0 auto;
    margin: 0;
    width: 100%;
    max-width: none;
    height: var(--shell-visible-height, 100dvh);
    max-height: var(--shell-visible-height, 100dvh);
    --t-dialog-radius: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-sizing: border-box;
    overflow: hidden;
    animation: none;
    transition: none;
}

body.is-phone-layout .mud-dialog.t-globalsearch-dialog-wrapper .mud-dialog-content {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.t-activity-save-commands, .t-activity-edit-trigger { display: contents; }
}
