/* ============================================
   StandardsCore.Ui Component Library Styles
   ============================================ */

.sc-ui-wait-cursor,
.sc-ui-wait-cursor * {
    cursor: wait !important;
}

/* ----- Brand Colors (CSS Variables) -----
   DO NOT REMOVE the color descriptor comments
   ----- */
:root {
    --sc-color-primary: #0c3983; /* Vivid Blue (SC brand from Canva) */
    --sc-color-error: #e50000; /* Pure Red */
    --sc-color-bg-light: #F5F5F5; /* WhiteSmoke */
    --sc-color-bg-disabled: #E5E4E2; /* Platinum Gray */
    --sc-color-border: #ccc; /* Light Gray */
}

/* ----- Page Basics -----
   sc-ui-page: root element of typical routable pages; sets page padding and full width.
   sc-ui-page-panel: bordered, padded, scrollable container for a page's main content (e.g. a grid).
   ----- */
.sc-ui-page {
    padding: 1.5em 2em;
    box-sizing: border-box;
    width: 100%;
}

.sc-ui-page-panel {
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: calc(var(--control-corner-radius) * 1px);
    background: var(--neutral-layer-1);
    padding: 0.75em;
    overflow: auto;
}

/* ----- KEEP: Layout Utilities (Fluent doesn't provide these) ----- */
.sc-ui-flex-column {
    display: flex;
    flex-direction: column;
}

.sc-ui-flex-row {
    display: flex;
    flex-direction: row;
}

.sc-ui-flex-row-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* Directional glyphs and icons (forward/back arrows, chevrons) that must point the
   other way under right-to-left layout. Apply to the glyph element, not its container. */
[dir="rtl"] .sc-ui-rtl-mirror {
    display: inline-block;
    transform: scaleX(-1);
}

.sc-ui-flex-item-top {
    margin-bottom: auto;
}

.sc-ui-flex-item-bottom {
    margin-top: auto;
}

.sc-ui-flex-item-left {
    margin-inline-end: auto;
}

.sc-ui-flex-item-right {
    margin-inline-start: auto;
}

.sc-ui-flex-item-fill-vertical {
    flex: 1 1 auto;
}

.sc-ui-flex-item-fill-horizontal {
    flex: 1 1 auto;
}

/* "More" (...) button: accent-tinted, between a stealth button (too easy to miss) and a filled
   accent button (too heavy). Overrides Fluent's stealth fill tokens on the host element only, so
   the tint follows the theme's accent color in Light and Dark modes. A thin accent ring (inset
   box-shadow, follows the control corner radius) gives the edge. Fixed square size so it never
   grows with row height. Placed visually at the start of its flex row (order -1) so the buttons
   of one grid column line up regardless of each cell's text length; DOM order is unchanged, so
   keyboard and screen-reader order stays summary first, action second. */
.sc-ui-more-action-button {
    --neutral-fill-stealth-rest: color-mix(in srgb, var(--accent-fill-rest) 12%, transparent);
    --neutral-fill-stealth-hover: color-mix(in srgb, var(--accent-fill-rest) 24%, transparent);
    --neutral-fill-stealth-active: color-mix(in srgb, var(--accent-fill-rest) 32%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-fill-rest) 45%, transparent);
    border-radius: calc(var(--control-corner-radius) * 1px);
    width: 24px;
    min-width: 24px;
    height: 24px;
    flex-shrink: 0;
    align-self: center;
    order: -1;
    margin-inline-end: 4px;
}

/*--------- Property-Pane-Style component/control layout --------*/

/* Metadata-driven form layout (DataControl and components that render the same
   markup inline). Grid: optional label column + value column.
   Reuses the --sc-color-* variables for theme consistency. */

.property-pane {
    overflow: hidden;
}

.property-pane-grid {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
}

.property-pane-grid-values-only {
    grid-template-columns: minmax(0, 1fr);
}

.property-pane-label {
    border: 1px solid var(--sc-color-border);
    background-color: var(--neutral-layer-2, var(--sc-color-bg-light));
    padding: 4px 8px;
    display: flex;
    align-items: center;
}

    .property-pane-label label {
        margin-inline-end: 4px;
        font-size: 0.875rem;
        font-weight: 500;
    }

.property-pane-value {
    border: 1px solid var(--sc-color-border);
    padding: 4px 8px;
    min-width: 0;
    /* Force all child controls to fill the cell horizontally */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

    /* Every div inside a value cell must fill the available width, across component
       boundaries (AutoControl -> ChoiceControl, TextControl, BooleanControl, etc.), so
       that wrapper divs with intrinsic widths (e.g. fit-content) don't bottleneck their
       children. No per-control class lists to maintain. */
    .property-pane-value div {
        width: 100%;
    }

        /* Empty divs (closed dialog and error placeholders) have nothing to fill; at 100% they
           would take the whole width of a flex row (e.g. CollectionControl's summary row) and
           push their siblings to the far edge. */
        .property-pane-value div:empty {
            width: auto;
        }

.property-pane-readonly {
    background-color: var(--neutral-layer-3, var(--sc-color-bg-disabled));
}

/* Models label above the launch button: the whole label opens the model catalog. */
.sc-ui-ai-models-link {
    cursor: pointer;
}

/* Second line of the models label: the model names fill the start side and the "Change"
   link text sits at the end, both on one text baseline. Flex row follows LTR and RTL. */
.sc-ui-ai-models-link-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

    .sc-ui-ai-models-link-row > .sc-ui-compound-label-description {
        flex: 1 1 auto;
        min-width: 0;
    }

.sc-ui-ai-models-link-change {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--accent-foreground-rest);
    text-decoration: underline;
    white-space: nowrap;
}

/* Sidebar tabs: the tab panel carries no inline padding, so the rows inside a tab span the
   same width as the rows above and below the tabs. */
.sc-ui-ai-tabs-area fluent-tab-panel {
    padding-inline: 0;
}

/* ----- KEEP: App-specific component styles (dialogs, etc.) ----- */
.sc-ui-dialog {
    box-sizing: border-box;       /* Never exceed the viewport (the task pane in the Word Add-in); leave a small gutter. */
    max-width: calc(100vw - 2em);
    max-height: calc(100vh - 2em);
    min-width: 300px;
    min-height: 200px;
    overflow: hidden; /* the inner .sc-ui-dialog-content scrolls; chrome + buttons stay put */
    resize: both; /* user-resizable; the browser draws the corner grip, content reflows into the new box */
    border: 1px solid var(--sc-color-border); /* Light Gray — subtle edge */
    border-radius: 8px; /* Rounded corners (Fluent convention) */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), /* Soft depth shadow */
    0 2px 6px rgba(0, 0, 0, 0.08); /* Tight contact shadow */
    padding: 24px; /* Comfortable inner spacing */
}

    .sc-ui-dialog::backdrop {
        background: rgba(0, 0, 0, 0.3); /* Dim overlay behind modal */
    }

/* Scrollable dialog body: when content (e.g. a tall property pane) exceeds the
   available height, this region gets automatic scroll bars while the action
   buttons (#modal-dialog-buttons) stay pinned at the bottom and always reachable. */
.sc-ui-dialog-content {
    flex: 1 1 auto;
    min-height: 0; /* REQUIRED so this flex child can shrink below its content size and scroll */
    overflow: auto;
}

/* Action button bar: separated from the content above and spaced between buttons. */
.sc-ui-dialog-buttons {
    padding-top: 16px;
    gap: 8px;
}

/* Row manager "..." / "+" menu hosted in a ModalDialog: one full-width command per line. */
.sc-ui-row-manager-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
}

    .sc-ui-row-manager-menu fluent-button {
        justify-content: flex-start;
    }

/* ----- KEEP: Form Field Layout ----- */
.sc-ui-form-field {
    margin-bottom: 0.75rem;
}

/* ----- Control Label ----- */
.sc-ui-control-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--accent-foreground-rest, var(--sc-color-primary));
}

/* ----- Label Position Layout -----
   Applied to the control wrapper div to arrange label + control. */
.sc-ui-label-top {
    display: flex;
    flex-direction: column;
}

.sc-ui-label-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

    .sc-ui-label-left > .sc-ui-control-label {
        margin-bottom: 0;
        white-space: nowrap;
    }

    /* When a compound label (label + description) is present in left/right layout,
       switch to flex-start so the control aligns with the main label text
       rather than centering against the full compound label height. */
    .sc-ui-label-left:has(.sc-ui-compound-label) {
        align-items: flex-start;
    }

.sc-ui-label-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

    .sc-ui-label-right > .sc-ui-control-label {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .sc-ui-label-right:has(.sc-ui-compound-label) {
        align-items: flex-start;
    }

.sc-ui-label-bottom {
    display: flex;
    flex-direction: column;
}

    .sc-ui-label-bottom > .sc-ui-control-label {
        margin-bottom: 0;
        margin-top: 5px;
    }

/* ----- Fluent Web Component Overrides (global — shadow DOM unreachable by scoped CSS) ----- */

/* Vertical tabs: constrain the fluent-tabs element to its container width.
   The internal shadow DOM grid uses "auto 1fr" columns - setting width: 100%
   ensures the 1fr panel column is calculated from actual available space.
   The host's height tracks the ACTIVE PANEL, not the tab strip, so keep
   min-height >= the rendered tab strip height; otherwise a short panel lets
   the strip visually overflow past the host bottom. (Tab hiding via the "+N"
   overflow badge is disabled separately with the [fixed] attribute on each
   FluentTab in TabsComponent.razor.) */
fluent-tabs[orientation="vertical"] {
    width: 100%;
    min-height: 200px;
}

    fluent-tabs[orientation="vertical"]::part(tabpanel) {
        min-width: 0;
    }

/* Fluent form controls inside tab panels: override fixed default width so they
   fill available space instead of overflowing in narrow containers.
   These elements are in the light DOM so descendant selectors work normally. */
fluent-tab-panel fluent-select,
fluent-tab-panel fluent-text-field {
    width: 100%;
    min-width: 0;
}

    /* Tighten label-to-control spacing inside Fluent form controls in tab panels.
   The default label margin in fluent-select/fluent-text-field is generous;
   reduce it so labels feel connected to their controls. */
    fluent-tab-panel fluent-select::part(label),
    fluent-tab-panel fluent-text-field::part(label) {
        margin-bottom: 2px;
    }

/* ============================================
   Page Shell Layout
   ============================================
   Standard full-viewport app shell used by any host that renders
   <div class="sc-ui-page-shell"><header class="sc-ui-top-header">…</header><main>@Body</main></div>.
   Host-specific overrides (e.g. #blazor-error-ui) stay in scoped CSS. */

html, body {
    overflow-x: clip;
    scrollbar-gutter: auto;
}

.sc-ui-page-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
}

    .sc-ui-page-shell main {
        flex: 1;
    }

.sc-ui-top-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--neutral-layer-1, #fff);
    border-bottom: 1px solid var(--neutral-stroke-divider-rest, #e0e0e0);
}

.sc-ui-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--neutral-foreground-hint);
    opacity: 0.6;
    user-select: none;
}

/* ============================================
   Content Page Column
   ============================================
   Centered reading column for standalone content pages (terms, privacy,
   and similar documents) rendered directly into a host's main layout.
   Mirrors the content-section measurements used by the product sites
   (max-width 1000px, centered, 48px/24px padding) so direct-URL pages
   match integration page layout. Applied via ClassParameter at the page
   level only - embedded usages (e.g. a Settings tab) are not affected. */
.sc-ui-content-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* ============================================
   Data Table
   ============================================
   Baseline styling for plain <table> markup in content pages (subprocessor
   list and similar documents). Plain tables are used because Fluent has no
   simple static-table component (FluentDataGrid is interactive and
   datasource-driven - overkill for short static legal tables). Uses Fluent
   design tokens so Light and Dark themes render correctly. */
.sc-ui-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
}

    .sc-ui-table th,
    .sc-ui-table td {
        text-align: start;
        vertical-align: top;
        padding: 10px 14px;
        border: 1px solid var(--neutral-stroke-divider-rest, #e0e0e0);
    }

    .sc-ui-table thead th {
        background-color: var(--neutral-layer-2, #f5f5f5);
        font-weight: 600;
    }

/* FocusOnNavigate programmatically focuses h1 after navigation.
   tabindex="-1" elements are never Tab-reachable, so removing
   their focus ring is safe — keyboard users can't land here. */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible {
    outline: none;
}

.sc-host-panel {
    height: 100%;
    min-width: 0;
    overflow: auto;
    box-sizing: border-box;
}

/* ============================================
   Control Image Rendering
   ============================================
   Base styling for images rendered by BaseControl.RenderImage()
   and position layout classes mirroring the label position pattern.
   Supports three image kinds: inline SVG, Fluent Icon, and <img>.
   Developer controls image size via the image/SVG/icon they supply —
   no min/max constraints are enforced by CSS. */

/* ----- Control Image Base ----- */
.sc-ui-control-image {
    flex-shrink: 0;
    object-fit: contain;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Path-based images: native size, never enlarge */
img.sc-ui-control-image {
    width: auto;
    height: auto;
    max-width: 100%;
}

/* Inline SVG containers: size to content */
span.sc-ui-control-image {
    width: fit-content;
    height: fit-content;
}

/* Let inline SVGs use their declared width/height attributes. */
.sc-ui-control-image svg {
    display: block;
}

/* ----- Image Position Layout (semantic) -----
   Used by GetImagePositionClass() — DOM order via IsImageBefore()/IsImageAfter()
   determines actual left/right or top/bottom visual placement. */
.sc-ui-image-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

    .sc-ui-image-horizontal > .sc-ui-control-image {
        margin-bottom: 0;
    }

    .sc-ui-image-horizontal > .sc-ui-control-label {
        margin-bottom: 0;
    }

    /* When a compound label (label + description) is present, switch to
       flex-start so the checkbox aligns with the main label text rather
       than centering against the full compound label height. */
    .sc-ui-image-horizontal:has(.sc-ui-compound-label) {
        align-items: flex-start;
    }

/* An action control's button fills the row remaining after its image, so adding
   an image does not shrink a button that otherwise spans its container. */
.sc-ui-action-control.sc-ui-image-horizontal > fluent-button {
    flex: 1 1 auto;
}

    .sc-ui-action-control.sc-ui-image-horizontal > fluent-button::part(control) {
        width: 100%;
    }

.sc-ui-image-vertical {
    display: flex;
    flex-direction: column;
}

/* ============================================
   Compound Label (Label + Description)
   ============================================
   Two-line label for controls: bold label text on top, lighter
   description sub-text below. Reuses the proven NavMenuItem pattern
   (.sc-ui-nav-submenu-label + .sc-ui-nav-submenu-description) adapted
   for control labels. Applied via BaseControl.BuildCompoundLabel().
   When no description is present, controls render a plain
   .sc-ui-control-label — no compound wrapper — so existing
   behavior is unchanged. */

/* The compound container is added alongside .sc-ui-control-label
   to turn the label into a stacked flex column. */
.sc-ui-compound-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Label text inherits .sc-ui-control-label styling (16px/12pt, 600 weight).
   No additional overrides needed. */
.sc-ui-compound-label-text {
    line-height: 1.3;
}

/* Description sub-text: lighter weight, ~11pt font, muted opacity.
   display: block ensures correct stacking when used standalone
   (e.g., below a FluentCheckbox); inside flex containers
   (compound labels, option labels), flex item display wins. */
.sc-ui-compound-label-description {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    opacity: 0.72;
    line-height: 1.3;
    white-space: normal;
}

/* ============================================
   Label-Level Images (inside <label> element)
   ============================================
   When control-level images (ImageIdLeft / ImageIdRight) are present,
   BuildCompoundLabel adds .sc-ui-label-with-images to the <label>,
   switching it from column (compound text stack) to row layout:
   [image-left] [text-stack] [image-right]. The text + description
   move into a .sc-ui-label-text-stack span that preserves the
   vertical stacking. gap: 6px provides internal spacing between
   images and text. No external margins — the control extends to
   its true edges; parent containers own padding/spacing.
   RTL-safe: flex-direction: row respects document direction. */

.sc-ui-label-with-images {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

    /* When images and description are both present, align images with the
   main label text rather than centering against the full compound
   height (label + description). Simple labels (no description) are
   unaffected since center and flex-start are equivalent for one line. */
    .sc-ui-label-with-images.sc-ui-compound-label {
        align-items: flex-start;
    }

/* Vertical text stack inside a label-with-images row.
   Holds label-text + description in a column when images
   are positioned to the left/right of the text. */
.sc-ui-label-text-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sc-ui-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-ui-search-extras {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-ui-column-selector-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 260px;
}

.sc-ui-column-selector-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .sc-ui-column-selector-row > fluent-checkbox {
        flex: 1 1 auto;
    }

/* ============================================
   Cell Content Propagation (GridComponent, CollectionControl rows)
   ============================================
   AutoControl and other components render error/dialog placeholder
   divs as siblings of the actual content div inside a cell. display:contents
   removes them from layout without hiding future error content. The remaining
   content div fills the cell via flex:1. Deeper wrappers propagate width/height
   to the actual control. Global because Blazor CSS isolation prevents scoped
   host styles from reaching child component DOM. */

/* A content cell: hosts one control that fills it. */
.sc-ui-cell {
    position: relative;
    display: flex;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

    /* Remove placeholder divs from flex layout so the content div
   is the sole flex participant and gets all available space. */
    .sc-ui-cell div[id$="-error-placeholder"],
    .sc-ui-cell div[id$="-dialog-placeholder"] {
        display: contents;
    }

    /* Content div fills the cell. The start padding is the common gutter so no control sits flush
   against the cell border; the trailing padding is the gutter the column drag handle occupies,
   so the control's own trailing edge (scrollbar, dropdown arrow) stays reachable. */
    .sc-ui-cell > div:not([id$="-placeholder"]):not(.sc-ui-row-manager) {
        flex: 1;
        min-width: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding-inline-start: 4px;
        padding-inline-end: 4px;
        box-sizing: border-box;
    }

    /* Inner content div (e.g. TextControl wrapper) fills its parent */
    .sc-ui-cell > div:not([id$="-placeholder"]) > div:not([id$="-placeholder"]) {
        flex: 1;
        min-width: 0;
        width: 100%;
    }

/* ============================================
   RowManagerComponent
   ============================================ */

/* Host cell for a RowManagerComponent: one horizontal line of command buttons. */
.sc-ui-row-manager-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 148px;
    overflow: hidden;
}

/* Root of the component: contributes no box of its own, so its buttons lay out as
   direct children of the hosting cell with that cell's flex rules. */
.sc-ui-row-manager {
    display: contents;
}

/* Keeps the buttons aligned when a row lacks an expand/collapse toggle or an add button. */
.sc-ui-row-manager-placeholder {
    display: inline-block;
    width: 32px;
}

/* ============================================
   List rows (GridComponent, CollectionControl string list)
   ============================================
   One bordered box holding a header row and one CSS Grid row per item; the column
   template is set inline by the host. Both hosts use the same cell classes so a row
   manager cell plus content cells read identically. */
.sc-ui-list-rows {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: var(--layer-corner-radius);
}

/* Scrolling variant: takes the host's height and scrolls its rows (Virtualize needs this). */
.sc-ui-list-rows-fill {
    overflow: auto;
    height: inherit;
    max-height: inherit;
}

/* Rows of a scrolling box keep their declared height: a bounded flex column would otherwise
   compress them, and Virtualize is given the declared height as its row size. */
.sc-ui-list-rows-fill > .sc-ui-list-row {
    flex-shrink: 0;
}

/* Shrink-to-content variant instead of full width. */
.sc-ui-list-rows-inline {
    display: inline-flex;
    width: auto;
}

/* Locked header: the header row sticks to the top of the scrolling box while data rows scroll
   beneath it. Needs the fill variant so the box itself is the scroll container. */
.sc-ui-list-rows-lock-header > .sc-ui-list-header-row {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Each row is its own CSS Grid; the column template is set inline by the host. The row is the
   positioning context for its bottom drag handle, so it must be at least as wide as its
   tracks: once dragged columns outgrow the scrolling box, the row would otherwise stay at
   the box width and the handle would stop short of the far columns. */
.sc-ui-list-row {
    display: grid;
    position: relative;
    min-width: max-content;
}

/* Default data-row heights (a dragged row carries its own inline height instead). A host raises
   the multi-line default by setting --sc-ui-list-row-multi-line-height on the grid or an ancestor. */
.sc-ui-list-rows-single-line > .sc-ui-list-row:not(:first-child) {
    height: 32px;
}

.sc-ui-list-rows-multi-line > .sc-ui-list-row:not(:first-child) {
    height: var(--sc-ui-list-row-multi-line-height, 52px);
}

.sc-ui-list-header-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-fill-secondary-rest);
    font-weight: 600;
    font-size: var(--type-ramp-minus-1-font-size);
}

/* Sort button at the end of a header cell: fixed square so it never grows the header row. */
.sc-ui-list-header-sort-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-inline-start: 4px;
}

.sc-ui-list-header-text {
    white-space: nowrap;
}

.sc-ui-list-cell {
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-fill-rest);
    min-height: 28px;
    min-width: 0;
}

.sc-ui-list-cell-readonly,
.sc-ui-list-cell-empty {
    background: var(--neutral-fill-secondary-rest);
}

/* Leading line number cell (header and data rows): the number sits at the trailing edge. */
.sc-ui-line-number-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-inline: 6px;
    overflow: hidden;
}

/* Footer below the rows box (GridComponent): loaded count, "See more" button and note on one line.
   Keeps its height when the grid root is a bounded flex column, so the rows box is what scrolls. */
.sc-ui-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    flex-shrink: 0;
}

/* Read-only string list (CollectionControl): one recessed cell holding plain bulleted items.
   Grows to fill the remaining height of the list box but never shrinks below its content,
   so the fill always covers every item. Logical padding keeps the bullets on the start
   side under RTL. */
.sc-ui-list-readonly-items {
    display: block;
    flex: 1 0 auto;
    margin: 0;
    padding-block: 4px;
    padding-inline-start: 24px;
    padding-inline-end: 6px;
    list-style: disc;
    color: var(--neutral-foreground-hint);
    font-size: var(--type-ramp-base-font-size);
}

.sc-ui-list-readonly-item {
    padding: 2px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* AiTuningComponent prompt list: fills its splitter pane. The collapsible section inside fills
   this box (its card uses height "fill"), and the read-only list in the section body is the scroll box. */
.sc-ui-tuning-prompt-list {
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-fill-secondary-rest);
}

    /* The section's root div fills the box; the error placeholder div rendered ahead of it must not. */
    .sc-ui-tuning-prompt-list > div:not([id$="-error-placeholder"]) {
        height: 100%;
    }

/* Column drag handle on the trailing edge of a header or data cell. */
.sc-ui-col-resize-handle {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    z-index: 1;
}

/* Row drag handle along the bottom edge of a data row; absolute so it takes no grid cell. */
.sc-ui-row-resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    cursor: row-resize;
    touch-action: none;
    z-index: 1;
}

/* Host of a far-edge width handle: the positioning context for .sc-ui-edge-resize-handle */
.sc-ui-resizable-host {
    position: relative;
}

/* Width drag handle along the inline-end edge of a whole control. */
.sc-ui-edge-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 5px;
    cursor: ew-resize;
    touch-action: none;
    z-index: 1;
}

    .sc-ui-col-resize-handle:hover,
    .sc-ui-col-resize-handle:active,
    .sc-ui-row-resize-handle:hover,
    .sc-ui-row-resize-handle:active,
    .sc-ui-edge-resize-handle:hover,
    .sc-ui-edge-resize-handle:active {
        background: var(--accent-fill-rest);
        opacity: 0.4;
        border-radius: 2px;
    }

/* The cell owns the border; the text area inside is drawn with no border, shadow or fill of
   its own so the two do not read as a double line. Same token baseline as TextControl. */
.sc-ui-list-cell fluent-text-area {
    display: block;
    width: 100%;
    min-width: 0;
    --design-unit: 0;
    --stroke-width: 0;
    --neutral-stroke-rest: transparent;
    --neutral-stroke-hover: transparent;
    --neutral-stroke-active: transparent;
    --neutral-stroke-focus: transparent;
    --neutral-fill-input-rest: transparent;
    --neutral-fill-input-hover: transparent;
    --neutral-fill-input-active: transparent;
    --neutral-fill-input-focus: transparent;
}

    .sc-ui-list-cell fluent-text-area::part(root) {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .sc-ui-list-cell fluent-text-area::part(control) {
        padding: 2px 4px;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        resize: none;
        overflow-y: auto;
        white-space: pre-wrap;
        overflow-wrap: break-word;
    }

/* A list row hosted in a splitter pane, or a plain row with a dragged height, fills its height; the
   text area fills the cell, including its shadow-DOM control, so dragging actually grows the text box. */
.sc-ui-splitter-pane > .sc-ui-list-row {
    height: 100%;
}

    .sc-ui-splitter-pane > .sc-ui-list-row .sc-ui-list-cell fluent-text-area,
    .sc-ui-list-row-sized .sc-ui-list-cell fluent-text-area {
        height: 100%;
        min-height: 100%;
    }

        .sc-ui-splitter-pane > .sc-ui-list-row .sc-ui-list-cell fluent-text-area::part(root),
        .sc-ui-splitter-pane > .sc-ui-list-row .sc-ui-list-cell fluent-text-area::part(control),
        .sc-ui-list-row-sized .sc-ui-list-cell fluent-text-area::part(root),
        .sc-ui-list-row-sized .sc-ui-list-cell fluent-text-area::part(control) {
            height: 100%;
            box-sizing: border-box;
        }
