/*
 * Tight, natural-width packing for horizontal XAF layout groups.
 *
 * Applied to <dxbl-form-layout-group> elements by PackLayoutGroupController when the
 * group's IModelLayoutGroupPackItems.PackItems flag is enabled in the Application Model.
 *
 * XAF renders a horizontal LayoutGroup as a DevExpress FormLayout row: the group element
 * wraps an inner ".dxbl-row" flex container whose ".dxbl-fl-item" children carry
 * proportional "dxbl-col-md-*" spans derived from RelativeSize (default = equal split).
 * These rules override that column model so items sit one after another at their natural
 * width, separated by a small fixed gap.
 */

.erp-pack-row > .dxbl-row {
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 0.75rem;
    margin-left: 0;
    margin-right: 0;
}

/* Higher specificity (3 classes) than the single-class "dxbl-col-md-*" rules, so no !important. */
.erp-pack-row > .dxbl-row > .dxbl-fl-item {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* The last item stretches to the parent container's trailing edge. */
.erp-pack-row > .dxbl-row > .dxbl-fl-item:last-child {
    flex: 1 1 auto;
}

/* Ensure the editor inside the stretched last item fills the grown width. */
.erp-pack-row > .dxbl-row > .dxbl-fl-item:last-child .dxbl-fl-ctrl,
.erp-pack-row > .dxbl-row > .dxbl-fl-item:last-child .dxbl-fl-ctrl > * {
    width: 100%;
}
