/* EUP-463: the warehouse/inventory windows' header panels (styleClass "emro-inv-bar").
   Each panel is one row of label + field + button groups that wraps, instead of
   controls packed edge to edge. Scoped to the class, so no other window changes --
   except the last rule, which is deliberately app-wide (see its comment). */

/* The shell hides every in-tab panel title (emro-primefaces-theme.css, .mainTab
   .ui-panel-title) to make room for the window's own titlebar, which left these
   panels an empty 2.25rem strip and hid the guidance they carry. Show it again
   as a caption. */
body.emro-app-shell .emro-workspace .mainTab .ui-panel.emro-inv-bar > .ui-panel-titlebar {
    height: auto;
    justify-content: flex-start;
    padding: var(--emro-space-2) var(--emro-space-3) 0;
    border: 0;
    pointer-events: auto;
}

body.emro-app-shell .emro-workspace .mainTab .ui-panel.emro-inv-bar > .ui-panel-titlebar > .ui-panel-title {
    display: block;
    color: var(--emro-color-text-muted);
    font-size: var(--emro-font-size-sm);
    font-weight: 600;
    white-space: normal;
}

body.emro-app-shell .emro-workspace .ui-panel.emro-inv-bar > .ui-panel-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--emro-space-2);
    padding: var(--emro-space-2) var(--emro-space-3);
}

/* A label starts a new group: more space before it than between it and its field. */
body.emro-app-shell .emro-workspace .ui-panel.emro-inv-bar > .ui-panel-content > .ui-outputlabel:not(:first-child) {
    margin-left: var(--emro-space-3);
}

/* An inline p:message with nothing to say would still take a gap. */
body.emro-app-shell .emro-workspace .ui-panel.emro-inv-bar > .ui-panel-content > .ui-message:empty {
    display: none;
}

/* Tables, included DataWindows and block groups take their own full-width line. */
body.emro-app-shell .emro-workspace .ui-panel.emro-inv-bar > .ui-panel-content > div:not([class*="ui-"]),
body.emro-app-shell .emro-workspace .ui-panel.emro-inv-bar > .ui-panel-content > table {
    flex: 1 0 100%;
    min-width: 0;
}

/* PrimeFaces sizes scrollable tables from an invisible copy of the header row.
   The theme's th padding (emro-primefaces-theme.css) reaches that copy too, so
   its titles showed as a clipped ghost line under the real header. App-wide on
   purpose: it only restores PrimeFaces' own zero padding on a row nobody should see. */
body.emro-app-shell .emro-workspace .ui-datatable .ui-datatable-scrollable-theadclone th {
    padding-top: 0;
    padding-bottom: 0;
    visibility: hidden;
}
