/*
 * nxlblazor-shell.css — the application shell (NxlAppShell): its docks, their strips, splits, groups
 * and flyouts, its mobile bar and pages, its navigation and its user menu, and Blazor's own error UI.
 * Global rather than scoped: a host layer overrides the shell's sections with its own markup and
 * reuses these nxl-shell__* and nxl-dock* classes, which a scoped stylesheet would not reach.
 * Every colour is a theme token, so the shell follows light/dark mode and the accent; re-skin it
 * through the --nxl-shell-* custom properties on .nxl-shell.
 */

/* ── Tokens ──────────────────────────────────────────────────────────────────── */

.nxl-shell {
    --nxl-shell-bg: var(--dxds-color-surface-neutral-default-rest);
    --nxl-shell-chrome-bg: var(--dxds-color-surface-neutral-subdued-rest);
    --nxl-shell-border: var(--nxl-border-color);
    --nxl-shell-fg: var(--dxds-color-content-neutral-default-rest);
    --nxl-shell-muted-fg: var(--dxds-color-content-neutral-subdued-rest);
    --nxl-shell-hover: var(--dxds-color-surface-neutral-alpha-hovered);
    --nxl-shell-pressed: var(--dxds-color-surface-neutral-alpha-active);
    --nxl-shell-active-bg: var(--dxds-color-surface-primary-alpha-selected);
    --nxl-shell-active-fg: var(--dxds-color-content-primary-default-rest);
    --nxl-shell-accent: var(--dxds-color-surface-primary-default-rest);
    --nxl-shell-focus: var(--dxds-color-border-focus-default);

    --nxl-shell-bar-height: 3.5rem;
    --nxl-shell-mobilebar-height: 3.5rem;
    --nxl-shell-content-padding: 1rem;
    --nxl-shell-duration: 200ms;
}

/* Popups render outside the shell (DevExpress portals them to the body), so the user menu's
   flyout reads the same tokens from the document root. */
:root {
    --nxl-shell-focus: var(--dxds-color-border-focus-default);
}

/* The shell owns the viewport; the browser's default body margin would make the page scroll. */
body:has(.nxl-shell) {
    margin: 0;
}

/* ── Frame ─────────────────────────────────────────────────────────────────────
   A 5×5 grid — dock, separator, page, separator, dock in each direction — whose areas and tracks
   the shell writes inline from the corner owners and each dock's size. Only the tracks animate,
   so folding a dock slides instead of jumping; a drag turns the animation off. */

.nxl-shell {
    display: grid;
    position: relative;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--nxl-shell-bg);
    color: var(--nxl-shell-fg);
    transition: grid-template-columns var(--nxl-shell-duration) ease, grid-template-rows var(--nxl-shell-duration) ease;
}

/* The mobile layout: the page, the bar under it. A page opened from the bar covers the page's
   cell and leaves the bar in view. */
.nxl-shell--mobile {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "center" "bar";
}

/* Set by the script during a drag — an attribute, since Blazor owns the class list. */
.nxl-shell[data-nxl-resizing],
.nxl-shell[data-nxl-resizing] * {
    transition: none !important;
    user-select: none;
}

.nxl-shell[data-nxl-resizing="x"],
.nxl-shell[data-nxl-resizing="x"] * {
    cursor: col-resize;
}

.nxl-shell[data-nxl-resizing="y"],
.nxl-shell[data-nxl-resizing="y"] * {
    cursor: row-resize;
}

/* ── Keyboard-only affordances: invisible to pointer users ──────────────────── */

.nxl-shell__skip {
    position: fixed;
    inset-inline-start: 0.5rem;
    top: 0.5rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    border-radius: var(--nxl-radius-md);
    background: var(--nxl-shell-bg);
    color: var(--nxl-shell-active-fg);
    box-shadow: var(--nxl-shadow-md);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(calc(-100% - 1rem));
}

.nxl-shell__skip:focus {
    transform: none;
}

.nxl-shell__brand:focus-visible,
.nxl-dock-handle:focus-visible,
.nxl-dock:focus-visible,
.nxl-sidenav__rail-item:focus-visible,
.nxl-topnav__item:focus-visible,
.nxl-usermenu__trigger:focus-visible,
.nxl-usermenu__action:focus-visible,
.nxl-usermenu__segment:focus-visible,
.nxl-usermenu__swatch:focus-visible,
.nxl-usermenu__chip:focus-visible {
    outline: 2px solid var(--nxl-shell-focus);
    outline-offset: 1px;
}

.nxl-dock:focus-visible {
    outline-offset: -2px;
}

.nxl-shell__content:focus,
.nxl-dock:focus:not(:focus-visible) {
    outline: none;
}

/* ── Docks ─────────────────────────────────────────────────────────────────────
   A dock: pinned start items, its body, pinned end items — a column in Left and Right, a row in
   Top and Bottom. */

.nxl-dock {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--nxl-shell-chrome-bg);
}

.nxl-dock--horizontal {
    flex-direction: row;
    align-items: stretch;
}

.nxl-dock--top {
    min-height: var(--nxl-shell-bar-height);
}

.nxl-dock__start,
.nxl-dock__end {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 0;
}

.nxl-dock--horizontal .nxl-dock__start,
.nxl-dock--horizontal .nxl-dock__end {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

/* The end of a side dock: its pinned items under a line. */
.nxl-dock--vertical .nxl-dock__end {
    gap: 0.25rem;
    padding: 0.375rem;
    border-top: 1px solid var(--nxl-shell-border);
}

/* NxlUserMenuActionsPlacement.SameRow: an unfolded side dock's user menu — avatar and name — shares
   one row with the actions after it (the bell, the panels menu). Actions too wide to fit wrap
   below; any other pinned item keeps a row of its own. */
.nxl-dock--vertical :is(.nxl-dock__start--user-row, .nxl-dock__end--user-row) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

:where(.nxl-dock__start--user-row, .nxl-dock__end--user-row) > .nxl-dock__item {
    flex: 1 1 100%;
}

:is(.nxl-dock__start--user-row, .nxl-dock__end--user-row) > .nxl-dock__item:has(> .nxl-usermenu) {
    flex: 1 1 8rem;
}

:is(.nxl-dock__start--user-row, .nxl-dock__end--user-row) > .nxl-dock__item:has(> .nxl-shell__actions) {
    flex: 0 1 auto;
}

/* An actions item with no action to show takes no room. */
.nxl-dock__item:has(> .nxl-shell__actions:empty) {
    display: none;
}

/* A folded dock's toggle, the strip's first icon (an unfolded dock's is on its separator). */
.nxl-dock__toggle {
    display: flex;
    justify-content: center;
}

.nxl-dock__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
}

.nxl-dock--horizontal .nxl-dock__body {
    flex-direction: row;
}

.nxl-dock__split {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
}

/* Several splits share the body through a splitter; DevExpress sizes its panes. */
.nxl-dock__splitter {
    flex: 1 1 0;
    min-height: 0;
    background: transparent;
}

.nxl-dock__splitter .nxl-dock__split {
    height: 100%;
}

/* A panel that is a split of its own: header and body. */

.nxl-dock__panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
}

.nxl-dock__panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-height: 2.25rem;
    padding: 0.25rem 0.375rem 0.25rem 0.75rem;
    border-bottom: 1px solid var(--nxl-shell-border);
}

.nxl-dock__panel-icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    color: var(--nxl-shell-muted-fg);
}

.nxl-dock__panel-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.nxl-dock__panel-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    padding: 0.75rem;
    background: var(--nxl-shell-bg);
}

/* The shell's own parts lay themselves out: no padding, no scroll of their own. */
.nxl-dock__panel-body--bare {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.nxl-dock--horizontal .nxl-dock__panel-body--bare {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

/* Groups: tabs and accordion sections fill their split and scroll inside it. */

.nxl-dock__tabs,
.nxl-dock__accordion {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

.nxl-dock__tabs > .dxbl-tabs {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

.nxl-dock__tabs > .dxbl-tabs > .dxbl-tabs-content-panel {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    background: var(--nxl-shell-bg);
}

.nxl-dock__tab-body,
.nxl-dock__section-body {
    padding: 0.75rem;
}

.nxl-dock__accordion {
    overflow: auto;
}

/* A section that cannot fold keeps its header but loses the fold affordance. */
.nxl-dock__section--fixed > .dxbl-accordion-group-header .dxbl-group-expand-btn {
    visibility: hidden;
}

/* A section's header: its title, then its menu at the end. */
.nxl-dock__section-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
}

.nxl-dock__section-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxl-dock__accordion .dxbl-accordion-item-text-container {
    flex: 1 1 auto;
    min-width: 0;
}

/* The tab strip ends with the selected tab's menu; the strip leaves it room. */
.nxl-dock__tabs {
    position: relative;
}

.nxl-dock__tabs:has(.nxl-dock__group-actions > *) > .dxbl-tabs > .dxbl-tabs-tablist {
    padding-inline-end: var(--nxl-dock-group-actions-width, 2.25rem);
}

.nxl-dock__group-actions {
    position: absolute;
    top: 0.125rem;
    inset-inline-end: 0.125rem;
    z-index: 1;
}

/* A panel's "…" menu: a small icon button that stays quiet until hovered. */
.nxl-shell__icon-button.nxl-dock__menu.dxbl-btn {
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    justify-content: center;
    color: var(--nxl-shell-muted-fg);
}

.nxl-shell__icon-button.nxl-dock__menu.dxbl-btn:hover {
    color: var(--nxl-shell-fg);
}

/* The panels menu: each row leads with the panel's icon (room kept where it has none) and ends
   with a tick while the panel is shown, its room kept while it is not. */
.nxl-shell-panels-menu__item.dxbl-btn {
    width: 100%;
}

.nxl-shell-panels-menu__item .dxbl-btn-caption {
    flex: 1 1 auto;
    text-align: start;
}

.nxl-shell-panels-menu__item::after {
    content: "";
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    margin-inline-start: 1.5rem;
}

.nxl-shell-panels-menu__item--visible::after {
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nxl-shell-panels-menu__no-icon {
    display: inline-block;
    width: 1em;
}

/* ── Strips ──────────────────────────────────────────────────────────────────
   A folded dock: one column (Left, Right) or row (Top, Bottom) of icon-sized items. */

.nxl-dock__strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.375rem 0;
}

.nxl-dock--horizontal .nxl-dock__strip {
    flex-direction: row;
    padding: 0 0.375rem;
}

.nxl-dock__strip-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.nxl-dock--horizontal .nxl-dock__strip-body {
    flex-direction: row;
    width: auto;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.nxl-dock__strip-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    width: 100%;
    padding-top: 0.375rem;
    border-top: 1px solid var(--nxl-shell-border);
}

.nxl-dock--horizontal .nxl-dock__strip-end {
    flex-direction: row;
    width: auto;
    padding: 0 0 0 0.375rem;
    border-top: 0;
    border-inline-start: 1px solid var(--nxl-shell-border);
}

.nxl-dock__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nxl-dock__strip .nxl-dock__item {
    align-items: center;
}

/* The menu on a strip is the rail, and it scrolls alone. */
.nxl-dock__strip-body .nxl-dock__item:has(.nxl-shell__menu) {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
}

/* ── Separators ───────────────────────────────────────────────────────────────
   A 1 px line with a wider invisible hit area, highlighted while in use. */

.nxl-dock-handle,
.nxl-dock-divider {
    position: relative;
    z-index: 2;
    background: var(--nxl-shell-border);
}

.nxl-dock-handle--left,
.nxl-dock-handle--right,
.nxl-dock-divider--left,
.nxl-dock-divider--right {
    width: 1px;
}

.nxl-dock-handle--top,
.nxl-dock-handle--bottom,
.nxl-dock-divider--top,
.nxl-dock-divider--bottom {
    height: 1px;
}

.nxl-dock-handle {
    touch-action: none;
    transition: background-color 150ms, box-shadow 150ms;
}

.nxl-dock-handle--left,
.nxl-dock-handle--right {
    cursor: col-resize;
}

.nxl-dock-handle--top,
.nxl-dock-handle--bottom {
    cursor: row-resize;
}

.nxl-dock-handle::before {
    content: "";
    position: absolute;
    inset: 0 -4px;
}

.nxl-dock-handle--top::before,
.nxl-dock-handle--bottom::before {
    inset: -4px 0;
}

.nxl-dock-handle:hover,
.nxl-dock-handle:focus-visible,
.nxl-shell[data-nxl-resizing] .nxl-dock-handle:active {
    background: var(--nxl-shell-accent);
    box-shadow: 0 0 0 1px var(--nxl-shell-accent);
}

/* The fold button of an unfolded dock: a small round chevron at the separator's start, where the
   strip's toggle will be once folded. Out of the grid's flow (absolute in the separator's area)
   so it never widens the track; quiet until the separator or the button is hovered or focused. */
.nxl-dock-handle__fold {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--nxl-shell-border);
    border-radius: 50%;
    background: var(--nxl-shell-bg);
    color: var(--nxl-shell-muted-fg);
    font-size: 0.875rem;
    box-shadow: var(--nxl-shadow-sm, 0 1px 2px rgb(0 0 0 / 0.15));
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms, color 150ms, border-color 150ms;
}

.nxl-dock-handle__fold--left,
.nxl-dock-handle__fold--right {
    top: 0.625rem;
    left: 50%;
    transform: translateX(-50%);
}

.nxl-dock-handle__fold--top,
.nxl-dock-handle__fold--bottom {
    top: 50%;
    left: 0.625rem;
    transform: translateY(-50%);
}

.nxl-dock-handle:hover + .nxl-dock-handle__fold,
.nxl-dock-handle:focus-visible + .nxl-dock-handle__fold,
.nxl-dock-handle__fold:hover,
.nxl-dock-handle__fold:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Without hover (a touch tablet wide enough for the docks) the button would never show: keep it in view. */
@media (hover: none) {
    .nxl-dock-handle__fold {
        opacity: 1;
        pointer-events: auto;
    }
}

.nxl-dock-handle__fold:hover {
    border-color: var(--nxl-shell-accent);
    color: var(--nxl-shell-fg);
}

.nxl-dock-handle__fold:focus-visible {
    outline: 2px solid var(--nxl-shell-focus);
    outline-offset: 1px;
}

.nxl-shell[data-nxl-resizing] .nxl-dock-handle__fold,
.nxl-shell[data-nxl-dragging] .nxl-dock-handle__fold {
    opacity: 0;
    pointer-events: none;
}

/* ── Strip flyout ──────────────────────────────────────────────────────────────
   A panel opened from a strip's icon, over the page next to the strip, as wide (or tall) as the
   dock would be unfolded. */

.nxl-dock-flyout {
    z-index: 1030;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--nxl-shell-bg);
    box-shadow: var(--nxl-shadow-lg);
    outline: none;
    animation: nxl-dock-flyout-in var(--nxl-shell-duration) ease;
}

.nxl-dock-flyout--left {
    width: min(var(--nxl-dock-left-size, 320px), 100%);
    justify-self: start;
    border-inline-end: 1px solid var(--nxl-shell-border);
}

.nxl-dock-flyout--right {
    width: min(var(--nxl-dock-right-size, 360px), 100%);
    justify-self: end;
    border-inline-start: 1px solid var(--nxl-shell-border);
}

.nxl-dock-flyout--top {
    height: min(var(--nxl-dock-top-size, 240px), 100%);
    align-self: start;
    border-bottom: 1px solid var(--nxl-shell-border);
}

.nxl-dock-flyout--bottom {
    height: min(var(--nxl-dock-bottom-size, 240px), 100%);
    align-self: end;
    border-top: 1px solid var(--nxl-shell-border);
}

@keyframes nxl-dock-flyout-in {
    from {
        opacity: 0;
    }
}

.nxl-dock-flyout__header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    min-height: 3rem;
    padding: 0.25rem 0.375rem 0.25rem 0.75rem;
    border-bottom: 1px solid var(--nxl-shell-border);
}

.nxl-dock-flyout__header .nxl-dock__panel-icon {
    margin-inline-end: 0.25rem;
}

.nxl-dock-flyout__body {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    padding: 0.75rem;
}

/* ── Floating windows ─────────────────────────────────────────────────────────── */

/* DevExpress portals each window to the end of the document: the holder in the shell stays empty. */
.nxl-shell__windows {
    display: contents;
}

.nxl-dock-window .dxbl-window-header {
    padding-block: 0.25rem;
    padding-inline: 0.75rem 0.375rem;
}

.nxl-dock-window__header {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    min-height: 2.25rem;
}

.nxl-dock-window__header .nxl-dock__panel-icon {
    margin-inline-end: 0.25rem;
}

.nxl-dock-window__header[data-nxl-drag] {
    cursor: grab;
}

/* As specific as DevExpress's own body rules, which start items, pad the body and keep its
   children at their content height (flex: 0 0 auto): the panel would then outgrow the window,
   get clipped and never scroll. */
.dxbl-window > .nxl-dock-window > .dxbl-window-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.dxbl-window > .nxl-dock-window > .dxbl-window-body > .nxl-dock-window__body {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    padding: 0.75rem;
    background: var(--nxl-shell-bg);
}

/* Focused only to bring the window forward: the window itself is what shows it. */
.nxl-dock-window__body:focus {
    outline: none;
}

/* Over a drop zone the window lets the zones under it show. */
[data-nxl-window][data-nxl-dragging] {
    opacity: 0.75;
}

/* ── Badges and header actions ───────────────────────────────────────────────── */

.nxl-dock__badge.nxl-badge {
    flex-shrink: 0;
    min-width: 1.125rem;
    padding: 0 0.3125rem;
    font-size: 0.6875rem;
    line-height: 1.125rem;
    text-align: center;
}

.nxl-dock__badge--dot.nxl-badge {
    min-width: 0;
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
}

.nxl-dock__tab-text + .nxl-dock__badge {
    margin-inline-start: 0.375rem;
}

/* A strip icon's badge: a bubble in its corner. */
.nxl-dock__badged {
    position: relative;
    display: inline-flex;
}

.nxl-dock__bubble {
    position: absolute;
    top: 0.125rem;
    inset-inline-end: 0.125rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 0.5rem;
    background: var(--nxl-shell-accent);
    color: var(--dxds-color-content-neutral-default-inverted-rest, #fff);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    pointer-events: none;
}

.nxl-dock__bubble--dot {
    top: 0.4375rem;
    inset-inline-end: 0.4375rem;
    min-width: 0;
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
}

.nxl-dock__bubble[data-color="danger"] { background: var(--dxds-color-surface-danger-default-rest); }
.nxl-dock__bubble[data-color="warning"] { background: var(--dxds-color-surface-warning-default-rest); }
.nxl-dock__bubble[data-color="success"] { background: var(--dxds-color-surface-success-default-rest); }
.nxl-dock__bubble[data-color="info"] { background: var(--dxds-color-surface-info-default-rest); }
.nxl-dock__bubble[data-color="neutral"] { background: var(--dxds-color-surface-neutral-default-rest); }

.nxl-dock__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    flex-shrink: 0;
}

.nxl-dock__actions .dxbl-btn {
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.375rem;
}

.nxl-dock__group-actions {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

/* ── Drag and drop ───────────────────────────────────────────────────────────────
   While a panel is dragged: its legal drop zones, faint; the one under the pointer, strong; a
   label following the pointer. The layer never takes the pointer itself. */

.nxl-dock__panel-header[data-nxl-drag],
.nxl-dock-flyout__header[data-nxl-drag],
.nxl-dock__section-header[data-nxl-drag] {
    cursor: grab;
}

.nxl-shell[data-nxl-dragging],
.nxl-shell[data-nxl-dragging] * {
    cursor: grabbing !important;
    user-select: none;
}

.nxl-dock-drop {
    position: absolute;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
}

.nxl-dock-drop__zone {
    position: absolute;
    border: 2px dashed var(--nxl-shell-accent);
    border-radius: var(--nxl-radius-md);
    opacity: 0.55;
    transition: opacity 120ms, background-color 120ms;
}

.nxl-dock-drop__zone--line {
    border: 0;
    border-radius: 2px;
    background-color: var(--nxl-shell-accent);
}

.nxl-dock-drop__zone--active {
    border-style: solid;
    background-color: var(--nxl-shell-active-bg);
    opacity: 1;
}

/* The page: no outline until the pointer is over it, then the window a drop would open. */
.nxl-dock-drop__zone--window:not(.nxl-dock-drop__zone--active) {
    display: none;
}

.nxl-dock-drop__zone--line.nxl-dock-drop__zone--active {
    background-color: var(--nxl-shell-accent);
    box-shadow: 0 0 0 2px var(--nxl-shell-accent);
}

.nxl-dock-drop__ghost {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1501;
    max-width: 16rem;
    padding: 0.25rem 0.625rem;
    overflow: hidden;
    border-radius: var(--nxl-radius-md);
    background: var(--nxl-shell-accent);
    color: var(--dxds-color-content-neutral-default-inverted-rest, #fff);
    box-shadow: var(--nxl-shadow-md);
    font-size: 0.8125rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

/* ── Brand ─────────────────────────────────────────────────────────────────── */

.nxl-shell__brand-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    min-height: var(--nxl-shell-bar-height);
    padding: 0 0.375rem 0 0.5rem;
    border-bottom: 1px solid var(--nxl-shell-border);
}

.nxl-shell__brand-row--compact {
    justify-content: center;
    width: 100%;
    padding: 0;
}

.nxl-shell__brand-row--inline {
    min-height: 0;
    padding: 0;
    border: 0;
}

.nxl-shell__brand {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border-radius: var(--nxl-radius-md);
    color: inherit;
    text-decoration: none;
    transition: background-color 150ms;
}

.nxl-shell__brand:hover {
    background: var(--nxl-shell-hover);
}

.nxl-shell__brand-row--compact .nxl-shell__brand,
.nxl-shell__mobile-header .nxl-shell__brand {
    flex: 0 1 auto;
}

.nxl-shell__brand-row--inline .nxl-shell__brand {
    flex: 0 0 auto;
}

.nxl-shell__brand-logo {
    display: block;
    width: auto;
    height: 2rem;
    flex-shrink: 0;
}

.nxl-shell__mobile-header .nxl-shell__brand-logo {
    height: 1.75rem;
}

.nxl-shell__brand-name {
    overflow: hidden;
    font-size: 1.0625rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxl-shell__brand-row--inline .nxl-shell__brand-name {
    max-width: 14rem;
}

.nxl-shell__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--nxl-radius-md);
    background: var(--nxl-shell-accent);
    color: var(--dxds-color-content-neutral-default-inverted-rest, #fff);
    font-weight: 700;
}

/* ── Icon buttons (toggles, strip buttons, close) ──────────────────────────── */

.nxl-shell__icon-button.dxbl-btn {
    flex-shrink: 0;
}

/* Icon-only buttons — the shell's own, and every action a module contributes, wherever the
   actions sit — are square and carry a 20 px glyph, matching the rail's menu icons. A
   contributed action keeps its own size mode and render style otherwise, so without this the
   row above the user menu mixed a default-size bell with a large panels button. The signed-out
   user menu's sign-in button sits among them, so it takes the same box and glyph. */
.nxl-shell__icon-button.dxbl-btn,
.nxl-shell__actions .dxbl-btn,
.nxl-usermenu__signin.dxbl-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.625rem;
    justify-content: center;
}

.nxl-shell__icon-button.dxbl-btn .dxbl-image,
.nxl-shell__actions .dxbl-btn .dxbl-image,
.nxl-usermenu__signin.dxbl-btn .dxbl-image {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
}

.nxl-shell__icon-button--active.dxbl-btn,
.nxl-shell__icon-button--active.dxbl-btn:hover {
    background: var(--nxl-shell-active-bg);
    color: var(--nxl-shell-active-fg);
}

.nxl-shell__toggle.dxbl-btn {
    color: var(--nxl-shell-muted-fg);
}

.nxl-shell__toggle.dxbl-btn:hover {
    color: var(--nxl-shell-fg);
}

/* ── Regions ───────────────────────────────────────────────────────────────── */

.nxl-shell__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.125rem;
    min-width: 0;
}

.nxl-dock--vertical.nxl-dock--strip .nxl-shell__actions {
    flex-direction: column;
    flex-wrap: nowrap;
}

.nxl-dock--horizontal .nxl-shell__actions {
    flex-wrap: nowrap;
}

.nxl-shell__spacer {
    flex: 1 1 auto;
}

.nxl-shell__filter {
    min-width: 0;
}

.nxl-shell__filter-box {
    width: 100%;
}

/* ── Menu ────────────────────────────────────────────────────────────────────── */

.nxl-shell__menu-header,
.nxl-shell__menu-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.625rem 0.75rem;
}

.nxl-shell__menu-footer {
    border-top: 1px solid var(--nxl-shell-border);
}

.nxl-shell__menu {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.25rem 0.375rem;
}

.nxl-dock__strip .nxl-shell__menu {
    width: 100%;
    padding: 0;
}

/* In Top or Bottom the menu is a row: only it gives way when the bar is narrow — it scrolls. */
.nxl-dock--horizontal .nxl-shell__menu {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.nxl-dock--horizontal .nxl-shell__menu-header,
.nxl-dock--horizontal .nxl-shell__menu-footer {
    flex-direction: row;
    align-items: center;
    padding: 0;
    border: 0;
    white-space: nowrap;
}

/* ── Menu: the tree ─────────────────────────────────────────────────────────── */

.nxl-sidenav {
    --dxbl-treeview-item-content-indent: 0.75em !important;
}

/* Block-level flex, so the row's height does not depend on the first child's text baseline —
   an icon-less item starts with an empty placeholder, which has none. */
.nxl-sidenav__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.nxl-sidenav__icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1em;
    font-size: 1.125rem;
    line-height: 1;
    text-align: center;
    opacity: 0.85;
}

.nxl-sidenav__text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The bookmark buttons after a label: at the row's end, shown while the row is hovered
   or holds focus. Touch screens have no hover, so they never show there; the page header's star
   and the editor cover them. */
.nxl-sidenav__item {
    flex: 1 1 auto;
}

.nxl-sidenav__actions {
    display: inline-flex;
    margin-inline-start: auto;
    padding-inline-start: 0.25rem;
    opacity: 0;
    transition: opacity 0.12s ease-in-out;
}

.dxbl-treeview-item-content:hover .nxl-sidenav__actions,
.nxl-sidenav__actions:focus-within {
    opacity: 1;
}

@media (hover: none) {
    .nxl-sidenav__actions {
        display: none;
    }
}

.nxl-sidenav__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--nxl-shell-muted-fg);
    cursor: pointer;
}

.nxl-sidenav__action:hover,
.nxl-sidenav__action:focus-visible {
    color: var(--nxl-shell-active-fg);
    background: var(--nxl-shell-hover);
}

.nxl-sidenav__action--pinned {
    color: var(--nxl-shell-active-fg);
}

/* The bookmarks' header in the side tree: their title, and the editor's pencil at the row's end. */
.nxl-sidenav-section {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 1.75rem;
    padding: 0.25rem 0.5rem 0 0.75rem;
}

.nxl-sidenav-section__title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--nxl-shell-muted-fg);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* The line between the bookmarks and the application's menu, in the tree and on the rail. */
.nxl-sidenav-separator {
    margin: 0.375rem 0.5rem;
    border-top: 1px solid var(--nxl-shell-border);
}

.nxl-sidenav-separator--rail {
    margin: 0.375rem 0.25rem;
}

.nxl-sidenav__item--ancestor {
    color: var(--nxl-shell-active-fg);
}

.nxl-sidenav__item--active {
    color: var(--nxl-shell-active-fg);
    font-weight: 600;
}

.nxl-sidenav__item--active .nxl-sidenav__icon,
.nxl-sidenav__item--ancestor .nxl-sidenav__icon {
    opacity: 1;
}

.nxl-sidenav__empty {
    margin: 0.75rem 0.5rem;
    color: var(--nxl-shell-muted-fg);
    font-size: 0.875rem;
}

/* ── Menu: the rail ─────────────────────────────────────────────────────────── */

.nxl-sidenav--rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
}

.nxl-sidenav__rail-item,
.nxl-sidenav__rail-item.dxbl-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--nxl-radius-md);
    color: inherit;
    font-size: 1.25rem;
    text-decoration: none;
    transition: background-color 150ms;
}

.nxl-sidenav__rail-item:hover {
    background: var(--nxl-shell-hover);
}

.nxl-sidenav__rail-item.dxbl-btn .dxbl-image {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
}

.nxl-sidenav__rail-item--active,
.nxl-sidenav__rail-item--ancestor,
.nxl-sidenav__rail-item--active.dxbl-btn,
.nxl-sidenav__rail-item--ancestor.dxbl-btn {
    background: var(--nxl-shell-active-bg);
    color: var(--nxl-shell-active-fg);
}

/* A bar at the rail's edge marks where the current page is. */
.nxl-sidenav__rail-item--active::before,
.nxl-sidenav__rail-item--ancestor::before {
    content: "";
    position: absolute;
    inset-block: 0.625rem;
    inset-inline-start: -0.5rem;
    width: 3px;
    border-radius: 3px;
    background: var(--nxl-shell-accent);
}

/* ── Flyouts of the rail and the top nav ────────────────────────────────────── */

.nxl-nav-dropdown__item--active,
.nxl-nav-dropdown__item--ancestor {
    color: var(--nxl-shell-active-fg, var(--dxds-color-content-primary-default-rest));
}

.nxl-nav-dropdown__item--active {
    font-weight: 600;
}

/* ── Menu: the top nav ─────────────────────────────────────────────────────── */

.nxl-topnav {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    height: 100%;
    margin: 0;
    padding: 0 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    list-style: none;
    scrollbar-width: none;
}

.nxl-topnav::-webkit-scrollbar {
    display: none;
}

/* The clipped edge fades, so a row that scrolls looks like one. */
.nxl-topnav--overflow-end {
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
}

.nxl-topnav--overflow-start {
    mask-image: linear-gradient(to right, transparent, #000 2.5rem);
}

.nxl-topnav--overflow-start.nxl-topnav--overflow-end {
    mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
}

.nxl-topnav__entry {
    flex-shrink: 0;
}

.nxl-topnav__item,
.nxl-topnav__item.dxbl-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: var(--nxl-radius-md);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 150ms;
}

.nxl-topnav__item:hover {
    background: var(--nxl-shell-hover);
}

.nxl-topnav__item--active,
.nxl-topnav__item--ancestor,
.nxl-topnav__item--active.dxbl-btn,
.nxl-topnav__item--ancestor.dxbl-btn {
    color: var(--nxl-shell-active-fg);
}

.nxl-topnav__item.dxbl-btn {
    font-weight: inherit;
}

.nxl-topnav__item--active,
.nxl-topnav__item--active.dxbl-btn {
    font-weight: 600;
}

.nxl-topnav__item--active::after,
.nxl-topnav__item--ancestor::after {
    content: "";
    position: absolute;
    inset-inline: 0.75rem;
    bottom: -0.625rem;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--nxl-shell-accent);
}

/* ── Mobile: the bottom bar ────────────────────────────────────────────────────
   Icon over label, as phones do. The bar clears the home indicator, and gives way to the
   on-screen keyboard (the script marks the root while a text field has focus). */

.nxl-shell__mobilebar {
    grid-area: bar;
    z-index: 2;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.25rem;
    min-width: 0;
    height: calc(var(--nxl-shell-mobilebar-height) + env(safe-area-inset-bottom, 0px));
    padding: 0 max(0.25rem, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(0.25rem, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--nxl-shell-border);
    background: var(--nxl-shell-chrome-bg);
}

.nxl-shell[data-nxl-keyboard] .nxl-shell__mobilebar {
    display: none;
}

.nxl-shell__mobile-slot {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
    max-width: 6rem;
    margin: 0;
    padding: 0.25rem 0.125rem;
    border: 0;
    border-radius: var(--nxl-radius-md);
    background: none;
    color: var(--nxl-shell-muted-fg);
    font: inherit;
    font-size: 0.6875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nxl-shell__mobile-slot:hover {
    color: var(--nxl-shell-fg);
}

.nxl-shell__mobile-slot--active,
.nxl-shell__mobile-slot--active:hover {
    color: var(--nxl-shell-active-fg);
}

.nxl-shell__mobile-slot:disabled {
    opacity: 0.4;
    cursor: default;
}

.nxl-shell__mobile-slot:focus-visible {
    outline: 2px solid var(--nxl-shell-focus);
    outline-offset: -2px;
}

/* The pill behind the icon marks the open page. */
.nxl-shell__mobile-slot-icon {
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 1.75rem;
    border-radius: 0.875rem;
    font-size: 1.375rem;
    transition: background-color 150ms;
}

.nxl-shell__mobile-slot--active .nxl-shell__mobile-slot-icon {
    background: var(--nxl-shell-active-bg);
}

.nxl-shell__mobile-slot-icon .nxl-dock__bubble {
    top: -0.125rem;
    inset-inline-end: 0.5rem;
}

.nxl-shell__mobile-slot-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Mobile: the pages ─────────────────────────────────────────────────────────
   Full screen over the page's cell, the bar still below. Each has a fixed header and a body that
   scrolls. */

.nxl-shell__mobile-page {
    grid-area: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--nxl-shell-bg);
    animation: nxl-mobile-page-in var(--nxl-shell-duration) ease;
}

.nxl-shell__mobile-page:focus {
    outline: none;
}

@keyframes nxl-mobile-page-in {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
}

.nxl-shell__mobile-header,
.nxl-shell__mobile-panel-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 0;
    min-height: var(--nxl-shell-bar-height);
    padding: 0 0.375rem 0 0.5rem;
    border-bottom: 1px solid var(--nxl-shell-border);
    background: var(--nxl-shell-chrome-bg);
}

/* The brand gives way (its name truncates); the buttons never overlap. */
.nxl-shell__mobile-header > * {
    flex-shrink: 0;
}

.nxl-shell__mobile-header > .nxl-shell__brand {
    flex-shrink: 1;
}

.nxl-shell__mobile-header .nxl-shell__actions {
    flex-wrap: nowrap;
}

.nxl-shell__mobile-panel-header {
    gap: 0.5rem;
    padding-inline: 0.25rem;
}

.nxl-shell__mobile-panel-header .nxl-dock__panel-icon {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
}

.nxl-shell__mobile-panel-header .nxl-shell__icon-button + .nxl-dock__panel-icon {
    margin-inline-start: 0;
}

.nxl-shell__mobile-panel-header .nxl-dock__panel-title {
    font-size: 1rem;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}

.nxl-shell__mobile-menu,
.nxl-shell__mobile-panels,
.nxl-shell__mobile-panel-body,
.nxl-shell__mobile-shortcut {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.nxl-shell__mobile-menu {
    display: flex;
    flex-direction: column;
}

.nxl-shell__mobile-panel-body,
.nxl-shell__mobile-shortcut {
    padding: 0.75rem;
}

/* The Panels page: a card per split — a group's members share one. */
.nxl-shell__mobile-panels {
    padding: 0.75rem;
}

.nxl-shell__mobile-group {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--nxl-shell-border);
    border-radius: var(--nxl-radius-lg, 0.5rem);
    background: var(--nxl-shell-chrome-bg);
    list-style: none;
}

.nxl-shell__mobile-group + .nxl-shell__mobile-group {
    margin-top: 0.5rem;
}

.nxl-shell__mobile-group > li + li {
    border-top: 1px solid var(--nxl-shell-border);
}

.nxl-shell__mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 3rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nxl-shell__mobile-link:hover,
.nxl-shell__mobile-link:active {
    background: var(--nxl-shell-hover);
}

.nxl-shell__mobile-link:focus-visible {
    outline: 2px solid var(--nxl-shell-focus);
    outline-offset: -2px;
}

.nxl-shell__mobile-link-icon {
    flex-shrink: 0;
    color: var(--nxl-shell-muted-fg);
    font-size: 1.25rem;
}

.nxl-shell__mobile-link-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxl-shell__mobile-link .nxl-dock__bubble {
    position: static;
}

.nxl-shell__mobile-link-chevron {
    flex-shrink: 0;
    color: var(--nxl-shell-muted-fg);
}

/* ── Page column ───────────────────────────────────────────────────────────── */

.nxl-shell__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.nxl-shell__banners {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.nxl-shell__content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: var(--nxl-shell-content-padding);
}

.nxl-shell__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    flex-shrink: 0;
    padding: 0.5rem var(--nxl-shell-content-padding);
    border-top: 1px solid var(--nxl-shell-border);
    color: var(--nxl-shell-muted-fg);
    font-size: 0.8125rem;
}

.nxl-shell-banner {
    --nxl-banner-bg: var(--dxds-color-surface-info-subdued-rest);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 0.5rem var(--nxl-shell-content-padding, 1rem);
    border-bottom: 1px solid var(--nxl-shell-border, var(--nxl-border-color));
    background: var(--nxl-banner-bg);
    font-size: 0.875rem;
}

.nxl-shell-banner--success { --nxl-banner-bg: var(--dxds-color-surface-success-subdued-rest); }
.nxl-shell-banner--warning { --nxl-banner-bg: var(--dxds-color-surface-warning-subdued-rest); }
.nxl-shell-banner--danger  { --nxl-banner-bg: var(--dxds-color-surface-danger-subdued-rest); }
.nxl-shell-banner--primary { --nxl-banner-bg: var(--dxds-color-surface-primary-alpha-selected); }
.nxl-shell-banner--neutral { --nxl-banner-bg: var(--dxds-color-surface-neutral-subdued-rest); }

.nxl-shell-banner__icon {
    flex-shrink: 0;
    font-size: 1.125rem;
}

.nxl-shell-banner__text {
    flex: 1 1 auto;
    min-width: 0;
}

.nxl-shell-banner__actions {
    display: flex;
    gap: 0.25rem;
}

/* ── User menu ─────────────────────────────────────────────────────────────── */

.nxl-usermenu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.nxl-usermenu--wide {
    width: 100%;
}

/* The user menu as a mobile page: the flyout's panel, inline and as wide as a phone allows. */
.nxl-usermenu--page {
    display: block;
}

.nxl-usermenu--page .nxl-usermenu__panel {
    width: auto;
    max-width: 32rem;
    margin-inline: auto;
}

.nxl-usermenu__trigger {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    margin: 0;
    padding: 0.375rem 0.5rem;
    border: 0;
    border-radius: var(--nxl-radius-md);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: background-color 150ms;
}

.nxl-usermenu__trigger:hover,
.nxl-usermenu__trigger[aria-expanded="true"] {
    background: var(--nxl-shell-hover, var(--dxds-color-surface-neutral-alpha-hovered));
}

.nxl-usermenu--compact .nxl-usermenu__trigger,
.nxl-usermenu__trigger--icon {
    flex: 0 0 auto;
    padding: 0.25rem;
}

/* The preferences trigger beside the sign-in button: boxed like the shell's icon buttons, on a
   strip too. */
.nxl-usermenu .nxl-usermenu__trigger--icon {
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.625rem;
    font-size: 1.25rem;
}

.nxl-usermenu--inline .nxl-usermenu__trigger {
    flex: 0 1 auto;
}

.nxl-usermenu--inline .nxl-usermenu__name {
    max-width: 12rem;
}

.nxl-usermenu--compact {
    flex-direction: column;
}

.nxl-usermenu__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxl-usermenu__chevron {
    flex-shrink: 0;
    opacity: 0.6;
}

.nxl-usermenu--wide .nxl-usermenu__signin {
    flex: 1 1 auto;
}

.nxl-usermenu--wide .nxl-usermenu__signin.dxbl-btn {
    justify-content: flex-start;
}

/* The flyout */

.nxl-usermenu__panel {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    width: 18rem;
    max-width: calc(100vw - 2rem);
}

.nxl-usermenu__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--nxl-border-color);
}

.nxl-usermenu__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nxl-usermenu__header-name,
.nxl-usermenu__header-secondary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxl-usermenu__header-name {
    font-weight: 600;
}

.nxl-usermenu__header-secondary {
    color: var(--dxds-color-content-neutral-subdued-rest);
    font-size: 0.8125rem;
}

.nxl-usermenu__section {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.nxl-usermenu__label {
    color: var(--dxds-color-content-neutral-subdued-rest);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nxl-usermenu__actions {
    gap: 0.125rem;
    margin-inline: -0.5rem;
}

.nxl-usermenu__action {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4375rem 0.5rem;
    border-radius: var(--nxl-radius-md);
    color: inherit;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 150ms;
}

.nxl-usermenu__action:hover {
    background: var(--dxds-color-surface-neutral-alpha-hovered);
}

.nxl-usermenu__action i {
    width: 1.25rem;
    font-size: 1.125rem;
    text-align: center;
    opacity: 0.8;
}

.nxl-usermenu__segmented {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 0.125rem;
    padding: 0.1875rem;
    border-radius: var(--nxl-radius-md);
    background: var(--dxds-color-surface-neutral-subdued-rest);
}

.nxl-usermenu__segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin: 0;
    padding: 0.3125rem 0.5rem;
    border: 0;
    border-radius: var(--nxl-radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

.nxl-usermenu__segment:hover {
    background: var(--dxds-color-surface-neutral-alpha-hovered);
}

.nxl-usermenu__segment--selected,
.nxl-usermenu__segment--selected:hover {
    background: var(--dxds-color-surface-neutral-default-rest);
    box-shadow: var(--nxl-shadow-sm);
    font-weight: 600;
}

.nxl-usermenu__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4375rem;
}

.nxl-usermenu__swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--nxl-swatch);
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 120ms;
}

.nxl-usermenu__swatch:hover {
    transform: scale(1.1);
}

.nxl-usermenu__swatch--selected {
    box-shadow: 0 0 0 2px var(--dxds-color-surface-neutral-default-rest), 0 0 0 4px var(--nxl-swatch);
}

.nxl-usermenu__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.nxl-usermenu__chip {
    margin: 0;
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--nxl-border-color);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

.nxl-usermenu__chip:hover {
    background: var(--dxds-color-surface-neutral-alpha-hovered);
}

.nxl-usermenu__chip--selected,
.nxl-usermenu__chip--selected:hover {
    border-color: var(--dxds-color-content-primary-default-rest);
    background: var(--dxds-color-surface-primary-alpha-selected);
    color: var(--dxds-color-content-primary-default-rest);
    font-weight: 600;
}

/* More languages than chips: the current one opens a searchable list. */
.nxl-usermenu__language-current,
.nxl-usermenu__language-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.375rem 0.5rem;
    border: 0;
    border-radius: var(--nxl-radius-sm, 4px);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.8125rem;
    text-align: start;
    cursor: pointer;
}

.nxl-usermenu__language-current {
    border: 1px solid var(--nxl-border-color);
}

.nxl-usermenu__language-current:hover,
.nxl-usermenu__language-option:hover {
    background: var(--dxds-color-surface-neutral-alpha-hovered);
}

.nxl-usermenu__language-current:focus-visible,
.nxl-usermenu__language-option:focus-visible {
    outline: 2px solid var(--dxds-color-border-primary-default-rest, currentColor);
    outline-offset: 1px;
}

.nxl-usermenu__language-chevron,
.nxl-usermenu__language-check {
    margin-inline-start: auto;
}

.nxl-usermenu__language-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.nxl-usermenu__language-options {
    max-height: 14rem;
    overflow-y: auto;
}

/* Beside the user menu: its own width, and nothing above the search box. */
.nxl-usermenu__language-flyout .nxl-usermenu__language-list {
    width: 15rem;
    max-width: calc(100vw - 2rem);
    margin-top: 0;
}

.nxl-usermenu__language-option--selected,
.nxl-usermenu__language-option--selected:hover {
    background: var(--dxds-color-surface-primary-alpha-selected);
    color: var(--dxds-color-content-primary-default-rest);
    font-weight: 600;
}

.nxl-usermenu__footer {
    display: flex;
    padding-top: 0.5rem;
    border-top: 1px solid var(--nxl-border-color);
}

.nxl-usermenu__signout {
    flex: 1 1 auto;
}

.nxl-usermenu__footer .dxbl-btn {
    justify-content: flex-start;
}

/* ── Blazor error UI ───────────────────────────────────────────────────────────
   The host's App.razor renders #blazor-error-ui on every page, outside the shell; Blazor sets
   display: block on it when a circuit fails, so it stays hidden until then. The warning tint is
   layered over the page surface because the band floats over content and a subdued token may be
   translucent. An <ErrorBoundary> without ErrorContent renders an empty .blazor-error-boundary. */

#blazor-error-ui {
    background:
        linear-gradient(var(--dxds-color-surface-warning-subdued-rest, lightyellow), var(--dxds-color-surface-warning-subdued-rest, lightyellow)),
        var(--dxds-color-surface-neutral-default-rest, white);
    border-top: 1px solid var(--dxds-color-border-warning-default-rest, #e0c000);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    color: var(--dxds-color-content-neutral-default-rest, black);
    display: none;
    left: 0;
    padding: 0.6rem 2.5rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--dxds-color-surface-danger-subdued-rest, #fde7e9);
    border: 1px solid var(--dxds-color-border-danger-default-rest, #b32121);
    border-radius: 0.25rem;
    color: var(--dxds-color-content-danger-default-rest, #b32121);
    padding: 1rem 1.25rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .nxl-shell,
    .nxl-shell__mobile-page,
    .nxl-shell__mobile-slot-icon,
    .nxl-dock-flyout,
    .nxl-dock-handle,
    .nxl-usermenu__swatch {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
