/* =====================================================
   INRADR — Dashboards — business cockpit, DevExpress Dashboards surfaces, DxChart
   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).
   ===================================================== */

/* ---- Business cockpit (Placeholder_DashboardView, WP-17) ----
   Model classes from INRADR.Module.Blazor/Model.DesignedDiffs.xafml. DOM (26.1 capture
   "Business cockpit (WP-17)"): dxbl-form-layout-group.dxbl-fl-group.business-cockpit-indicators
   > .dxbl-row > [ dxbl-form-layout-group.dxbl-col-md-6.inhalt > .dxbl-row > 4 x dxbl-form-layout-item
   (.in-entwicklung, .bald-verfuegbar, .ansicht, .text) > .dxbl-fl-ctrl > label (XAF static text),
   dxbl-form-layout-item.dxbl-col-md-6.placeholder-image > .dxbl-fl-ctrl > .static-image-container > img ].
   The groups have no caption, so 26.1 renders them without the .dxbl-group card: there is no group
   chrome left to remove (A reset it with !important overrides). DX already sizes both columns
   col-md-6, i.e. 50/50 from 768px.

   The error states (DataNotAvailable_DashboardView, ServiceNotAvailable_DashboardView; OpenSpec change
   add-data-unavailable-state) follow the placeholder's layout under neutral classes:
   dxbl-form-layout-group.inradr-state > .dxbl-row > [ .inradr-state__content > (.inradr-state__title,
   .inradr-state__text), .inradr-state__image ]. They share the placeholder's rules below; only the
   image cap is their own. */

/* Breathing room around the placeholder (A: 32 / 24 / 16px). Replaces the column gutter
   ('.dxbl-col{padding-inline:...}') of the outer layout row. */
.dxbl-fl .dxbl-fl-group.business-cockpit-indicators,
.dxbl-fl .dxbl-fl-group.inradr-state {
    padding: var(--inradr-space-lg);
}

/* 40px between text and image (A; no spacing token). As the row gutter it is split into 20px column
   padding, so each column stays exactly half the row. Declared on the row itself by
   '.dxbl-fl .dxbl-row:has(>.dxbl-fl-group)' (0,3,0); (0,4,0) wins. Re-verify on DX upgrade. */
.dxbl-fl .dxbl-fl-group.business-cockpit-indicators > .dxbl-row,
.dxbl-fl .dxbl-fl-group.inradr-state > .dxbl-row {
    --dxbl-row-item-spacing-x: 40px;
    align-items: center;
}

/* The text column: a centred block of at most 600px with 8px between the lines (A). No gutter, so
   the auto margins centre it. Declared on '.dxbl-fl .dxbl-row' (0,2,0). Re-verify on DX upgrade. */
.dxbl-fl .business-cockpit-indicators .inhalt > .dxbl-row,
.dxbl-fl .inradr-state .inradr-state__content > .dxbl-row {
    --dxbl-row-item-spacing-x: 0;
    --dxbl-row-item-spacing-y: var(--inradr-space-xs);
    max-width: 600px;
    margin-inline: auto;
}

.business-cockpit-indicators .bald-verfuegbar {
    padding-bottom: var(--inradr-space-xxs);
}

.business-cockpit-indicators .ansicht,
.inradr-state .inradr-state__title {
    padding-bottom: var(--inradr-space-md);
}

/* Typography of the four static texts (XAF StaticTextComponent renders a label.xaf-static-text).
   Fixed body sizes (OQ-24); the two display lines keep A's fluid scale between tokens, because the
   hero line must not wrap on narrow screens. Ubuntu has no 600, so A's 600 rendered as 700. */
.business-cockpit-indicators .in-entwicklung label {
    font-size: var(--inradr-text-body-size);
    font-weight: var(--inradr-text-body-bold-weight);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--inradr-color-text-secondary);
}

.business-cockpit-indicators .bald-verfuegbar label {
    display: block;
    font-size: clamp(var(--inradr-text-display-size), 4.5vw, calc(2 * var(--inradr-text-display-size)));
    font-weight: var(--inradr-text-display-weight);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--inradr-color-text-heading);
}

/* An error state's heading takes the placeholder's subheading: a clear title, not the hero line. */
.business-cockpit-indicators .ansicht label,
.inradr-state .inradr-state__title label {
    font-size: clamp(var(--inradr-text-h2-size), 2.2vw, var(--inradr-text-display-size));
    font-weight: var(--inradr-text-h2-weight);
    line-height: 1.3;
    color: var(--inradr-color-text-heading);
}

.business-cockpit-indicators .text label,
.inradr-state .inradr-state__text label {
    display: block;
    max-width: 480px;
    font-size: var(--inradr-text-body-size);
    font-weight: var(--inradr-text-body-weight);
    line-height: 1.6;
    color: var(--inradr-color-text-secondary);
}

/* The image scales with its column. XAF's StaticImageComponent writes the image's pixel size into
   the inline style (width/height from data-dx-style); max-width caps the width, the height has to
   follow the aspect ratio. */
.business-cockpit-indicators .placeholder-image .static-image,
.inradr-state .inradr-state__image .static-image {
    display: block;
    max-width: 100%;
    height: auto !important; /* !important: XAF writes the pixel height inline */
    border-radius: var(--inradr-radius-sm);
}

/* The error states' SVG illustrations are 1024px square (SvgImageWidth/Height in the module model):
   capped well below the column and centred in it, so the message stays the larger part of the screen.
   The cap beats XAF's inline width, because max-width wins over width. Their fills are dark navy and
   near-black, so they sit on a light plate in both appearances (DSX-20; white on the white Light canvas). */
.inradr-state .inradr-state__image .static-image {
    max-width: min(100%, 28rem);
    margin-inline: auto;
    background-color: var(--inradr-color-light-plate);
}

/* Stacked below 992px (A); DX would keep 50/50 down to 768px. */
@media (max-width: 991px) {
    .dxbl-fl .dxbl-fl-group.business-cockpit-indicators,
    .dxbl-fl .dxbl-fl-group.inradr-state {
        padding: var(--inradr-space-md);
    }

    .dxbl-fl .dxbl-fl-group.business-cockpit-indicators > .dxbl-row,
    .dxbl-fl .dxbl-fl-group.inradr-state > .dxbl-row {
        --dxbl-row-item-spacing-y: var(--inradr-space-lg);
    }

    /* Beats '.dxbl-col-md-6{width:50%}' (0,1,0, min-width 768px). */
    .business-cockpit-indicators > .dxbl-row > :is(.inhalt, .placeholder-image),
    .inradr-state > .dxbl-row > :is(.inradr-state__content, .inradr-state__image) {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .dxbl-fl .dxbl-fl-group.business-cockpit-indicators,
    .dxbl-fl .dxbl-fl-group.inradr-state {
        padding: var(--inradr-space-sm);
    }

    .dxbl-fl .dxbl-fl-group.business-cockpit-indicators > .dxbl-row,
    .dxbl-fl .dxbl-fl-group.inradr-state > .dxbl-row {
        --dxbl-row-item-spacing-y: var(--inradr-space-md);
    }
}

/* ---- DevExpress Dashboards (DashboardViewItem) ----
   White surfaces instead of the viewer's grey control ('.dx-dashboard-control{background-color:#efefef}',
   dx-dashboard.light.min.css 26.1.4). The viewer publishes no CSS variables for its surfaces, so the
   backgrounds are set directly; that stylesheet sets none on these four classes, so plain class rules
   suffice. Tab-page containers keep DX's tab states (more specific rules). A's .xaf-dashboard-view and
   .dx-dashboard-item-wrapper do not exist in 26.1 and are dropped.
   ANNAHME (WP-00): not measurable (2026-09-30): the Dashboards module is registered, but DashboardData_ListView
   is empty, and creating a dashboard would write data. */
.dx-dashboard-surface,
.dx-dashboard-item,
.dx-dashboard-item-container,
.dx-dashboard-group-item {
    background-color: var(--inradr-color-surface);
}

/* ---- Plotly chart cards (InradrPlotlyCard.razor) ----
   .js-plotly-plot / .plot-container are Plotly's own wrappers (Plotly.Blazor, plotly 3.7.0; not
   DevExpress). They fill the card's .inradr-chart-card__plot - or the scroll canvas inside it
   (.inradr-chart-card__canvas) - so Plotly's autosize measures the card.
   DOM: capture "Property dashboard Allokation Regional (test plan 8.13)": div.inradr-chart-card__plot >
   div.js-plotly-plot. ANNAHME (WP-00) only for the scroll canvas (.inradr-chart-card__canvas): no tenant
   in the test data has enough categories for a scrolling bar list. */
.inradr-chart-card__plot > .js-plotly-plot,
.inradr-chart-card__plot > .js-plotly-plot .plot-container,
.inradr-chart-card__canvas > .js-plotly-plot,
.inradr-chart-card__canvas > .js-plotly-plot .plot-container {
    width: 100%;
    height: 100%;
}
