/* =====================================================
   INRADR — Editors — text edits, display mode, focus, validation, checkbox, memo
   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).
   ===================================================== */

/* DOM (26.1): XAF property editors are DX text edits directly in the form-layout control cell,
   div.dxbl-fl-ctrl > dxbl-input-editor.dxbl-text-edit > input.dxbl-text-edit-input (B Detail snapshot, capture
   "Validation message and invalid editor (WP-15)"). View mode renders them .dxbl-disabled[is-read-only]
   (dxbl-input-editor, dxbl-spinedit, dxbl-date-edit; 26.1 shows a read-only lookup as DxTextBox).
   Every --dxbl-text-edit-* token below is declared on '.dxbl-text-edit' (core.min.css 26.1.4), the element
   these rules target; the DX state rules (.dxbl-disabled, .dxbl-readonly, .invalid, :hover, focus) redeclare
   or read them on the same element at (0,2,0) and higher. Re-verify on DX upgrade. */

/* ── Editable editors in the form layout ─────────────────────────
   White, dark text, the DS border on all four sides (Fluent draws the bottom edge in a darker underline
   colour) and no hover change; the focus underline is accent (OQ-01). :where() keeps the rule at (0,1,0),
   so every DX state rule stays on top. The full-text search box of a list toolbar
   (dxbl-input-editor.xaf-action-fulltextsearch.dxbl-text-edit, capture "Tree list (WP-13)") gets the same
   look although it sits outside the form layout. */
:where(.dxbl-fl) .dxbl-text-edit,
.dxbl-text-edit:where(.xaf-action-fulltextsearch) {
    --dxbl-text-edit-bg: var(--inradr-color-surface);
    --dxbl-text-edit-color: var(--inradr-color-text-primary);
    --dxbl-text-edit-underline-color: var(--inradr-color-border);
    --dxbl-text-edit-underline-hovered-color: var(--inradr-color-border);
    --dxbl-text-edit-border-hovered-color: var(--inradr-color-border);
    --dxbl-text-edit-underline-focused-color: var(--inradr-color-accent);
}

/* Focus: accent border on all sides, still 1px (DX adds its 2px underline as ::after), so nothing shifts.
   :not(.invalid) keeps an invalid field red while it has the focus. (0,3,0) also wins against the DX
   :active border by order. */
:is(:where(.dxbl-fl) .dxbl-text-edit, .dxbl-text-edit:where(.xaf-action-fulltextsearch)):is(:focus-within, .dxbl-focused):not(.invalid) {
    --dxbl-text-edit-border-color: var(--inradr-color-accent);
}

/* ── Display mode (read-only DetailView): plain text ─────────────
   A shows view-mode values as dark text at the cell's left edge, without border, spin or drop-down buttons.
   The DX disabled rule reads the two -disabled- tokens; border width and first-child padding are declared
   only on '.dxbl-text-edit' (padding also on .dxbl-sm/.dxbl-lg at (0,2,0)), so (0,2,0) wins by order.
   The disabled background is already transparent in Fluent. Scoped to the form layout (popups included):
   the header tenant combobox, a disabled combobox in a toolbar, keeps its look. Editable XAF editors that
   DX marks readonly are excluded: the object editor (DxTextBoxWithTemplate ReadOnly + button,
   .xaf-object-editor) and the popup criteria editor (.xaf-popup-filter-editor), 26.1 sources. */
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit:is(.dxbl-disabled, .dxbl-readonly:not(.xaf-object-editor, .xaf-popup-filter-editor)) {
    --dxbl-text-edit-disabled-color: var(--inradr-color-text-primary);
    --dxbl-text-edit-disabled-border-color: transparent;
    --dxbl-text-edit-border-width: 0;
    --dxbl-text-edit-first-child-padding-x: 0;
}

/* No spin or drop-down buttons on display fields (B Detail: dxbl-spinedit.dxbl-disabled >
   div.dxbl-spin-btns.dxbl-btn-group-right, dxbl-date-edit.dxbl-disabled > div.dxbl-btn-group-right).
   Only inside .dxbl-fl-ctrl, so the header tenant combobox keeps its chevron. */
.dxbl-fl-ctrl > .dxbl-text-edit.dxbl-disabled > .dxbl-btn-group-right {
    display: none;
}

/* ── Cursor policy ───────────────────────────────────────────────
   Display fields show the normal arrow on the editor and everything in it (26.1 sets it only on readonly
   inputs). XAF's Boolean/Enum/Lookup combobox with a template (.xaf-combobox-with-template; 26.1 sources
   BooleanPropertyEditor, EnumPropertyEditor, LookupPropertyEditor) shows not-allowed when disabled (A).
   Enabled drop-down buttons get the pointer (26.1 leaves the UA arrow). No pointer-events overrides. */
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit:is(.dxbl-disabled, .dxbl-readonly:not(.xaf-object-editor, .xaf-popup-filter-editor)),
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit:is(.dxbl-disabled, .dxbl-readonly:not(.xaf-object-editor, .xaf-popup-filter-editor)) * {
    cursor: default;
}

:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.xaf-combobox-with-template.dxbl-disabled,
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.xaf-combobox-with-template.dxbl-disabled * {
    cursor: not-allowed;
}

.dxbl-text-edit:not(.dxbl-disabled):not(.dxbl-readonly) > .dxbl-btn-group > .dxbl-btn.dxbl-edit-btn-dropdown:not(:disabled) {
    cursor: pointer;
}

/* Field reveal (js/inradr-field-reveal.js) on display fields: a clipped value opens with a click (zoom-in),
   an expanded one closes with a click (zoom-out), the copy button is a button. Same (0,3,0) as the display
   rules above and later in the file, so they win by order; A's contradicting !important cursor rules
   (inradr-field-reveal.css zoom-in against inradr-inputs.css default) are not ported. */
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.dxbl-disabled.inradr-clipped-text,
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.dxbl-disabled.inradr-clipped-text * {
    cursor: zoom-in;
}

:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.dxbl-disabled.inradr-inline-expanded,
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.dxbl-disabled.inradr-inline-expanded * {
    cursor: zoom-out;
}

:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.dxbl-disabled > .inradr-hover-copy-button,
:where(.dxbl-fl .dxbl-fl-ctrl) > .dxbl-text-edit.dxbl-disabled > .inradr-hover-copy-button * {
    cursor: pointer;
}

/* ── Field reveal: clipped and expanded display fields ───────────
   The engine (js/inradr-field-reveal.js, ReadonlyFieldEnhancementController) marks the display field
   dxbl-input-editor.dxbl-text-edit.dxbl-disabled: .inradr-copyable-field (copy button inside), .inradr-clipped-text
   (value cut off) and .inradr-inline-expanded (value shown in full in div.inradr-inline-full-text). The own
   elements are styled in inradr-design/inradr-field-reveal.css. DOM: B Detail, measured 2026-09-30 (WP-26).
   Chromium dispatches no pointer events on a disabled input, so the input passes them to its editor, where the
   engine listens. The editor background comes from --dxbl-text-edit-disabled-bg ('.dxbl-text-edit.dxbl-disabled
   {--dxbl-text-edit-bg:var(--dxbl-text-edit-disabled-bg,...)}', core.min.css 26.1.4), declared on the same
   element. Re-verify on DX upgrade. */
.dxbl-fl-ctrl > .dxbl-text-edit.dxbl-disabled > .dxbl-text-edit-input:disabled {
    pointer-events: none;
}

.dxbl-fl-ctrl > .dxbl-text-edit.dxbl-disabled.inradr-clipped-text {
    border-radius: var(--inradr-radius-sm);
    outline-offset: 1px;
}

.dxbl-fl-ctrl > .dxbl-text-edit.dxbl-disabled.inradr-clipped-text:is(:hover, :focus-within) {
    --dxbl-text-edit-disabled-bg: color-mix(in srgb, var(--inradr-color-accent) 6%, transparent);
    outline: 1px dashed color-mix(in srgb, var(--inradr-color-accent) 70%, var(--inradr-color-border));
}

.dxbl-fl-ctrl > .dxbl-text-edit.dxbl-disabled.inradr-inline-expanded {
    --dxbl-text-edit-disabled-bg: var(--inradr-color-surface-muted);
    align-items: stretch;
    height: auto;
    min-height: var(--inradr-height-control);
    max-height: none;
    overflow: visible;
    border-radius: var(--inradr-radius-sm);
    outline: none;
    box-shadow: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.dxbl-fl-ctrl > .dxbl-text-edit.dxbl-disabled.inradr-inline-expanded > .dxbl-text-edit-input {
    display: none;
}

/* ── FileData editor (TransactionImportParameter popup) ──────────
   Built by DxFileInputAdapter (26.1 sources, FileAttachment.Blazor): div.progress-container >
   DxTextBox.xaf-textbox.xaf-file-data-editor (ReadOnly, so .dxbl-readonly) with the DxEditorButton
   .file-data-button. With no file chosen the whole edit box opens the file dialog, so the enabled editor is
   a click target; the attach button is accent on white (A). --dxbl-btn-* are declared on .dxbl-btn and
   redeclared for editor buttons by '.dxbl-text-edit>.dxbl-btn-group>.dxbl-btn' (0,3,0) on the same element;
   (0,4,0) wins. DOM: capture "FileData editor and checkboxes in the import popup (WP-15)". Re-verify on DX
   upgrade. */
.dxbl-text-edit.xaf-file-data-editor:not(.dxbl-disabled),
.dxbl-text-edit.xaf-file-data-editor:not(.dxbl-disabled) * {
    cursor: pointer;
}

.dxbl-text-edit.xaf-file-data-editor .dxbl-btn.file-data-button {
    --dxbl-btn-bg: var(--inradr-color-surface);
    --dxbl-btn-color: var(--inradr-color-accent);
    --dxbl-btn-hover-bg: var(--inradr-color-accent-tint-8);
    --dxbl-btn-hover-color: var(--inradr-color-accent);
}

/* ── Placeholder and validation (OQ-27: DS red) ──────────────────
   Placeholder and empty-selection text (NullText, e.g. "Bitte wählen") takes the DS placeholder grey, lighter
   than an entered value. The token is declared on '.dxbl-text-edit' (core.min.css 26.1.4, Fluent
   '--dxds-color-content-neutral-deep-rest') and read by '.dxbl-text-edit .dxbl-text-edit-input::placeholder,
   .dxbl-text-edit>textarea::placeholder', so it reaches every DX text edit: the form layout, the combo and
   drop-down boxes of the global filter, the full-text search. Same selector, wins by order.
   Every DX text edit gets the DS red on its declaring element. XAF re-sets the Fluent red, and border-color
   itself, for invalid editors in the form layout at (0,4,0) (styles.css 26.1.4: '.dxbl-fl-ctrl
   .invalid.validation-invalid.dxbl-text-edit, .dxbl-fl-ctrl .invalid.validation-invalid .dxbl-text-edit');
   the same selectors win by order. A 1px outer ring doubles the border (A). The focus underline turns red
   as well, so an invalid field stays red on all sides while focused. DOM: capture "Validation message and
   invalid editor (WP-15)": dxbl-input-editor, dxbl-memo-editor and dxbl-combo-box.xaf-combobox-with-template,
   each '.invalid.validation-invalid.dxbl-text-edit' in div.dxbl-fl-ctrl. Re-verify on DX upgrade. */
.dxbl-text-edit {
    --dxbl-text-edit-placeholder-color: var(--inradr-color-text-placeholder);
    --dxbl-text-edit-validation-invalid-color: var(--inradr-color-status-danger-text);
}

.dxbl-fl-ctrl .invalid.validation-invalid.dxbl-text-edit,
.dxbl-fl-ctrl .invalid.validation-invalid .dxbl-text-edit {
    --dxbl-text-edit-validation-invalid-color: var(--inradr-color-status-danger-text);
    --dxbl-text-edit-underline-focused-color: var(--inradr-color-status-danger-text);
    border-color: var(--inradr-color-status-danger-text);
    box-shadow: 0 0 0 1px var(--inradr-color-status-danger-text);
}

/* The message under an invalid editor (XAF shows it only at <=575.98px) in the same red.
   Same selector as XAF's (0,2,0) rule; wins by order. */
[data-color=danger].xaf-validation-message {
    color: var(--inradr-color-status-danger-text);
}

/* ── Checkbox ────────────────────────────────────────────────────
   Checked boxes in accent (OQ-01), accent-hover under the pointer like the action switch; the white check
   mark is the DX default. Invalid boxes get the DS red (OQ-27): XAF's own invalid-checkbox tokens are
   Bootstrap-based and read by no Fluent rule. Declared on '.dxbl-checkbox' and read by the state rules on
   the same element (core.min.css 26.1.4); the action switch sets its own values at (0,3,0).
   DOM: dxbl-check.dxbl-checkbox > div.dxbl-checkbox-check-element (grid selection column, filter menu list).
   ANNAHME (WP-00) for the invalid box: not measurable (2026-09-30): the only editable checkboxes (import popup,
   capture "FileData editor and checkboxes in the import popup (WP-15)") carry no validation rule. Checked and
   unchecked boxes are in that capture. Re-verify on DX upgrade. */
.dxbl-checkbox {
    --dxbl-checkbox-primary-checked-check-element-bg: var(--inradr-color-accent);
    --dxbl-checkbox-primary-checked-check-element-border: var(--inradr-color-accent);
    --dxbl-checkbox-primary-checked-hover-check-element-bg: var(--inradr-color-accent-hover);
    --dxbl-checkbox-primary-checked-hover-check-element-border: var(--inradr-color-accent-hover);
    --dxbl-checkbox-danger-checked-check-element-bg: var(--inradr-color-status-danger);
    --dxbl-checkbox-danger-checked-check-element-border: var(--inradr-color-status-danger);
    --dxbl-checkbox-danger-checked-hover-check-element-bg: var(--inradr-color-status-danger-hover);
    --dxbl-checkbox-danger-checked-hover-check-element-border: var(--inradr-color-status-danger-hover);
    --dxbl-checkbox-danger-unchecked-check-element-border: var(--inradr-color-status-danger);
    --dxbl-checkbox-danger-unchecked-hover-check-element-border: var(--inradr-color-status-danger-hover);
}

/* ── Booleans in view mode: 'ja' / 'nein' instead of the check icon (OQ-25 a) ──
   DOM (B List snapshot, captures): div.dxbl-checkbox.dxbl-checkbox-display-view-checked > div > svg.dxbl-image.
   DX draws the inner div as a 16px bordered box with overflow hidden; here it becomes a plain text box.
   The labels are design tokens, so they are not localized (OQ-25 b moves them to C#). The indeterminate
   (null) icon stays. Same selectors as the DX box rule (0,2,1); win by order.
   -unchecked renders div.dxbl-checkbox-display-view-unchecked > div without an image (measured 2026-09-30 in
   LookupValue_ListView: no border, "nein"). */
.dxbl-checkbox.dxbl-checkbox-display-view-checked > div,
.dxbl-checkbox.dxbl-checkbox-display-view-unchecked > div {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    border: 0;
    justify-content: flex-start;
}

.dxbl-checkbox.dxbl-checkbox-display-view-checked > div > .dxbl-image,
.dxbl-checkbox.dxbl-checkbox-display-view-unchecked > div > .dxbl-image {
    display: none;
}

.dxbl-checkbox.dxbl-checkbox-display-view-checked > div::after {
    content: var(--inradr-bool-true-label);
}

.dxbl-checkbox.dxbl-checkbox-display-view-unchecked > div::after {
    content: var(--inradr-bool-false-label);
}

/* In a grid cell DX centres the 16px box with a vertical margin computed from the icon size
   ('.dxbl-grid .dxbl-grid-table>tbody>tr>td>.dxbl-checkbox', (0,3,3)); the text box would add 2px above
   and below and push the row past 30px. (0,4,3) wins.
   'ja' / 'nein' start at the cell edge under the column caption, as in A (display:flex on the display view):
   XAF centres boolean columns (td.dxbl-align-center) and DX renders the box inline-flex (owner decision
   2026-10-01). */
.dxbl-grid .dxbl-grid-table > tbody > tr > td > .dxbl-checkbox:is(.dxbl-checkbox-display-view-checked, .dxbl-checkbox-display-view-unchecked) {
    display: flex;
    margin-block: 0;
}

/* ── Popup editors (XAF popup DetailViews) ───────────────────────
   Borders, focus, validation and display mode come from the form-layout rules above, which match the popup
   form too. Here only A's 36px height: --dxbl-text-edit-padding-y from the Medium 5px to 7px
   (7 + 20 + 7 + 2 = 36). Declared on '.dxbl-text-edit' (and .dxbl-sm/.dxbl-lg); (0,5,0) wins. Form editors
   only: a nested grid's pager, search box and in-place editors and a nested toolbar keep their size.
   DOM: capture "Validation message and invalid editor (WP-15)": dxbl-modal-dialog.dxbl-popup.xafPopup > ...
   div.dxbl-fl-ctrl > dxbl-input-editor.dxbl-text-edit. Re-verify on DX upgrade. */
.dxbl-popup.xafPopup .dxbl-fl-ctrl .dxbl-text-edit:not(.dxbl-memo-edit):where(:not(.dxbl-grid *, .dxbl-toolbar *)) {
    --dxbl-text-edit-padding-y: var(--dxds-spacing-70);
}

/* Memo fields in popups are at least 120px high (A; no DS size token). The textarea stretches with the flex
   root; it has no resize grip (see below). DOM: same capture,
   dxbl-memo-editor.dxbl-text-edit.dxbl-memo-edit > textarea.dxbl-v-resize[rows=3]. */
.dxbl-popup.xafPopup .dxbl-text-edit.dxbl-memo-edit {
    min-height: 7.5rem;
}

/* ── Memo fields: no resize grip (124ca7cte2h) ───────────────────
   A memo field looks like every other field: DX's grip in the bottom right corner suggests a field that can be
   expanded (core.min.css 26.1.4 '.dxbl-text-edit.dxbl-memo-edit>.dxbl-v-resize{resize:vertical}', same for
   .dxbl-resize (both) and .dxbl-h-resize (horizontal), (0,3,0)); (0,3,1) wins. Every memo field, in masks,
   popups and wizards. DOM: dxbl-memo-editor.dxbl-text-edit.dxbl-memo-edit > textarea.dxbl-v-resize.
   Re-verify on DX upgrade. */
.dxbl-text-edit.dxbl-memo-edit > textarea:is(.dxbl-resize, .dxbl-v-resize, .dxbl-h-resize) {
    resize: none;
}
