/* VisionPb: Settings, configuration, logs and services pages. Area sheet; every rule under the VisionPb scope. */

/* Form sections (FormSection): a cotton card with a quiet head. The grey header band goes; a hairline
   under the title does the separating, and the title reads as the card's heading. */
.vision-theme-scope[data-vision-theme="visionpb"] .form-section.mud-paper {
    background: var(--vpb-cotton);
    border-radius: var(--vpb-radius-card);
    overflow: hidden;
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-header {
    background: transparent;
    border-bottom: 1px solid var(--color-rule);
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-title {
    color: var(--color-ink);
    font-family: var(--vpb-font-body);
    font-weight: var(--weight-strong);
    letter-spacing: -0.01em;
}

/* The short description beside a section title is muted. */
.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-header .text-muted,
.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-header .mud-typography-caption {
    color: var(--color-ink-2);
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-content {
    background: transparent;
}

/* Help text under a control: muted ink, comfortable measure. */
.vision-theme-scope[data-vision-theme="visionpb"] .form-section-content .mud-text-secondary.mud-typography-body2 {
    color: var(--color-ink-2);
    line-height: 1.5;
}

/* The pinned section strip (user settings) sits on paper so the page scrolls cleanly behind it. */
.vision-theme-scope[data-vision-theme="visionpb"] .order-sticky-stack {
    background: var(--color-paper);
}

/* Sticky save bar: a quiet cotton strip with a hairline above it instead of a heavy shadow. */
.vision-theme-scope[data-vision-theme="visionpb"] .pb-sticky-actions {
    background: var(--vpb-cotton);
    border-top: 1px solid var(--color-rule);
    border-radius: var(--vpb-radius-card) var(--vpb-radius-card) 0 0;
    box-shadow: 0 -1px 0 var(--vpb-paper-3);
    color: var(--color-ink-2);
}

/* System settings tabs: one hairline under the tab row, accent bar on the active tab. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-tabs-tabbar {
    border-block-end: 1px solid var(--color-rule);
}

.vision-theme-scope[data-vision-theme="visionpb"] .mud-tab.mud-tab-active {
    color: var(--color-accent);
    font-weight: var(--weight-strong);
}

.vision-theme-scope[data-vision-theme="visionpb"] .mud-tab:not(.mud-tab-active) {
    color: var(--color-ink-2);
}

/* Maintenance actions: hairline rows, each action text muted under its name. */
.vision-theme-scope[data-vision-theme="visionpb"] .system-maintenance-action {
    border-top-color: var(--color-rule);
}

/* Expansion panels (permissions categories, settings groups): cotton rows divided by hairlines. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-expand-panel {
    background: transparent;
    border-color: var(--color-rule);
}

.vision-theme-scope[data-vision-theme="visionpb"] .mud-expand-panel .mud-expand-panel-header:hover {
    background: var(--vpb-paper-3);
}

/* Roles priority list: cotton rows, accent edge when focused or lifted, importance muted. */
.vision-theme-scope[data-vision-theme="visionpb"] .roles-priority .fluent-sortable-list {
    --fluent-sortable-list-border-color: var(--color-rule);
    --fluent-sortable-list-item-border-color: var(--color-rule);
    --fluent-sortable-list-item-background-color: var(--vpb-cotton);
    --fluent-sortable-list-item-focused-background-color: var(--vpb-accent-soft);
    --fluent-sortable-list-item-focused-border-color: var(--color-accent);
    --fluent-sortable-list-item-grabbed-background-color: var(--vpb-accent-soft);
    --fluent-sortable-list-item-grabbed-border-color: var(--color-accent);
}

.vision-theme-scope[data-vision-theme="visionpb"] .roles-priority-importance {
    color: var(--color-ink-2);
    font-size: var(--text-sm);
}

.vision-theme-scope[data-vision-theme="visionpb"] .roles-priority-help {
    color: var(--color-ink-2);
}

/* Config and log grids: hairline rows and a hover tint, like the other list pages. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-table-body .mud-table-row:hover > .mud-table-cell {
    background: var(--vpb-paper-3);
}

.vision-theme-scope[data-vision-theme="visionpb"] .mud-table-body .mud-table-row.mud-selected-item > .mud-table-cell {
    background: var(--vpb-accent-soft);
}

/* Table toolbars (log level, search) get room and a hairline so they do not crowd the column heads. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-table-toolbar {
    align-items: center;
    color: var(--color-ink);
    gap: var(--space-sm);
    height: auto;
    min-height: 56px;
    padding-block: var(--space-sm);
}

/* Striped rows take the warm tint, not a grey. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) > .mud-table-cell {
    background: color-mix(in oklab, var(--vpb-paper-3) 45%, var(--vpb-cotton));
}

/* Log rows: IDs, timestamps and exception text set in mono so columns line up. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-table-cell .exception-text,
.vision-theme-scope[data-vision-theme="visionpb"] pre {
    font-family: var(--vpb-font-mono);
    font-size: var(--text-sm);
}

@media (prefers-reduced-motion: reduce) {
    .vision-theme-scope[data-vision-theme="visionpb"] .mud-tab {
        transition: none;
    }
}
