/*
 * MasterLayout.css - two optional bars (.ur-SubformBar 44px under the header, .ur-ActionBar 60px stuck to
 * the viewport bottom) provided by page 0 and hidden by a Never condition until a page adopts them.
 * Buttons inside use standard t-Button. The top bar itself is in TopBar.css.
 */

.ur-SubformBar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    box-sizing: border-box; height: 44px; min-height: 44px; margin: 0 0 12px; padding: 0 4px;
    background: var(--ut-region-background-color, var(--ut-body-background-color, #ffffff));
    border-bottom: 1px solid var(--ut-component-border-color, rgba(0, 0, 0, .1));
}
.ur-SubformBar-tabs,
.ur-SubformBar-actions { display: flex; align-items: center; gap: 4px; min-width: 0; height: 100%; }
.ur-SubformBar-tabs { flex: 1 1 auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ur-SubformBar-tabs::-webkit-scrollbar { display: none; }
.ur-SubformBar-actions { flex: 0 0 auto; justify-content: flex-end; }
.ur-SubformBar:empty,
.ur-SubformBar:not(:has(.ur-SubformBar-tabs > *, .ur-SubformBar-actions > *)) { display: none; }

.ur-ActionBar {
    position: sticky; bottom: 0; z-index: 90;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    box-sizing: border-box; height: 60px; min-height: 60px; margin: 12px 0 0; padding: 0 4px;
    background: var(--ut-region-background-color, var(--ut-body-background-color, #ffffff));
    border-top: 1px solid var(--ut-component-border-color, rgba(0, 0, 0, .1));
}
.ur-ActionBar-start,
.ur-ActionBar-end { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ur-ActionBar-start { flex: 1 1 auto; justify-content: flex-start; }
.ur-ActionBar-end { flex: 0 0 auto; justify-content: flex-end; }
.ur-ActionBar:not(:has(.ur-ActionBar-start > *, .ur-ActionBar-end > *)) { display: none; }

@media (max-width: 640px) {
    .ur-SubformBar { margin-bottom: 8px; }
    .ur-ActionBar {
        height: auto; min-height: 60px; gap: 8px; padding: 8px 4px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .ur-ActionBar .t-Button,
    .ur-SubformBar .t-Button { min-height: 44px; }
    .ur-ActionBar-start,
    .ur-ActionBar-end { flex: 1 1 0; }
    .ur-ActionBar-end .t-Button { flex: 1 1 auto; }
}

/*
 * The page name lives in the top bar, so breadcrumb trails, title-bar headings and the hand-written crumb
 * and description lines are hidden app-wide. The title-bar regions themselves stay: several hold buttons.
 */
.t-BreadcrumbRegion .t-Breadcrumb,
.t-BreadcrumbRegion .t-BreadcrumbRegion-title,
.t-Body-title .t-Breadcrumb { display: none !important; }
.t-BreadcrumbRegion-body:empty { display: none; }
.pg-crumb, .pg-sub { display: none !important; }

/* The title bar is removed outright, not collapsed. No live page keeps a button in it; a page that needs one puts it on the region it acts on. */
.t-Body-title, .t-BreadcrumbRegion { display: none !important; }
.t-Body-content .t-Body-contentInner { padding-top: 0; }

/* A floating label on a narrow popup LOV runs into its button (Version on Strategies at tablet width) */
#P1051_VERSION_CONTAINER { min-width: 12rem; }
