/* =====================================================
   INRADR — Form layout — DxFormLayout tokens, group captions, caption column, 4/2/1 columns
   inradr-feature layer (adapter): DevExpress / XAF / vendor selectors and tokens only.
   Maps inradr-design values (var(--inradr-*)) onto the framework; no new base values and
   no hex literals. Internal --dxbl-* tokens are set on the element that declares them and
   carry "re-verify on DX upgrade" (full list: inradr-feature/README.md).
   Never target a bare .dxbl-modal (it also matches the XAF skip link).
   ===================================================== */

/* ---- DxFormLayout tokens ----
   26.1 Fluent halved the form layout spacing (12px); A's DetailView rhythm is 24px. Item and group
   spacing get the same value, so every row's negative margin cancels its columns' padding: no outer
   inset, a 24px gutter, and group captions, tab strip and four-column groups share one left edge.
   Internal tokens, all declared on .dxbl-fl (26.1.4 `.dxbl-fl{--dxbl-fl-*:var(--dxbl-fl-*-m)}`;
   B renders size-mode Medium, so no .dxbl-sm/.dxbl-lg redeclaration applies). Re-verify on DX upgrade. */
.dxbl-fl {
    --dxbl-fl-item-spacing-x: var(--inradr-gap-grid);
    --dxbl-fl-group-spacing-x: var(--inradr-gap-grid);
    --dxbl-fl-group-spacing-y: var(--inradr-gap-section);   /* 12px above and below each group and tab group */
    /* DX quirk: the group body reads `padding: var(-x) var(-y)`, so both go to 0 together. */
    --dxbl-fl-group-content-padding-x: 0;
    --dxbl-fl-group-content-padding-y: 0;
    --dxbl-fl-group-header-padding-x: 0;                     /* caption flush with the fields */
    --dxbl-fl-group-border-width: 0;                         /* no group frame (A) */
    --dxbl-fl-tab-group-content-padding-x: 0;                /* tab content flush with the tab strip; y keeps 14px */
    /* Group caption = H2 in the heading colour (navy; Dark: #F5F5F5) (OQ-24: fixed px triplet). */
    --dxbl-fl-group-header-color: var(--inradr-color-text-heading);
    --dxbl-fl-group-header-font-size: var(--inradr-text-h2-size);
    --dxbl-fl-group-header-font-weight: var(--inradr-text-h2-weight);
    --dxbl-fl-group-header-line-height: var(--inradr-text-h2-line-height);
    /* Field captions: 14px/400 stay DX, only the colour changes (also used by the popups, WP-16). */
    --dxbl-fl-caption-color: var(--inradr-color-text-secondary);
}

/* ---- Group caption: H2 with the 80x4 accent underline ----
   DOM (B Detail): dxbl-group-control.dxbl-group > div.dxbl-group-header.dxbl-fl-caption-tmpl > div.dxbl-text.
   DX has no token for the underline; the ::after hangs in the caption's bottom padding. */
.dxbl-fl .dxbl-group > .dxbl-group-header {
    margin-bottom: calc(var(--inradr-space-xxs) / 2);   /* 2px (A); beats DX's margin-bottom:0 at (0,2,0) */
}

.dxbl-fl .dxbl-group > .dxbl-group-header > .dxbl-text {
    position: relative;
    padding-bottom: var(--inradr-space-xs);
}

.dxbl-fl .dxbl-group > .dxbl-group-header > .dxbl-text::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: var(--inradr-section-underline-w);
    height: var(--inradr-section-underline-h);
    background-color: var(--inradr-color-accent);
    border-radius: var(--inradr-radius-xs);
}

/* ---- Group caption with a tooltip: info glyph and tooltip card ----
   A group with a ToolTip renders its caption text in a [title] element inside .dxbl-text (26.1 DOM; the same in
   inradr-app). As in inradr-app (its inradr-design.css, '.dxbl-group-header .dxbl-text [title]:not([title=""])'):
   - the caption is an inline-flex box with the glyph centred after the text, and the anchor of the card;
   - the info glyph follows with a 10px gap, here lucide's icon-info in the caption colour, as large as the H2
     caption (inradr-app: a 20px navy mask);
   - the browser's own title tooltip is off (pointer-events); screen readers still read the title;
   - the title shows on a navy card to the right of the caption while the pointer is over the caption row.
   Re-verify on DX upgrade. */
.dxbl-fl .dxbl-group > .dxbl-group-header > .dxbl-text [title]:not([title=""]) {
    position: relative;
    display: inline-flex;
    align-items: center;
    pointer-events: none;
}

.dxbl-fl .dxbl-group > .dxbl-group-header > .dxbl-text [title]:not([title=""])::after {
    content: "\e0ff"; /* lucide icon-info */
    display: inline-block;
    margin-inline-start: calc(var(--inradr-space-xs) + var(--inradr-space-xxs) / 2);
    font-family: "lucide";
    font-size: var(--inradr-text-h2-size);
    font-weight: normal;
    line-height: 1;
}

.dxbl-fl .dxbl-group > .dxbl-group-header > .dxbl-text:hover [title]:not([title=""])::before {
    content: attr(title);
    position: absolute;
    top: 50%;
    left: 100%;
    z-index: var(--inradr-layer-tooltip);
    display: block;
    box-sizing: border-box;
    width: var(--inradr-tooltip-width);
    margin-inline-start: var(--inradr-space-xs);
    padding: var(--inradr-space-2xs) var(--inradr-space-sm);
    border-radius: var(--inradr-radius-lg);
    background: var(--inradr-color-navy);
    box-shadow: var(--inradr-elevation-tooltip-shadow);
    color: var(--inradr-color-text-on-navy);
    font-family: var(--inradr-font-body);
    font-size: var(--inradr-text-body-size);
    font-weight: var(--inradr-text-body-weight);
    line-height: 1.5; /* inradr-app */
    text-align: start;
    white-space: normal;
    transform: translateY(-50%);
}

/* Space below a group's fields (A); the body padding itself comes from the content-padding tokens. */
.dxbl-fl .dxbl-group-body-content {
    margin-bottom: var(--inradr-space-xs);
}

/* ---- Field captions and controls ---- */

/* 26.1 keeps a caption on one line with an ellipsis at >=992px; A wraps long captions inside the
   caption column. Wins over `.dxbl-fl:not(.dxbl-fl-calc) .dxbl-fl-item>.dxbl-fl-cpt` (0,4,0) by order.
   DX measures the caption column with .dxbl-fl-calc (flex:none), which still sees one line. */
.detail-view-content .dxbl-fl .dxbl-fl-item > .dxbl-fl-cpt {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
}

/* Nested ListViews (Detail2 tabs) span the whole item.
   DOM (B Detail2): dxbl-form-layout-item.dxbl-fl-item-horizontal > div.dxbl-fl-ctrl.dxbl-fl-ctrl-nc > div.nested-frame.
   DX's ctrl-nc rule sets flex-grow:0; with this rule the Detail2 nested grid spans the item (measured,
   WP-26 8.8-13). */
.dxbl-fl .dxbl-fl-item-horizontal > .dxbl-fl-ctrl-nc {
    flex: 1 1 100%;
    width: 100%;
}

/* ---- Main window only (.inradr-content-body) ----
   XAF popups render outside the content body and keep the 26.1 layout (OQ-30, WP-16). */

/* 240px caption column (A). DX JS measures the longest caption and writes the result as an inline
   custom property (B Detail: dxbl-form-layout.dxbl-fl style="--dxbl-fl-caption-width-large-screen: 259px").
   Read only at >=992px; below that DX stacks the captions natively (OQ-22). Re-verify on DX upgrade. */
.inradr-content-body .detail-view-content .dxbl-fl {
    /* !important: overrides the inline style DevExpress JS writes on dxbl-form-layout */
    --dxbl-fl-caption-width-large-screen: var(--inradr-info-label-width) !important;
}

/* Caption-top items (CaptionLocation=Top): A's 4px/24px spacing.
   ANNAHME (WP-00): not measurable in the main window: no DetailView uses caption-top items (checked 2026-09-30:
   fund and property DetailViews); only the popups do. */
.inradr-content-body .dxbl-fl .dxbl-fl-item:not(.dxbl-fl-item-horizontal) {
    margin-top: var(--inradr-space-xxs);
    margin-bottom: var(--inradr-space-md);
}

/* ---- Four-column groups: CustomCSSClassName="inradr-layout--cols-4" on a LayoutGroup ----
   4 columns >=1201px, 2 columns 769-1200px, 1 column <=768px (OQ-21). The gutter comes from the
   spacing tokens above, so only the column width is set. Two DOM shapes: without a caption the class
   sits on the row's owner (B Detail row2/row3: dxbl-form-layout-group.inradr-layout--cols-4 > div.dxbl-row);
   with a caption the row sits in the group body.
   ANNAHME (WP-00) for the captioned shape: no captioned four-column group in the model yet; the path
   is the one of the captioned groups in the B Detail snapshot. */
/* The caption column gives way before the value does: 240px while the item leaves at least
   --inradr-info-value-min-width for the value (1920px: A parity), narrower below. DX reads the token as
   the caption width ("width:var(--dxbl-fl-caption-width-large-screen)" on the caption inside the item), so
   100% is the item width. Set on the group, it is inherited by its items and beats the inline value on
   dxbl-form-layout without !important. Re-verify on DX upgrade. */
.inradr-content-body .inradr-layout--cols-4 {
    --dxbl-fl-caption-width-large-screen: min(var(--inradr-info-label-width), calc(100% - var(--inradr-info-value-min-width)));
}

.inradr-layout--cols-4 {
    /* 4px between field rows (OQ-23). Declared on .dxbl-fl; set below it on purpose: inherited by the
       rows of this group only (`.dxbl-fl .dxbl-row{--dxbl-row-item-spacing-y:var(--dxbl-fl-item-spacing-y)}`),
       nothing in between redeclares it. Re-verify on DX upgrade. */
    --dxbl-fl-item-spacing-y: var(--inradr-space-xxs);
}

.inradr-layout--cols-4 > .dxbl-row > :is(.dxbl-col, .dxbl-fl-item),
.inradr-layout--cols-4 > .dxbl-group > .dxbl-group-body > .dxbl-group-body-content > .dxbl-row > :is(.dxbl-col, .dxbl-fl-item) {
    flex: 0 0 25%;
    max-width: 25%;
}

@media (max-width: 1200px) {
    .inradr-layout--cols-4 > .dxbl-row > :is(.dxbl-col, .dxbl-fl-item),
    .inradr-layout--cols-4 > .dxbl-group > .dxbl-group-body > .dxbl-group-body-content > .dxbl-row > :is(.dxbl-col, .dxbl-fl-item) {
        flex-basis: 50%;
        max-width: 50%;
    }
}

/* DX's .dxbl-col-md-3 (width:25%) still applies at exactly 768px; the flex-basis wins over it. */
@media (max-width: 768px) {
    .inradr-layout--cols-4 > .dxbl-row > :is(.dxbl-col, .dxbl-fl-item),
    .inradr-layout--cols-4 > .dxbl-group > .dxbl-group-body > .dxbl-group-body-content > .dxbl-row > :is(.dxbl-col, .dxbl-fl-item) {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* ---- Image banner: CustomCSSClassName="inradr-layout--banner" on a LayoutGroup holding an image editor ----
   The property mask's picture (PropertyView row2) runs full width, at most 400px high and cropped to fill, as
   inradr-app's hero viewport (inradr-hero-image.css: height 400px; OpenSpec close-assets-cashflow-parity-gaps,
   design 3.10). Captured 2026-10-06: the DX image editor renders one img.xaf-component-image inside the item's
   control; it measures 1833x400 at 1920px. Rounded like the spec's hero image (4px, --inradr-radius-sm). */
.inradr-layout--banner img {
    display: block;
    width: 100%;
    max-height: 400px; /* inradr-app hero viewport height */
    object-fit: cover;
    border-radius: var(--inradr-radius-sm);
}
