/* Shared controls that are not one component's own: the busy pattern, the outside-system (grape)
   style, value menu buttons and header facts (BusyAction, BusyMenuButton, FactItem;
   DESIGN-GUIDELINES §13). Global, not scoped: the rules reach into FluentUI's own elements
   (fluent-button, fluent-menu-button), which carry no scope attribute. Tokens only; there is one
   theme (paper). */

/* ── field = small label over a control ── */
.fld { display: inline-flex; flex-direction: column; gap: 2px; width: max-content; position: relative; }
.fld > .lbl { font-size: var(--fontSizeBase100); color: var(--colorNeutralForeground3); user-select: none; white-space: nowrap; }

/* ── fixed-width value: every possible text in one grid cell, only the current one visible ── */
.sz { display: inline-grid; max-width: 220px; text-align: start; }
.sz > span { grid-area: 1 / 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sz > .sz-h { visibility: hidden; }

/* ── busy pattern ── */
.busy-ctl { position: relative; }
span.busy-ctl { display: inline-flex; }
.busy-ctl fluent-button[disabled], .busy-ctl fluent-menu-button[disabled] { cursor: progress; }

/* ── outside system: the control itself is grape ── */
.ext-subtle fluent-button { color: var(--colorPaletteGrapeForeground2); background-color: color-mix(in srgb, var(--colorPaletteGrapeBackground2) 55%, transparent); }
.ext-subtle fluent-button:hover { background-color: var(--colorPaletteGrapeBackground2); color: var(--colorPaletteGrapeForeground2); }
.ext-outline fluent-button, .ext-outline fluent-menu-button { color: var(--colorPaletteGrapeForeground2); border-color: var(--colorPaletteGrapeBorderActive); }
.ext-outline fluent-button:hover, .ext-outline fluent-menu-button:hover { color: var(--colorPaletteGrapeForeground2); border-color: var(--colorPaletteGrapeBorderActive);
    background-color: color-mix(in srgb, var(--colorPaletteGrapeBackground2) 55%, transparent); }
.ext-ctl .lbl { color: var(--colorPaletteGrapeForeground2); }
.ext-ctl fluent-spinner { --colorBrandStroke1: var(--colorPaletteGrapeForeground2); --colorBrandStroke2: var(--colorPaletteGrapeBackground2); }
.ext-ctl fluent-button[disabled], .ext-ctl fluent-menu-button[disabled] { opacity: .75; }
/* the plug marker on every outside control (there are no group captions) */
.ext-ctl::after { content: ""; position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--colorNeutralBackground1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23743d7b' d='M6 1v3h4V1h1v3h1v3a4 4 0 0 1-3.5 4v4h-1v-4A4 4 0 0 1 4 7V4h1V1z'/%3E%3C/svg%3E") center/10px no-repeat;
    border: 1px solid var(--colorPaletteGrapeBorderActive); pointer-events: none; z-index: 1; }
/* a field carries the marker after its label instead of on a corner */
.fld.ext-ctl::after { display: none; }
.fld.ext-ctl > .lbl::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 4px; vertical-align: -3px;
    border-radius: 50%; border: 1px solid var(--colorPaletteGrapeBorderActive);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23743d7b' d='M6 1v3h4V1h1v3h1v3a4 4 0 0 1-3.5 4v4h-1v-4A4 4 0 0 1 4 7V4h1V1z'/%3E%3C/svg%3E") center/8px no-repeat; }

/* ── header facts: label above the value only; the icon sits on the value's line ── */
.fx-i { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 32px; column-gap: 8px; row-gap: 1px; min-width: 0; line-height: 1.25; }
.fx-i > svg { grid-row: 2; grid-column: 1; align-self: center; color: var(--colorNeutralForeground3); fill: currentColor; }
.fx-l { grid-row: 1; grid-column: 2; font-size: var(--fontSizeBase100); color: var(--colorNeutralForeground3); user-select: none; }
.fx-v { grid-row: 2; grid-column: 2; align-self: center; font-size: var(--fontSizeBase300); min-width: 0; }
.fx-muted { color: var(--colorNeutralForeground3); }

/* ── navigation = a link with an arrow ── */
.nav-link { display: inline-flex; align-items: center; gap: 4px; color: var(--colorBrandForegroundLink); text-decoration: none; cursor: pointer; background: none; border: none; padding: 0; font: inherit; }
.nav-link:hover { text-decoration: underline; }
