/* Asset Naming Manager — window styling.
 *
 * THEME CONTRACT
 * NamingManagerWindow puts .anm-dark or .anm-light on the root from EditorGUIUtility.isProSkin.
 * Every colour token is declared in BOTH skin blocks — never in .anm-root — because a token
 * declared once would run dark-tuned values on a near-white panel.
 *
 * Three colour roles per severity, and they are not interchangeable:
 *   --anm-<sev>        fill. Pills, stripes, chart arcs. Graphics only, needs 3:1.
 *   --anm-<sev>-ink    text. Measured >= 4.5:1 against --anm-panel in its own skin.
 *   --anm-<sev>-soft   tint. Chip and row backgrounds.
 * NamingManagerTheme.cs mirrors the fill values for Painter2D. Change one, change the other.
 *
 * Contrast ratios in the comments are WCAG 2.1 and were computed, not estimated.
 */

/* ============================================================ dark skin */

.anm-dark {
    --anm-bg: rgb(48, 48, 48);                /* #303030 — Unity Pro list background */
    --anm-panel: rgb(56, 56, 56);             /* #383838 — Unity Pro window background */
    --anm-panel-alt: rgb(64, 64, 64);         /* #404040 — Unity Pro toolbar */
    --anm-line: rgb(35, 35, 35);              /* #232323 — Unity Pro border */
    --anm-text: rgb(210, 210, 210);           /* #D2D2D2 — 7.76:1 on panel */
    --anm-muted: rgb(166, 166, 166);          /* 4.79:1 on panel */
    --anm-dim: rgb(142, 142, 142);            /* 3.55:1 — decorative paths only */
    --anm-hover: rgba(255, 255, 255, 0.06);
    --anm-selected: rgba(255, 255, 255, 0.10);
    --anm-track: rgba(255, 255, 255, 0.12);

    --anm-accent: rgb(58, 121, 187);          /* Unity selection blue, white reads at 4.53:1 */
    --anm-accent-ink: rgb(123, 165, 209);     /* 4.55:1 */
    --anm-accent-soft: rgba(58, 121, 187, 0.30);

    --anm-error: rgb(230, 92, 92);
    --anm-error-ink: rgb(236, 131, 131);      /* 4.55:1 */
    --anm-error-soft: rgba(230, 92, 92, 0.18);

    --anm-warning: rgb(242, 176, 46);
    --anm-warning-ink: rgb(242, 176, 46);     /* 6.16:1 */
    --anm-warning-soft: rgba(242, 176, 46, 0.18);

    --anm-info: rgb(90, 150, 234);
    --anm-info-ink: rgb(110, 163, 237);       /* 4.54:1 */
    --anm-info-soft: rgba(90, 150, 234, 0.18);

    --anm-good: rgb(68, 191, 131);
    --anm-good-ink: rgb(68, 191, 131);        /* 5.04:1 */
    --anm-good-soft: rgba(68, 191, 131, 0.18);

    --anm-series-0: rgb(58, 121, 187);
    --anm-series-1: rgb(77, 181, 209);
    --anm-series-2: rgb(68, 191, 131);
}

.anm-light {
    --anm-bg: rgb(190, 190, 190);             /* Unity light skin greys */
    --anm-panel: rgb(200, 200, 200);          /* #C8C8C8 */
    --anm-panel-alt: rgb(209, 209, 209);
    --anm-line: rgb(153, 153, 153);           /* #999999 */
    --anm-text: rgb(9, 9, 9);                 /* 11.90:1 on panel */
    --anm-muted: rgb(72, 72, 72);             /* 5.29:1 */
    --anm-dim: rgb(94, 94, 94);               /* 3.90:1 — decorative only */
    --anm-hover: rgba(0, 0, 0, 0.05);
    --anm-selected: rgba(0, 0, 0, 0.10);
    --anm-track: rgba(0, 0, 0, 0.14);

    --anm-accent: rgb(58, 114, 176);          /* Unity light selection blue, white at 4.98:1 */
    --anm-accent-ink: rgb(44, 86, 132);       /* 4.53:1 */
    --anm-accent-soft: rgba(58, 114, 176, 0.22);

    --anm-error: rgb(161, 35, 35);
    --anm-error-ink: rgb(161, 35, 35);        /* 4.51:1 */
    --anm-error-soft: rgba(161, 35, 35, 0.16);

    --anm-warning: rgb(111, 77, 9);
    --anm-warning-ink: rgb(111, 77, 9);       /* 4.58:1 */
    --anm-warning-soft: rgba(111, 77, 9, 0.16);

    --anm-info: rgb(40, 84, 148);
    --anm-info-ink: rgb(40, 84, 148);         /* 4.51:1 */
    --anm-info-soft: rgba(40, 84, 148, 0.16);

    --anm-good: rgb(28, 94, 65);
    --anm-good-ink: rgb(28, 94, 65);          /* 4.60:1 */
    --anm-good-soft: rgba(28, 94, 65, 0.16);

    --anm-series-0: rgb(58, 114, 176);
    --anm-series-1: rgb(29, 124, 150);
    --anm-series-2: rgb(28, 94, 65);
}

/* ============================================================ root */

.anm-root {
    flex-grow: 1;
    font-size: 12px;
    background-color: var(--anm-bg);
    color: var(--anm-text);
}

/* Scoped to direct children: a bare `Label` type selector would also repaint the labels
   inside Unity's own ObjectField and EnumField. */
.anm-root > Label {
    color: var(--anm-text);
}

/* ============================================================ header */

.anm-header {
    flex-direction: row;
    align-items: center;
    padding: 6px 10px;
    background-color: var(--anm-panel);
    border-bottom-width: 1px;
    border-bottom-color: var(--anm-line);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.anm-badge {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background-color: var(--anm-accent);
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.anm-badge__text {
    color: rgb(255, 255, 255);
    -unity-font-style: bold;
    font-size: 10px;
}

.anm-header__titles {
    flex-direction: row;
    align-items: baseline;
    flex-grow: 1;
    flex-shrink: 1;
    overflow: hidden;
}

.anm-header__title {
    -unity-font-style: bold;
    font-size: 12px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.anm-header__subtitle {
    color: var(--anm-muted);
    font-size: 11px;
    margin: 0 0 0 8px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.anm-header__actions {
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}

/* ============================================================ controls
 * One height for everything in the chrome, Unity's own fields included, or the toolbar
 * renders an 18px search field beside a 20px pill beside a 24px button. */

.anm-button {
    height: 22px;
    padding: 0 11px;
    border-radius: 5px;
    border-width: 1px;
    border-color: var(--anm-line);
    background-color: var(--anm-panel-alt);
    color: var(--anm-text);
    margin: 0 4px 0 0;
    -unity-text-align: middle-center;
    flex-shrink: 0;
}

.anm-button:hover {
    background-color: var(--anm-panel);
    border-color: var(--anm-accent);
}

.anm-button:focus {
    border-color: var(--anm-accent);
}

.anm-button:disabled {
    opacity: 0.45;
}

.anm-button--primary {
    background-color: var(--anm-accent);
    border-color: var(--anm-accent);
    color: rgb(255, 255, 255);
    -unity-font-style: bold;
}

.anm-button--primary:hover {
    background-color: var(--anm-accent-ink);
    border-color: var(--anm-accent-ink);
}

/* Hazard has to be visible before the cursor arrives, not after. */
.anm-button--danger {
    border-color: var(--anm-error);
    color: var(--anm-error-ink);
}

.anm-button--danger:hover {
    background-color: var(--anm-error-soft);
}

.anm-button--ghost {
    background-color: rgba(0, 0, 0, 0);
    border-color: rgba(0, 0, 0, 0);
}

.anm-button--ghost:hover {
    background-color: var(--anm-hover);
    border-color: var(--anm-line);
}

.anm-toolbar .unity-base-field,
.anm-toolbar .unity-base-field__input,
.anm-header .unity-base-field,
.anm-header .unity-base-field__input {
    height: 22px;
    min-height: 22px;
    margin: 0;
}

.anm-ruleset-field {
    width: auto;
    min-width: 130px;
    max-width: 210px;
    flex-shrink: 1;
    margin-right: 4px;
}

.anm-ruleset-field > Label {
    display: none;
}

/* ============================================================ tabs */

.anm-tabs {
    flex-direction: row;
    background-color: var(--anm-panel);
    border-bottom-width: 1px;
    border-bottom-color: var(--anm-line);
    padding: 0 8px;
    flex-shrink: 0;
}

.anm-tab {
    flex-direction: row;
    align-items: center;
    padding: 6px 13px 5px 13px;
    margin: 0;
    border-width: 0;
    border-bottom-width: 2px;
    border-bottom-color: rgba(0, 0, 0, 0);
    background-color: rgba(0, 0, 0, 0);
    color: var(--anm-muted);
    border-radius: 0;
}

.anm-tab:hover {
    color: var(--anm-text);
    background-color: var(--anm-hover);
}

.anm-tab:focus {
    color: var(--anm-text);
}

.anm-tab--active {
    color: var(--anm-text);
    border-bottom-color: var(--anm-accent);
    -unity-font-style: bold;
}

.anm-tab__label {
    font-size: 12px;
}

.anm-tab__badge {
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 7px;
    background-color: var(--anm-track);
    font-size: 10px;
    color: var(--anm-muted);
    -unity-font-style: normal;
}

.anm-tab__badge--alert {
    background-color: var(--anm-error);
    color: rgb(255, 255, 255);
    -unity-font-style: bold;
}

/* ============================================================ toolbar */

.anm-toolbar {
    flex-direction: row;
    align-items: center;
    padding: 5px 10px 3px 10px;
    background-color: var(--anm-panel-alt);
    border-bottom-width: 1px;
    border-bottom-color: var(--anm-line);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.anm-toolbar > * {
    margin-bottom: 2px;
}

.anm-search {
    width: auto;
    min-width: 110px;
    max-width: 240px;
    flex-shrink: 1;
    margin-right: 6px;
}

.anm-chips {
    flex-direction: row;
    margin-right: 6px;
    flex-shrink: 0;
}

.anm-chip {
    flex-direction: row;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    margin-right: 4px;
    border-radius: 11px;
    border-width: 1px;
    border-color: var(--anm-line);
    background-color: rgba(0, 0, 0, 0);
    color: var(--anm-muted);
    font-size: 11px;
}

.anm-chip:hover {
    background-color: var(--anm-hover);
}

.anm-chip:focus {
    border-color: var(--anm-accent);
}

.anm-chip--on {
    -unity-font-style: bold;
}

.anm-chip--error.anm-chip--on {
    border-color: var(--anm-error);
    color: var(--anm-error-ink);
    background-color: var(--anm-error-soft);
}

.anm-chip--warning.anm-chip--on {
    border-color: var(--anm-warning);
    color: var(--anm-warning-ink);
    background-color: var(--anm-warning-soft);
}

.anm-chip--info.anm-chip--on {
    border-color: var(--anm-info);
    color: var(--anm-info-ink);
    background-color: var(--anm-info-soft);
}

.anm-toolbar__spacer {
    flex-grow: 1;
    min-width: 4px;
}

.anm-group-field {
    width: auto;
    min-width: 96px;
    max-width: 170px;
    flex-shrink: 1;
    margin-right: 6px;
}

.anm-group-field > Label {
    min-width: 50px;
    font-size: 11px;
    color: var(--anm-muted);
}

/* ============================================================ selection bar
 * The consent surface. "Fix Selected (383)" tells you a count; this tells you what it will do. */

.anm-selection-bar {
    flex-direction: row;
    align-items: center;
    padding: 6px 12px;
    background-color: var(--anm-accent-soft);
    border-bottom-width: 1px;
    border-bottom-color: var(--anm-line);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.anm-selection-bar__text {
    flex-grow: 1;
    flex-shrink: 1;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anm-selection-bar__count {
    -unity-font-style: bold;
}

/* ============================================================ list rows */

.anm-list {
    flex-grow: 1;
    background-color: var(--anm-bg);
}

.anm-list .unity-list-view__item,
.anm-list .unity-tree-view__item {
    padding: 0;
    border-width: 0;
}

.anm-list .unity-list-view__item:hover,
.anm-list .unity-tree-view__item:hover {
    background-color: var(--anm-hover);
}

/* Selection is a neutral wash plus an accent edge. The accent TINT is reserved for
   "ticked for fixing" — two different states must never share one colour. */
.anm-list .unity-collection-view__item--selected {
    background-color: var(--anm-selected);
}

.anm-row {
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    min-height: 40px;
    padding-right: 10px;
    border-left-width: 2px;
    border-left-color: rgba(0, 0, 0, 0);
}

.anm-list .unity-collection-view__item--selected .anm-row {
    border-left-color: var(--anm-accent);
}

.anm-row--checked {
    background-color: var(--anm-accent-soft);
}

/* align-self, not height:100% — a definite parent height only exists under FixedHeight
   virtualisation, so height:100% would silently collapse the stripe to 0 under DynamicHeight. */
.anm-row__stripe {
    width: 3px;
    align-self: stretch;
    flex-shrink: 0;
}

.anm-row__check {
    width: 16px;
    margin: 0 8px;
    flex-shrink: 0;
}

.anm-row__icon {
    width: 16px;
    height: 16px;
    margin-right: 7px;
    flex-shrink: 0;
}

.anm-row__main {
    flex-grow: 1;
    flex-shrink: 1;
    overflow: hidden;
    justify-content: center;
}

.anm-row__line1 {
    flex-direction: row;
    align-items: center;
}

/* Every ellipsis below is paired with nowrap. UI Toolkit only applies text-overflow when
   the text cannot wrap; without it a long path wraps and the row's overflow clips it dead. */
.anm-row__name {
    -unity-font-style: bold;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.anm-row__arrow {
    color: var(--anm-muted);
    margin: 0 5px;
    font-size: 11px;
    flex-shrink: 0;
}

.anm-row__fixed {
    color: var(--anm-good-ink);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.anm-row__manual {
    color: var(--anm-muted);
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.anm-row__line2 {
    flex-direction: row;
    align-items: center;
    margin-top: 1px;
}

.anm-row__message {
    color: var(--anm-muted);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

/* No opacity here. Opacity on an already-muted token lands a 10px path under 3:1. */
.anm-row__path {
    color: var(--anm-dim);
    font-size: 10px;
    margin-left: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.anm-row__tag {
    padding: 0 6px;
    border-radius: 3px;
    background-color: var(--anm-track);
    color: var(--anm-muted);
    font-size: 10px;
    margin-left: 6px;
    flex-shrink: 0;
}

.anm-group-header {
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    min-height: 26px;
    padding-left: 10px;
    background-color: var(--anm-panel-alt);
    border-bottom-width: 1px;
    border-bottom-color: var(--anm-line);
}

.anm-group-header__label {
    -unity-font-style: bold;
    font-size: 11px;
}

.anm-group-header__count {
    color: var(--anm-muted);
    font-size: 11px;
    margin-left: 7px;
}

/* ============================================================ details pane */

.anm-details {
    width: 320px;
    min-width: 300px;
    flex-shrink: 0;
    background-color: var(--anm-panel);
    border-left-width: 1px;
    border-left-color: var(--anm-line);
    padding: 12px 14px;
}

.anm-details__title {
    -unity-font-style: bold;
    font-size: 13px;
    white-space: normal;
    margin-bottom: 2px;
}

.anm-details__path {
    color: var(--anm-muted);
    font-size: 10px;
    white-space: normal;
    margin-bottom: 10px;
}

.anm-details__section {
    margin-top: 12px;
}

.anm-details__label {
    font-size: 10px;
    color: var(--anm-muted);
    letter-spacing: 0.6px;
    margin-bottom: 3px;
}

.anm-details__body {
    white-space: normal;
    font-size: 11px;
}

.anm-details__fix {
    flex-direction: row;
    align-items: center;
    background-color: var(--anm-panel-alt);
    border-radius: 6px;
    border-width: 1px;
    border-color: var(--anm-line);
    padding: 8px 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.anm-details__fix-old {
    color: var(--anm-muted);
    font-size: 11px;
    flex-shrink: 1;
    overflow: hidden;
}

.anm-details__fix-new {
    color: var(--anm-good-ink);
    -unity-font-style: bold;
    font-size: 11px;
    flex-shrink: 1;
    overflow: hidden;
}

.anm-details__actions {
    flex-direction: row;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ============================================================ pills
 * Fill + ink pairs, all measured over 4.5:1. Warning keeps its bright amber and takes
 * dark ink instead: white on rgb(242,176,46) is 1.90:1, which nobody can read. */

.anm-pill {
    padding: 1px 8px;
    border-radius: 9px;
    font-size: 10px;
    -unity-font-style: bold;
    flex-shrink: 0;
}

.anm-pill--error {
    background-color: rgb(198, 79, 79);
    color: rgb(255, 255, 255);            /* 4.53:1 */
}

.anm-pill--warning {
    background-color: rgb(242, 176, 46);
    color: rgb(58, 42, 4);                /* 7.29:1 */
}

.anm-pill--info {
    background-color: rgb(71, 118, 185);
    color: rgb(255, 255, 255);            /* 4.61:1 */
}

/* ============================================================ dashboard */

.anm-scroll {
    flex-grow: 1;
}

.anm-dash {
    padding: 14px 4px 4px 14px;           /* the 10px card margin completes the right/bottom gutter */
    flex-direction: row;
    flex-wrap: wrap;
}

.anm-card {
    background-color: var(--anm-panel);
    border-width: 1px;
    border-color: var(--anm-line);
    border-radius: 9px;
    padding: 14px;
    margin: 0 10px 10px 0;
}

.anm-card__title {
    -unity-font-style: bold;
    font-size: 12px;
    margin-bottom: 2px;
}

.anm-card__subtitle {
    color: var(--anm-muted);
    font-size: 10px;
    margin-bottom: 8px;
    white-space: normal;
}

.anm-card__body {
    flex-grow: 1;
}

.anm-card--grow {
    flex-grow: 1;
    min-width: 240px;
}

.anm-card--center .anm-card__body {
    align-items: center;
}

.anm-gauge {
    align-items: center;
    justify-content: center;
}

.anm-gauge__centre {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
}

.anm-gauge__number {
    font-size: 54px;
    -unity-font-style: bold;
    margin: 0;
    padding: 0;
}

.anm-gauge__caption {
    font-size: 10px;
    color: var(--anm-muted);
    letter-spacing: 0.8px;
    margin: 0;
    padding: 0;
}

.anm-donut {
    align-items: center;
    justify-content: center;
}

.anm-donut__total {
    font-size: 30px;
    -unity-font-style: bold;
    margin: 0;
    padding: 0;
}

.anm-donut__caption {
    font-size: 10px;
    color: var(--anm-muted);
    margin: 0;
    padding: 0;
}

.anm-legend {
    margin-top: 10px;
    width: 100%;
}

.anm-legend__row {
    flex-direction: row;
    align-items: center;
    margin-bottom: 3px;
    padding: 1px 3px;
    border-radius: 4px;
}

.anm-legend__row:hover {
    background-color: var(--anm-hover);
}

.anm-legend__swatch {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    margin-right: 7px;
    flex-shrink: 0;
}

.anm-legend__label {
    flex-grow: 1;
    font-size: 11px;
    color: var(--anm-muted);
}

.anm-legend__value {
    font-size: 11px;
    -unity-font-style: bold;
}

.anm-stats {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.anm-stat {
    background-color: var(--anm-panel);
    border-width: 1px;
    border-color: var(--anm-line);
    border-radius: 9px;
    padding: 14px;
    margin: 0 10px 10px 0;
    min-width: 104px;
}

.anm-stat__value {
    font-size: 21px;
    -unity-font-style: bold;
    margin: 0;
    padding: 0;
}

.anm-stat__label {
    font-size: 10px;
    color: var(--anm-muted);
    margin: 0;
    padding: 0;
}

.anm-bar {
    flex-direction: row;
    align-items: center;
    margin-bottom: 5px;
    padding: 1px 2px;
    border-radius: 4px;
}

.anm-bar:hover {
    background-color: var(--anm-hover);
}

.anm-bar__key {
    width: 38%;
    min-width: 76px;
    max-width: 190px;
    flex-shrink: 1;
    font-size: 11px;
    color: var(--anm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anm-bar__track {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 24px;
    height: 7px;
    border-radius: 4px;
    background-color: var(--anm-track);
    overflow: hidden;
    margin: 0 8px;
}

.anm-bar__fill {
    height: 100%;
    border-radius: 4px;
}

.anm-bar__value {
    width: 34px;
    font-size: 11px;
    -unity-text-align: middle-right;
    flex-shrink: 0;
}

/* ============================================================ rules tab */

.anm-rules {
    padding: 14px;
}

.anm-rule-card {
    background-color: var(--anm-panel);
    border-width: 1px;
    border-color: var(--anm-line);
    border-radius: 9px;
    margin-bottom: 8px;
}

/* Explicit corner radii rather than trusting overflow:hidden to clip a rounded box. */
.anm-rule-card__head {
    flex-direction: row;
    align-items: center;
    padding: 9px 12px;
    background-color: var(--anm-panel-alt);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.anm-rule-card__name {
    -unity-font-style: bold;
    font-size: 12px;
    margin-left: 4px;
    flex-shrink: 0;
}

.anm-rule-card__summary {
    color: var(--anm-muted);
    font-size: 10px;
    margin-left: 10px;
    flex-grow: 1;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anm-rule-card__body {
    padding: 10px 12px;
}

.anm-rule-card--off {
    opacity: 0.6;
}

/* ============================================================ history tab */

.anm-history-row {
    flex-direction: row;
    align-items: center;
    background-color: var(--anm-panel);
    border-width: 1px;
    border-color: var(--anm-line);
    border-radius: 7px;
    padding: 9px 12px;
    margin-bottom: 6px;
}

.anm-history-row__main {
    flex-grow: 1;
    flex-shrink: 1;
    overflow: hidden;
}

.anm-history-row__title {
    font-size: 12px;
    -unity-font-style: bold;
}

.anm-history-row__sub {
    font-size: 10px;
    color: var(--anm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================ pre-flight sheet
 * 400 MoveAsset calls must not fire from a button whose only detail is an integer. */

.anm-sheet__scrim {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
}

.anm-sheet {
    width: 640px;
    max-width: 92%;
    max-height: 76%;
    background-color: var(--anm-panel);
    border-width: 1px;
    border-color: var(--anm-line);
    border-radius: 12px;
}

.anm-sheet__head {
    padding: 14px 16px 10px 16px;
    border-bottom-width: 1px;
    border-bottom-color: var(--anm-line);
}

.anm-sheet__title {
    -unity-font-style: bold;
    font-size: 14px;
}

.anm-sheet__sub {
    color: var(--anm-muted);
    font-size: 11px;
    white-space: normal;
    margin-top: 2px;
}

.anm-sheet__list {
    flex-grow: 1;
    padding: 6px 10px;
}

.anm-sheet__foot {
    flex-direction: row;
    align-items: center;
    padding: 10px 16px;
    border-top-width: 1px;
    border-top-color: var(--anm-line);
}

.anm-sheet__row {
    flex-direction: row;
    align-items: center;
    padding: 4px 6px;
    border-radius: 4px;
}

.anm-sheet__row--fail {
    background-color: var(--anm-error-soft);
}

/* ============================================================ undo bar */

.anm-undo-bar {
    flex-direction: row;
    align-items: center;
    padding: 7px 12px;
    background-color: var(--anm-good-soft);
    border-top-width: 1px;
    border-top-color: var(--anm-line);
    flex-shrink: 0;
}

.anm-undo-bar__text {
    flex-grow: 1;
    flex-shrink: 1;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================ empty states
 * Four of them, and they must not look alike: "not scanned yet" and "scanned, all clean"
 * are opposite outcomes and a clean small project is the most common first result. */

.anm-empty {
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.anm-empty__mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background-color: var(--anm-accent-soft);
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.anm-empty__icon {
    width: 28px;
    height: 28px;
}

.anm-empty--good .anm-empty__mark {
    background-color: var(--anm-good-soft);
}

.anm-empty--warn .anm-empty__mark {
    background-color: var(--anm-warning-soft);
}

.anm-empty--neutral .anm-empty__mark {
    background-color: var(--anm-track);
}

.anm-empty__title {
    font-size: 15px;
    -unity-font-style: bold;
    margin-bottom: 5px;
}

.anm-empty__body {
    color: var(--anm-muted);
    font-size: 11px;
    white-space: normal;
    max-width: 380px;
    -unity-text-align: upper-center;
    margin-bottom: 14px;
}

.anm-empty__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================================ status bar */

.anm-status {
    flex-direction: row;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    background-color: var(--anm-panel);
    border-top-width: 1px;
    border-top-color: var(--anm-line);
    flex-shrink: 0;
}

.anm-status__text {
    font-size: 10px;
    color: var(--anm-muted);
    flex-grow: 1;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anm-status__hint {
    font-size: 10px;
    color: var(--anm-dim);
    flex-shrink: 0;
}

/* ============================================================ misc */

.anm-info-box {
    background-color: var(--anm-panel-alt);
    border-left-width: 3px;
    border-left-color: var(--anm-accent);
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.anm-info-box__text {
    font-size: 11px;
    white-space: normal;
    color: var(--anm-muted);
}

.anm-divider {
    height: 1px;
    background-color: var(--anm-line);
    margin: 10px 0;
}

.anm-field-label {
    font-size: 10px;
    color: var(--anm-muted);
}

.anm-field-value {
    font-size: 11px;
}

/* ============================================================ breakpoints
 * UI Toolkit has no media queries. NamingManagerWindow toggles these from a
 * GeometryChangedEvent, so they only exist because the window creates them. */

.anm--narrow .anm-details {
    display: none;
}

.anm--narrow .anm-row__path,
.anm--narrow .anm-row__tag,
.anm--narrow .anm-header__subtitle {
    display: none;
}

.anm--narrow .anm-bar__key {
    width: 44%;
    min-width: 60px;
}

.anm--narrow .anm-card--grow {
    min-width: 180px;
}

.anm--narrow .anm-sheet {
    width: 96%;
}

.anm--wide .anm-details {
    width: 380px;
}

.anm--wide .anm-bar__key {
    max-width: 260px;
}


/* ============================================================ themed modifiers
 * Everything a theme can recolour is reachable from a class. C# sets the class, USS
 * picks the colour — so an override stylesheet repaints these without touching code. */

.anm-row__stripe--error   { background-color: var(--anm-error); }
.anm-row__stripe--warning { background-color: var(--anm-warning); }
.anm-row__stripe--info    { background-color: var(--anm-info); }

.anm-legend__swatch--error   { background-color: var(--anm-error); }
.anm-legend__swatch--warning { background-color: var(--anm-warning); }
.anm-legend__swatch--info    { background-color: var(--anm-info); }

.anm-bar__fill--s0 { background-color: var(--anm-series-0); }
.anm-bar__fill--s1 { background-color: var(--anm-series-1); }
.anm-bar__fill--s2 { background-color: var(--anm-series-2); }

.anm-stat__value--good { color: var(--anm-good-ink); }

.anm-text-muted { color: var(--anm-muted); }
.anm-text-dim   { color: var(--anm-dim); }
.anm-text-good  { color: var(--anm-good-ink); }

.anm-theme-button {
    min-width: 0;
    padding: 0 8px;
}
