/* =====================================================
   INRADR — Shell hooks — html/body/app, #blazor-error-ui, XAF .main-content, skip link, loading indicator, alerts
   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).
   ===================================================== */

/* ── Page height chain ────────────────────────────────────────────
   The SDI shell fills the viewport. <app class="d-none"> is an XAF contract (XAF styles.css
   app.d-none + loadingPanelObserver); only its display and height are set here. */
html,
body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}

/* ── Page canvas ─────────────────────────────────────────────────
   XAF colours the body from the Fluent neutral surface (styles.css 26.1.4:
   body{background-color:var(--dxds-color-surface-neutral-default-rest,var(--bs-body-bg))}, #fffffe in
   modes/light.min.css), so the canvas missed the DS surface by one bit (124ca7cpwre). Set as a property,
   not through the token: the token would also recolour every DevExpress surface below the body. Same
   specificity as XAF, later in the cascade: no !important. #blazor-error-ui inherits it. The canvas token is
   white in Light and the muted Deep Sea in Dark (inradr-color.css). */
body {
    background-color: var(--inradr-color-canvas);
}

/* ── Splash screen ────────────────────────────────────────────────
   XAF's SplashScreenContainer renders div#applicationLoadingPanel.loading-items-center over the whole
   viewport until the circuit is up (DX 26.1 sources Components/SplashScreenContainer.razor). It stays light
   in both appearances (DSX-20): LoginLogo.png has black lettering that a dark canvas would swallow. */
#applicationLoadingPanel {
    background-color: var(--inradr-color-light-plate);
}

/* ── Blazor/XAF error UI (OQ-33: XAF standard, never force-hidden) ─
   _Host.cshtml renders <div id="blazor-error-ui"> around XAF's BlazorError, which draws
   #xaf-error-page with the "Refresh Page" button. blazor.server.js shows it with an inline
   display:block on an unhandled circuit error, so display:none here is only the resting state and
   needs no !important. Hiding it for good (A) would leave users on a dead circuit. The layer sits
   above XAF's alerts (31000) and loading indicator (100000), below the reconnect dialog (100050). */
#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: var(--inradr-layer-error-ui);
}

/* ── Content body borrows XAF's .main-content hook (M1) ─────────────
   .inradr-content-body carries .main-content so the stock xaf.resetMainContentScrollPosition
   finds our scroll surface on view change. That class also pulls in XAF's own padding
   (styles.css 26.1.4: .main-content.xaf-flex-auto .5rem sides and bottom, 1rem sides from 576px,
   and from 576px .dxbl-theme-fluent .main-content.xaf-flex-auto {padding-top:.5rem;
   padding-bottom:1rem}), so the design-system padding of inradr-shell.css is restored here at a
   higher specificity. */
.inradr-content-body.main-content.xaf-flex-auto,
.dxbl-theme-fluent .inradr-content-body.main-content.xaf-flex-auto {
    padding: 0 var(--inradr-content-gutter) var(--inradr-space-sm);
}

/* ── XAF skip link only for keyboard focus ─────────────────────────
   XAF slides a.xaf-skip-navigation-link in over the logo on any :focus (styles.css 26.1, top
   -3.8rem → 10px, opacity 0 → 1). When a DevExpress popup closes and its opener is gone - the
   object-model dialog of the column chooser replaces the grid editor - focus falls back to the
   first focusable element, the skip link, after a mouse click. Without :focus-visible it keeps
   XAF's resting state; keyboard users still get the link. Same specificity as XAF plus one
   pseudo-class, later in the cascade: no !important. */
a.xaf-skip-navigation-link:focus:not(:focus-visible) {
    opacity: 0;
    top: -3.8rem;
}

/* ── XAF loading indicator ─────────────────────────────────────────
   XAF styles.css 26.1.4 colours ".xaf-loading-content .spinner-border" (border currentcolor, right
   side transparent) from this public token (CoolBlue primary by default). Scoping the token to the
   indicator turns the spinner navy without touching Fluent's primary anywhere else, and without
   anchoring on the Bootstrap-named spinner class. */
.xaf-loading-content {
    --dxds-color-surface-primary-default-rest: var(--inradr-color-navy);
}

/* ── XAF alerts stack ──────────────────────────────────────────────
   XAF renders div.xaf-alerts-stack > .xaf-alerts-stack-inner > .xaf-alerts-stack-scrollable at the
   end of <body> (26.1 capture "Alert stack (WP-09)") and gives the stack and its inner column the
   full viewport height (pointer-events:none on the stack). Sized to its content instead, with a
   capped, scrolling list of alerts, so a burst of messages never covers the view. Same specificity
   as XAF, later in the cascade: no !important. XAF's z-index 31000 already sits above all INRADR
   chrome, DevExpress popups and the product tour, so it is not touched. The element order inside an
   alert stays XAF's (icon, text, actions; OQ-34). */
.xaf-alerts-stack,
.xaf-alerts-stack-inner {
    height: auto;
    min-height: 0;
}

/* 300px is A's cap (no design token); beyond it the list scrolls. overflow-y stays on while XAF
   toggles .scrolling-enabled around its slide animations (A parity); XAF hides the scroll bar from
   576px up. */
.xaf-alerts-stack-scrollable {
    max-height: 300px;
    overflow-y: auto;
}
