﻿/* Styles for the shared components in src/Pages/Shared and src/Pages/Console/Shared, grouped by component. */

/* Utilities */
.sh-muted { color: var(--mud-palette-text-secondary); }
.sh-flex-fill { flex: 1 1 0; min-width: 0; }
/* A wrapper that leaves no box of its own, e.g. a form around a button. */
.sh-contents { display: contents; }

/* Read by screen readers only. */
.sh-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.sh-lockup {
    display: inline-flex;
    align-items: center;
}

.sh-lockup img {
    display: block;
    height: 20px;
}

.sh-lockup .sh-lockup-mark {
    display: none;
}

@media (max-width: 599.98px) {
    .sh-lockup.sh-lockup-shrinks .sh-lockup-full {
        display: none;
    }

    .sh-lockup.sh-lockup-shrinks .sh-lockup-mark {
        display: block;
        height: 24px;
    }
}

/* Single-line text cut with an ellipsis. */
.sh-row-title.mud-typography,
.sh-category-detail,
.sh-crash-name,
.sh-crash-where,
.sh-event-name,
.sh-frame-fn,
.sh-notif-title,
.sh-ns-scope-text b,
.sh-report-text,
.sh-sort-address,
.sh-sort-name .sh-user-cell .mud-typography,
.sh-top-events > .sh-mono,
.sh-cell-fill .mud-typography,
.sh-secret.mud-typography,
.sh-detail-title.mud-typography,
.sh-detail-subtitle.mud-typography,
.sh-upload-name.mud-typography,
.sh-app-switch-name,
.sh-user-name,
.sh-value-preview.mud-typography,
.sh-file-name.mud-typography,
.sh-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card grids: as many columns as fit, each at least --sh-grid-min wide. */
.sh-feature-grid,
.sh-file-grid,
.sh-app-grid,
.sh-svc-grid,
.sh-fav-grid {
    display: grid;
    grid-template-columns: repeat(var(--sh-grid-repeat, auto-fill), minmax(min(var(--sh-grid-min, 240px), 100%), 1fr));
    gap: var(--sh-grid-gap, 8px);
}

/* Cards in a grid that stack their content. */
.sh-svc-card.mud-paper,
.sh-fav-card.mud-paper {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Button labels that read left to right: tiles, row links, the app switch. */
.sh-quick-tile .mud-button-label,
.sh-row-link .mud-button-label,
.sh-app-switch .mud-button-label {
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
}

/* The full-screen layer under an open popover (AnchoredPopover) that closes it when clicked. */
.sh-click-away {
    position: fixed;
    inset: 0;
    z-index: calc(var(--mud-zindex-popover) - 1);
}

/* Table columns that shrink to their content; the end one is right-aligned (actions, switches). */
.sh-col-fit {
    width: 1%;
}

.sh-col-end,
.mud-table-cell.sh-col-end {
    width: 1%;
    text-align: right;
}

.sh-align-end,
.mud-table-cell.sh-align-end {
    text-align: right;
}

/* Dialogs that are mostly a JSON editor. */
.sh-editor-dialog.mud-dialog {
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.sh-editor-body {
    display: flex;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.sh-editor-host {
    flex: 1;
    min-height: 0;
    border-radius: var(--sh-radius-sm);
    overflow: hidden;
}

.sh-editor-stack {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* JsonEditor */
.sh-json-editor {
    height: 100%;
}

.sh-json-editor-loading {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sh-radius-xs);
    background: var(--mud-palette-surface);
}

/* File drop area: the whole box is the file input. */
.sh-dropzone.mud-paper {
    position: relative;
    border-style: dashed;
}

.sh-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.sh-dropzone-body {
    min-height: 120px;
}

/* PlayerCount */
.sh-player-bar.mud-progress-linear {
    width: 56px;
    flex: none;
}

/* DeviceCodeLookup */
.sh-device-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-raised);
}

/* SectionTile, AppIcon */
.sh-tile.mud-avatar {
    flex: none;
    color: var(--sh-on-tile);
}

.sh-tile-md.mud-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--sh-radius-sm);
}

.sh-tile-md.mud-avatar .mud-icon-root {
    font-size: 18px;
}

.sh-tile-lg.mud-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--sh-radius);
}

.sh-tile-lg.mud-avatar .mud-icon-root {
    font-size: 22px;
}

/* An outside tool's logo, drawn in the text colour. */
.sh-tile-tool.mud-avatar {
    background: var(--sh-control);
    color: var(--mud-palette-text-primary);
}

.sh-appicon {
    flex: none;
    border-radius: min(24%, var(--sh-radius-lg));
    overflow: hidden;
    background: var(--sh-raised);
    color: var(--mud-palette-text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sh-appicon.sh-appicon-tile {
    color: var(--sh-on-tile);
}

.sh-appicon > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sh-avatar.mud-avatar {
    position: relative;
    vertical-align: middle;
    color: var(--sh-on-tile);
    font-weight: 700;
}

.sh-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sh-avatar-img.sh-loaded {
    background: var(--mud-palette-surface);
}

.sh-avatar-img.sh-failed {
    visibility: hidden;
}

/* ImageCropper */
.sh-crop-area {
    height: 320px;
    border-radius: var(--sh-radius);
    overflow: hidden;
    background: var(--sh-raised);
}

.sh-crop-area img {
    display: block;
    max-width: 100%;
}

.sh-crop .cropper-container {
    overflow: hidden;
}

.sh-crop .cropper-view-box {
    outline: 2px solid var(--sh-crop-outline);
    outline-offset: -2px;
    box-shadow: 0 0 0 9999px var(--sh-scrim);
}

.sh-crop-round .cropper-view-box,
.sh-crop-round .cropper-face {
    border-radius: 50%;
}

.sh-crop-rounded .cropper-view-box,
.sh-crop-rounded .cropper-face {
    border-radius: 22%;
}

/* While the image is sent and stored it can't be moved. */
.sh-crop-saving .sh-crop-area {
    opacity: 0.6;
    pointer-events: none;
}

/* PageHeader, SectionHeader, breadcrumbs */
.sh-page-header {
    margin-bottom: 12px;
}

.sh-page-title {
    flex: 1 1 280px;
    min-width: 0;
}

.sh-title-link {
    color: inherit;
    text-decoration: none;
}

.sh-title-link:hover,
.sh-title-link:focus-visible {
    color: var(--mud-palette-primary);
    text-decoration: underline;
}

.sh-page-title h1 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.sh-section-header {
    margin-bottom: 6px;
}

.sh-breadcrumbs.mud-breadcrumbs {
    padding: 0;
    margin-bottom: 8px;
    font-size: 13px;
}

.sh-breadcrumbs .mud-breadcrumb-item.mud-disabled > span {
    color: var(--mud-palette-text-disabled);
}

/* QuickTile, SubpageShortcut */
.sh-quick-tile.mud-button-root {
    height: 100%;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: var(--sh-radius-lg);
    background: var(--mud-palette-surface);
}

.sh-quick-tile.mud-button-root:hover {
    background: var(--sh-raised);
}

.sh-quick-tile-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sh-quick-tile-title.mud-typography {
    font-weight: 600;
}

.sh-quick-tile-arrow {
    color: var(--mud-palette-text-disabled);
}

.sh-shortcut.mud-button-root {
    min-width: 0;
    padding: 4px;
    border-radius: var(--sh-radius);
}

/* SearchField */
.sh-search.mud-input-control {
    width: 220px;
    margin: 0;
    flex: none;
}

.sh-search .mud-input.mud-input-outlined {
    background: var(--sh-raised);
    border-radius: var(--sh-radius-sm);
}

.sh-search .mud-input-outlined-border {
    border-color: transparent;
}

/* FilterMenu */
.sh-filter-menu {
    position: relative;
    display: inline-flex;
}

/* MudBlazor's positioning sets max-width inline; long names wrap instead of pushing it to the screen edge. */
.sh-filter-popover.mud-popover {
    min-width: 220px;
    max-width: 300px !important;
}

/* Lists with one link per row (Apps page) */
.sh-list .mud-table-cell {
    padding: 4px 6px;
}

.sh-row-link.mud-button-root {
    flex: 1;
    min-width: 0;
    min-height: 36px;
    padding: 4px 8px;
    border-radius: var(--sh-radius);
}

.sh-row-title.mud-typography {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.mud-table-row.sh-clickable-row {
    cursor: pointer;
}

/* Tables with FixedHeader scroll inside a box and keep the header in view. */
.mud-table-sticky-header .mud-table-container {
    max-height: 480px;
}

@media (max-width: 599.98px) {
    .mud-table-sticky-header .mud-table-container {
        max-height: none;
    }
}

/* TablePager */
.sh-pager {
    min-height: 44px;
    box-sizing: border-box;
    padding: 6px 8px;
    border-top: 1px solid var(--mud-palette-divider);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.sh-pager-spacer {
    flex: 1;
}

.sh-pager-size,
.sh-pager-page {
    height: 32px;
    border: 0;
    border-radius: var(--sh-radius);
    background: transparent;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.sh-pager-size {
    padding: 0 4px 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sh-pager-size .mud-icon-root:first-child {
    color: var(--mud-palette-text-secondary);
}

.sh-pager-page {
    min-width: 32px;
    padding: 0 8px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.sh-pager-size:hover,
.sh-pager-page:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
}

.sh-pager-page.sh-pager-current {
    background: var(--sh-primary-tint);
    color: var(--mud-palette-primary);
}

.sh-pager-gap {
    min-width: 20px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

/* IconLink */
.sh-icon-link {
    display: inline-flex;
    padding: 2px;
    border-radius: var(--sh-radius);
    color: var(--mud-palette-text-secondary);
}

.sh-icon-link:hover {
    color: var(--mud-palette-primary);
    background: var(--sh-primary-tint);
}

/* Columns of longer text, such as a description: they wrap and share the free width instead of pushing the other columns out. */
.mud-table .mud-table-cell.sh-cell-text {
    min-width: 200px;
    white-space: normal;
}

@media (min-width: 600px) {
    .mud-table .mud-table-cell.sh-cell-text {
        width: 50%;
    }
}

/* A column of names beside the main one, such as who uploaded a file: long ones are cut so the other columns stay in view. */
.sh-cell-clip {
    max-width: 180px;
    min-width: 0;
}

.sh-cell-clip .mud-typography,
.sh-cell-clip .sh-ellipsis {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main column of a table: takes the free width and cuts long text instead of pushing the other columns out. Below its minimum the table scrolls. */
@media (min-width: 600px) {
    .mud-table .mud-table-cell.sh-cell-fill {
        width: 100%;
        min-width: 140px;
        max-width: 0;
    }
}


.sh-cell-fill .mud-typography {
    min-width: 0;
}

/* UserNameCell and other emphasised cells */
.sh-user-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.sh-user-cell > * {
    flex-shrink: 0;
}

.sh-user-cell .mud-icon-root {
    font-size: 16px;
}

.sh-user-cell-email.mud-typography {
    margin-left: 2px;
    flex: 0 1 auto;
    min-width: 0;
}

.sh-user-cell-name.mud-typography {
    font-weight: 600;
}

/* The email gives way first; the name is only cut when it does not fit on its own. */
.sh-user-cell > .sh-user-cell-name.mud-typography {
    max-width: 100%;
}

.sh-user-cell > .sh-user-cell-name.mud-typography:has(+ .sh-user-cell-email) {
    max-width: calc(100% - 8px);
}

.sh-role-chips {
    flex-wrap: wrap;
}

/* Role chips stay on one line in tables; the rest is behind "+N more". */
.mud-table-cell .sh-role-chips {
    flex-wrap: nowrap;
}

/* PropertyList, PropertyRow */
.sh-prop-list.mud-paper {
    padding: 2px 14px;
}

/* The title keeps its width; buttons that don't fit beside it move below. */
.sh-prop-list-head {
    min-height: 40px;
    padding-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* A section or panel title with its (i) right after it; actions stay on the right. */
.sh-heading {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sh-prop-list-head .mud-button-root {
    white-space: nowrap;
}

/* A table inside a PropertyList uses the panel instead of its own. */
.sh-prop-list .mud-table {
    padding: 0;
    background: transparent;
}

.sh-prop-list-danger.mud-paper {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mud-palette-error) 40%, transparent);
}

.sh-prop-row {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.sh-prop-row:last-child {
    border-bottom: 0;
}

.sh-prop-label {
    flex: 0 0 170px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sh-prop-label-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Only as tall as the icon, so rows center the icon and not a line of text. */
.mud-tooltip-root.sh-info-tip-root {
    display: inline-flex;
    vertical-align: -0.25em;
}

/* After a label's last word, also when the label wraps. */
.sh-prop-label-text .sh-info-tip-root {
    margin-left: 6px;
}

/* A control or caption with its (i), e.g. a switch in a dialog. */
.sh-with-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* The (i) after a label: muted until hovered or focused. */
.sh-info-tip {
    display: inline-flex;
    color: var(--mud-palette-text-disabled);
    cursor: help;
    border-radius: 50%;
}

.sh-info-tip:hover,
.sh-info-tip:focus-visible {
    color: var(--mud-palette-text-secondary);
    outline: none;
}

.sh-info-tip .mud-icon-root {
    font-size: 16px;
}

.sh-prop-label-text > .mud-typography-body2 {
    font-weight: 500;
}

.sh-prop-value {
    flex: 1 1 200px;
    min-width: 0;
}

/* Chips with a description wrap under each other instead of widening the row. */
.sh-prop-value .sh-chip-row {
    flex-wrap: wrap;
    white-space: normal;
}

/* A row of chips or an icon with text as the whole value lines up with the label like plain text. */
.sh-prop-value > .sh-chip-row {
    display: flex;
}

/* Phones: the label and its buttons share the first line, the value gets the full line below. */
@media (max-width: 599.98px) {
    .sh-prop-row {
        padding-block: 6px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "label actions" "value value";
        gap: 2px 8px;
    }

    .sh-prop-label {
        grid-area: label;
    }

    .sh-prop-value {
        grid-area: value;
    }

    .sh-prop-actions {
        grid-area: actions;
    }

    .sh-prop-list-compact .sh-prop-row {
        padding-block: 0;
        display: flex;
    }
}

/* A block with the line as tall as the box, so a too long value ends with an ellipsis inside the padding. */
.sh-secret.mud-typography {
    height: var(--sh-control-height);
    box-sizing: border-box;
    padding: 0 12px;
    border-radius: var(--sh-radius-sm);
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-secondary);
    line-height: var(--sh-control-height);
}

/* ImageEditFrame */
.sh-image-edit-button .mud-icon-root.mud-icon-size-medium {
    font-size: 16px;
}

.sh-image-edit {
    position: relative;
    flex: none;
    display: inline-flex;
}

/* Room for the camera button that sticks out below the image. */
.sh-prop-value > .sh-image-edit {
    margin-block: 4px 10px;
}

.sh-image-edit-button.mud-button-root {
    position: absolute;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    padding: 4px;
    background: var(--sh-control);
    box-shadow: 0 0 0 4px var(--mud-palette-background);
}

/* CopyableText */
.sh-copyable {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--mud-palette-text-secondary);
}

/* StatusMessage (404, access denied) */
.sh-status.mud-container {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.sh-status-code.mud-typography {
    font-weight: 700;
    line-height: 1;
}

.sh-status-icon.mud-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--sh-radius-lg);
    margin-bottom: 8px;
    background: color-mix(in srgb, var(--mud-palette-warning) 16%, transparent);
    color: var(--mud-palette-warning);
}

.sh-status-icon.mud-avatar .mud-icon-root {
    font-size: 40px;
}

/* SelectionBar */
.sh-selection-bar.mud-paper {
    min-height: 40px;
    margin-bottom: 8px;
    padding: 0 8px 0 4px;
    border-radius: var(--sh-radius);
    background: var(--sh-primary-tint);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FilterChips */
.sh-filter-chips {
    margin-bottom: 8px;
}

/* DetailLayout, DetailPanel */
.sh-detail-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.sh-detail-main {
    flex: 999 1 520px;
    min-width: 0;
}

.sh-detail-side {
    flex: 0 0 340px;
    min-width: 0;
    position: sticky;
    top: 16px;
}

.sh-detail-empty.mud-paper {
    min-height: 160px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: var(--mud-palette-text-disabled);
}

@media (max-width: 899px) {
    .sh-detail-side {
        flex-basis: 100%;
    }

    .sh-detail-side:has(.sh-detail-empty) {
        display: none;
    }
}

.sh-detail-panel.mud-paper {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sh-detail-title.mud-typography {
    font-weight: 600;
}

.sh-detail-actions {
    padding-top: 4px;
}

.mud-table-row.sh-row-open > td {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}

/* PropertyList inside side panels */
.sh-prop-list-compact.mud-paper {
    padding: 0 12px;
    background: var(--sh-raised);
}

.sh-prop-list-compact .sh-prop-row {
    min-height: 32px;
    flex-wrap: nowrap;
    border-bottom-color: var(--mud-palette-surface);
}

.sh-prop-list-compact .sh-prop-label {
    flex-basis: 88px;
}

.sh-prop-list-compact .sh-prop-value {
    flex-basis: 0;
}

/* StatTile */
.sh-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
}

.sh-stat-tile-root {
    display: block;
}

.sh-stat-tile {
    height: 30px;
    padding: 0 8px;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-raised);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sh-stat-tile .sh-stat-icon {
    font-size: 16px;
    color: var(--mud-palette-text-secondary);
}

.sh-stat-value {
    font-size: 14px;
    font-weight: 600;
}

/* MetaItem */
.sh-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    min-width: 0;
}

.sh-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
    color: var(--mud-palette-text-secondary);
}

.sh-meta-item .mud-icon-root {
    font-size: 15px;
}

.sh-meta .mud-chip {
    margin: 0;
}

/* Fixed columns so the meta lines up from row to row. */
.sh-row-link .sh-meta {
    flex: none;
    display: grid;
    grid-template-columns: 76px 48px 92px;
    justify-items: start;
}

/* UploadQueuePanel */
.sh-upload-panel.mud-paper {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    width: min(340px, calc(100vw - 32px));
    padding: 8px 6px 8px 12px;
    border-radius: var(--sh-radius-lg);
    background: var(--sh-raised);
    box-shadow: var(--sh-shadow-overlay);
}

.sh-upload-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-upload-list {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sh-upload-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 6px;
}

.sh-upload-info {
    flex: 1;
    min-width: 0;
}

.sh-upload-bar.mud-progress-linear {
    margin-top: 4px;
}

/* Drop-anywhere overlay on the content page, shown while files are dragged over the window. */
body.sh-dragging-files::after {
    content: "Drop files to upload";
    position: fixed;
    inset: 12px;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--mud-palette-primary);
    border-radius: var(--sh-radius-lg);
    background: color-mix(in srgb, var(--mud-palette-background) 80%, transparent);
    color: var(--mud-palette-primary);
    font-size: 18px;
    font-weight: 600;
    pointer-events: none;
}

body.sh-dragging-files.sh-dragging-release::after {
    content: "Drop a build folder to upload";
}

.sh-dropzone-active.mud-paper {
    border-color: var(--mud-palette-primary);
}

/* PlatformIcon */
.sh-platform-icon {
    position: relative;
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-control);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sh-platform-icon.sh-faded {
    opacity: 0.4;
}

.sh-platform-icon b {
    position: absolute;
    right: -1px;
    bottom: -1px;
    min-width: 11px;
    height: 11px;
    box-sizing: border-box;
    padding: 0 2px;
    border-radius: var(--sh-radius-xs);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 7.5px;
    font-weight: 700;
    line-height: 11px;
    text-align: center;
}

.sh-platform-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Channel and update pairs of an app release. */
.sh-served-list {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 12px;
}

@media (min-width: 600px) {
    .sh-served-list {
        flex-wrap: nowrap;
    }
}

/* Icon choices in the platform and collection dialogs; the chosen one is outlined without changing size. */
.mud-icon-button.sh-icon-pick {
    border-radius: var(--sh-radius-sm);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.mud-icon-button.sh-icon-pick-on {
    box-shadow: inset 0 0 0 2px var(--mud-palette-primary);
}

/* IconPickerDialog */
.sh-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 4px;
}

.sh-icon-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.sh-icon-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--sh-radius);
    background: var(--mud-palette-surface);
}

/* GroupTile, GroupChips, AvatarStack, AppTiles, MoreCount */
.sh-tile-xs.mud-avatar {
    width: 18px;
    height: 18px;
    border-radius: var(--sh-radius-sm);
}

.sh-tile-xs.mud-avatar .mud-icon-root {
    font-size: 12px;
}

.sh-tile-sm.mud-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--sh-radius-sm);
}

.sh-tile-sm.mud-avatar .mud-icon-root {
    font-size: 16px;
}

.sh-chip-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    min-width: 0;
}

.sh-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
    height: 24px;
    padding: 0 8px 0 3px;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-raised);
    font-size: 12px;
    font-weight: 500;
}

/* Empty table cell: a dashed slot the size of an app icon. */
.sh-empty-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    border: 1.5px dashed var(--sh-control);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-hover);
    vertical-align: middle;
}

.sh-empty-cell .mud-icon-root {
    font-size: 15px;
}

.sh-empty-cell.sh-empty-chip {
    width: 40px;
}

/* Icons, chip rows and tooltips in a cell sit on the row's center line like its text. */
.mud-table-cell .sh-chip-row,
.mud-table-cell .mud-tooltip-root.mud-tooltip-inline {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.mud-table-cell > .mud-icon-root {
    vertical-align: middle;
}

.sh-group-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-more-count {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-control);
    font-size: 11px;
    font-weight: 600;
    cursor: default;
}

.sh-more-list {
    padding: 4px 0;
    align-items: flex-start;
}

.sh-more-link {
    position: relative;
    flex: none;
}

.sh-more-link-text {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    font-size: 12px;
    color: var(--mud-palette-primary);
    white-space: nowrap;
    cursor: pointer;
}

.sh-more-popover {
    z-index: 1300;
}

/* ColorChooser */
.sh-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
}

.sh-swatch {
    position: relative;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--sh-radius-sm);
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sh-on-tile);
}

.sh-swatch-on {
    box-shadow: 0 0 0 2px var(--mud-palette-background), 0 0 0 4px var(--mud-palette-primary);
}

.sh-swatch-none {
    background: var(--sh-raised);
    color: var(--mud-palette-text-secondary);
}

.sh-swatch-rainbow {
    background: var(--sh-rainbow);
}

.sh-swatch-anchor {
    position: relative;
    display: inline-flex;
}

.sh-color-popover {
    border-radius: var(--sh-radius-lg);
    overflow: hidden;
}

.sh-color-popover .mud-picker-paper,
.sh-color-popover .mud-picker-container {
    background: var(--mud-palette-surface);
    box-shadow: none;
}

.sh-color-popover .mud-input-control-helper-container {
    display: none;
}

.sh-color-popover .mud-picker-paper {
    position: relative;
}

.sh-color-popover .mud-picker-color-controls {
    padding: 12px 16px;
}

/* Done shares the hex row, which keeps the picker short enough to fit below the swatches on phones. */
.sh-color-popover .mud-picker-color-controls-row + .mud-picker-color-controls-row {
    margin: 12px 72px 0 0;
}

.sh-color-popover .mud-picker-actions {
    position: absolute;
    right: 8px;
    bottom: 9px;
    padding: 0;
}

/* Dialogs bound a fixed layer to their own box, so this one lives in the popover to reach the whole screen. */
.sh-color-popover .sh-click-away {
    z-index: -1;
}

.sh-pick-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sh-pick-row {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sh-pick-row > .sh-user-cell {
    flex: 1 1 auto;
}

.sh-pick-trailing {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
}

.sh-pick-list > .mud-input-control {
    margin-top: 6px;
}

.sh-pick-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* GlobalRolesDialog: role name and what it allows on one line. */
.mud-radio-group:has(> .sh-role-option) {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sh-role-option,
.sh-role-option .mud-input-control-input-container,
.sh-role-option label {
    width: 100%;
}

.sh-role-option label > .mud-typography {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.sh-role-option-name {
    flex: 0 0 140px;
    font-weight: 600;
}

.sh-role-option-text {
    flex: 1;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

/* Long descriptions wrap: the tick stays on the name's line. */
.sh-role-option label {
    align-items: flex-start;
}

.sh-role-option label > .mud-typography {
    padding-top: 5px;
}

@media (max-width: 599.98px) {
    .sh-role-option label > .mud-typography {
        flex-direction: column;
        gap: 0;
    }

    .sh-role-option-name {
        flex: none;
    }
}

/* ResetPasswordDialog */
.sh-mono input {
    font-family: var(--sh-font-mono);
}

/* RolePicker */
.sh-role-picker {
    max-height: min(52vh, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

/* Phones: one scrolling area per dialog, the dialog's own. A list scrolling inside it is hard to scroll by touch. */
@media (max-width: 599.98px) {
    .sh-role-picker {
        max-height: none;
        overflow-y: visible;
    }
}

.sh-role-picker-group.mud-typography {
    padding-top: 8px;
}

/* Downloads: one line per build of a kind: its check, version and icons, the downloads in a column of their own, time and menu */
.sh-build-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 10px;
    padding: 7px 0;
    min-width: 0;
    font-size: 13px;
}

.sh-version-list > .sh-build-row + .sh-build-row {
    border-top: 1px solid var(--mud-palette-divider);
}

.sh-build-mark {
    width: 20px;
    height: var(--sh-control-height);
    flex: none;
    display: inline-flex;
    align-items: center;
}

.sh-build-what {
    flex: 1 1 160px;
    min-width: 0;
    min-height: var(--sh-control-height);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sh-build-downloads {
    width: 468px;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sh-build-time {
    width: 76px;
    height: var(--sh-control-height);
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--mud-palette-text-disabled);
    font-size: 12px;
    white-space: nowrap;
}

/* Phones: the version, time and menu on the first line, the downloads below. */
@media (max-width: 599.98px) {
    .sh-build-what {
        order: 0;
    }

    .sh-build-time {
        order: 1;
        width: auto;
    }

    .sh-build-row > .mud-menu {
        order: 2;
    }

    .sh-build-downloads {
        order: 3;
        width: 100%;
        padding-left: 30px;
    }
}

.sh-version-number {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.sh-version-number:hover {
    text-decoration: underline;
}

.sh-stable-icon.mud-icon-root {
    font-size: 18px;
}

/* A plain icon button for a version's notes */
.sh-note-icon {
    width: 22px;
    height: 22px;
    flex: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sh-note-icon .mud-icon-root {
    font-size: 16px;
}

/* A small outlined action, e.g. Add issue */
.sh-pill {
    height: 24px;
    padding: 0 10px 0 6px;
    border: 0;
    border-radius: var(--sh-radius-pill);
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--sh-hover);
    color: var(--mud-palette-text-primary);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.sh-pill .mud-icon-root {
    font-size: 16px;
}

.sh-pill:hover {
    background: var(--sh-raised);
    color: var(--mud-palette-text-primary);
}

.sh-download-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 30px;
}

.sh-pill.sh-pill-end {
    padding: 0 6px 0 10px;
    text-decoration: none;
}

/* App version page: notes, stable mark, known issues and what channels serve, one line each */
.sh-version-pane.mud-paper {
    padding: 2px 14px;
}

.sh-version-pane-row {
    min-height: 36px;
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
    font-size: 13px;
}

.sh-version-pane-row:last-child {
    border-bottom: 0;
}

.sh-version-pane-label {
    width: 110px;
    flex: none;
    line-height: 30px;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

/* Every value starts at one edge, icons and pills included; who, when and the remove buttons sit on the right edge. */
.sh-version-pane-value {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sh-version-pane-value > * {
    align-self: stretch;
}

.sh-version-pane-value > .sh-pill {
    align-self: flex-start;
    margin: 4px 0;
}

.sh-version-pane-line {
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-version-pane-wrap {
    flex-wrap: wrap;
    gap: 4px 16px;
}

/* Phones: who and when wrap in their own space next to the remove button instead of running off the screen. */
@media (max-width: 599.98px) {
    .sh-version-pane-line .sh-issue-who {
        flex: 1 1 0;
        min-width: 0;
        white-space: normal;
        text-align: right;
    }

    .sh-version-pane-label {
        width: 90px;
    }
}

/* Keeps who and when in line where there is no remove button */
.sh-action-space {
    width: 28px;
    flex: none;
}

.sh-stable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mud-palette-success);
    font-weight: 600;
}

/* Extra builds of a platform: dimmed icon and name */
.sh-dim b {
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

/* Dimmer text for times and who did something */
.sh-faint {
    color: var(--mud-palette-text-disabled);
}

.sh-download {
    height: var(--sh-control-height);
    box-sizing: border-box;
    padding: 0 8px 0 3px;
    border: 0;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-control);
    color: var(--mud-palette-text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.sh-download:hover {
    background: var(--sh-hover);
    color: var(--mud-palette-text-primary);
}

.sh-download > .mud-icon-root {
    color: var(--mud-palette-primary);
}

.sh-download .sh-platform-icon {
    width: 24px;
    height: 24px;
    background: var(--sh-raised);
}

.sh-splash {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
    object-fit: cover;
    border-radius: var(--sh-radius);
}

.sh-splash-empty {
    background: var(--sh-raised);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-splash-small {
    width: 160px;
}

.sh-splash-small .sh-appicon {
    width: 40px !important;
    height: 40px !important;
}

.sh-crop-wide .cropper-view-box,
.sh-crop-wide .cropper-face {
    border-radius: var(--sh-radius-sm);
}

/* Known issues of a version: amber count, list popover */
.sh-issues {
    width: 22px;
    height: 22px;
    flex: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mud-palette-warning);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sh-issues .mud-icon-root {
    font-size: 17px;
}

.sh-issues:hover {
    filter: brightness(1.2);
}

.sh-issues-popover.mud-popover {
    width: 440px;
    max-width: calc(100vw - 32px);
    padding: 10px 8px 10px 14px;
}

.sh-issue-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sh-issue {
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.sh-issue-icon.mud-icon-root {
    font-size: 17px;
    color: var(--mud-palette-warning);
}

.sh-issue-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.sh-issue-who {
    flex: none;
    color: var(--mud-palette-text-disabled);
    font-size: 12px;
    white-space: nowrap;
}

.sh-issue-new {
    align-self: flex-start;
    margin: 4px 0;
}

.sh-issue-add {
    max-width: 520px;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Releases: what a release is for, and a build's files folded out under its row */
.sh-for-chip {
    height: 22px;
    padding: 0 8px 0 6px;
    border-radius: var(--sh-radius);
    background: var(--sh-raised);
    color: var(--mud-palette-text-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.sh-for-chip .mud-icon-root {
    font-size: 14px;
    color: var(--mud-palette-text-secondary);
}

.sh-col-fold,
.mud-table-cell.sh-col-fold {
    width: 1%;
    padding-right: 0;
}

/* A plain chevron that folds a row out, like the folders of a file tree */
.sh-fold {
    width: 24px;
    height: 24px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    cursor: pointer;
}

.sh-fold:hover {
    color: var(--mud-palette-text-primary);
}

.mud-table-cell.sh-file-tree-cell {
    padding: 0 10px 10px 40px;
}

.sh-file-tree {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sh-file-row {
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
}

button.sh-file-row {
    width: 100%;
    border: 0;
    border-radius: var(--sh-radius-sm);
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

button.sh-file-row:hover {
    background: var(--sh-raised);
}

.sh-file-fold {
    width: 20px;
    flex: none;
}

.sh-file-name {
    min-width: 0;
}

.sh-file-size {
    margin-left: auto;
    padding-right: 6px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

button.sh-file-row .sh-file-size {
    padding-right: 34px;
}

.sh-file-children {
    padding-left: 26px;
}

/* Downloads: kind of a build other than Release, e.g. Debug */
.sh-kind-chip {
    height: 20px;
    padding: 0 7px;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-control);
    color: var(--mud-palette-text-primary);
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* A template's key, or "added", at the right of its menu item */
.sh-menu-key {
    margin-left: auto;
    padding-left: 24px;
    font-family: var(--sh-font-mono);
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

/* A choice inside a settings row, e.g. how long sign-ins last. */
.sh-setting-select.mud-input-control {
    width: 220px;
    flex: none;
    margin: 0;
}

/* A value edited but not saved yet: a dot after the label, an outlined field in the primary colour. */
.sh-changed-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.sh-changed .mud-input-outlined-border {
    border-color: var(--mud-palette-primary);
}

/* A menu item or select option with a title and a line under it; menu items keep a slot for a check or icon on the left. */
.sh-option {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sh-option small {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.sh-menu-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sh-menu-check {
    width: 20px;
    flex: none;
    display: inline-flex;
}

/* What a section shares with every app, after its title; a link to the hub's page for those who can open it. */
.sh-hub-pill {
    height: 24px;
    box-sizing: border-box;
    padding: 0 10px 0 7px;
    border-radius: var(--sh-radius-pill);
    background: var(--sh-raised);
    color: var(--mud-palette-text-secondary);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    text-decoration: none;
}

.sh-hub-pill .mud-icon-root {
    font-size: 15px;
}

a.sh-hub-pill:hover {
    background: var(--sh-control);
    color: var(--mud-palette-text-primary);
}

/* The shared platforms in an app's Releases settings. */
.sh-platform-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sh-platform-chip {
    height: 34px;
    box-sizing: border-box;
    padding: 0 10px 0 4px;
    border-radius: var(--sh-radius);
    background: var(--mud-palette-surface);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.sh-platform-chip .sh-mono {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

/* While the server works on a click (wwwroot/ServiceHub.lib.module.js): a thin bar at the top of the page and a spinner in the clicked button. */
html.sh-server-wait::after {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 3000;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--mud-palette-primary) 30%, var(--mud-palette-primary) 70%, transparent) no-repeat,
        color-mix(in srgb, var(--mud-palette-primary) 15%, transparent);
    background-size: 40% 100%, 100% 100%;
    animation: sh-wait-slide 1.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sh-wait-slide {
    from { background-position: -70% 0, 0 0; }
    to { background-position: 170% 0, 0 0; }
}

.sh-busy-tap,
.sh-busy-sibling {
    pointer-events: none;
}

.sh-busy-tap {
    cursor: progress;
}

.sh-busy-sibling {
    opacity: 0.45;
}

.sh-busy-tap .mud-icon-root {
    visibility: hidden;
}

.mud-icon-button.sh-busy-tap,
.sh-busy-tap .mud-button-icon-start {
    position: relative;
}

.mud-icon-button.sh-busy-tap::after,
.sh-busy-tap .mud-button-icon-start::after,
.mud-button.sh-busy-tap:not(:has(.mud-button-icon-start)) .mud-button-label::before {
    content: "";
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sh-spin 0.8s linear infinite;
}

.mud-icon-button.sh-busy-tap::after,
.sh-busy-tap .mud-button-icon-start::after {
    position: absolute;
    inset: 0;
    margin: auto;
}

.mud-button.sh-busy-tap:not(:has(.mud-button-icon-start)) .mud-button-label::before {
    display: inline-block;
    margin-right: 8px;
}

@keyframes sh-spin {
    to { transform: rotate(360deg); }
}

/* With reduced motion the bar stands still and the spinner turns slowly. */
@media (prefers-reduced-motion: reduce) {
    html.sh-server-wait::after {
        animation: none;
        background: color-mix(in srgb, var(--mud-palette-primary) 60%, transparent);
    }

    .mud-icon-button.sh-busy-tap::after,
    .sh-busy-tap .mud-button-icon-start::after,
    .mud-button.sh-busy-tap:not(:has(.mud-button-icon-start)) .mud-button-label::before {
        animation-duration: 2.5s;
    }
}

/* Notifications: the bell and its panel */
.sh-brand-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sh-brand-row .sh-brand {
    flex: 1;
    min-width: 0;
}

.sh-bell {
    position: relative;
    flex: none;
}

.sh-bell-button {
    position: relative;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--sh-radius-sm);
    background: transparent;
    color: var(--mud-palette-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sh-bell-button:hover,
.sh-bell-button.sh-bell-open {
    background: var(--sh-raised);
    color: var(--mud-palette-text-primary);
}

.sh-bell-button .mud-icon-root {
    font-size: 21px;
}

.sh-bell-badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: var(--sh-radius-pill);
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--mud-palette-surface);
}

.sh-notif-popover.mud-popover {
    width: 400px;
    max-width: calc(100vw - 32px);
}

.sh-notif {
    max-height: min(640px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
}

.sh-notif-head {
    min-height: 44px;
    padding: 6px 8px 4px 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sh-notif-head .sh-detail-title {
    flex: 1;
}

.sh-notif-list {
    padding: 0 6px 6px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sh-notif-row {
    min-height: 48px;
    padding: 8px;
    border-radius: var(--sh-radius-sm);
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sh-notif-row:hover {
    background: var(--sh-raised);
}

.sh-notif-hub {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: var(--sh-radius-sm);
    background: var(--sh-raised);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sh-notif-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sh-notif-title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 18px;
    color: var(--mud-palette-text-secondary);
}

.sh-notif-unread .sh-notif-title {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.sh-notif-what {
    font-size: 12px;
    line-height: 16px;
    color: var(--mud-palette-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
}

.sh-notif-what .mud-icon-root {
    font-size: 14px;
}

.sh-notif-end {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.sh-notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
}

.sh-notif-older.mud-button-root {
    align-self: center;
}

@media (max-width: 959px) {
    .sh-drawer .sh-bell {
        display: none;
    }

    .sh-notif-sheet.mud-popover {
        position: fixed !important;
        inset: 48px 0 0 !important;
        width: auto;
        max-width: none;
        transform: none !important;
        border-radius: 0;
    }

    .sh-notif-sheet .sh-notif {
        height: 100%;
        max-height: none;
    }
}

/* Profile > Notifications: scopes on the left, their kinds on the right */
.sh-ns {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.sh-ns-scopes.mud-paper {
    flex: 1 1 240px;
    min-width: 0;
    max-width: 260px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sh-ns-scopes .sh-search {
    margin: 2px 0 4px;
}

.sh-ns-kinds.mud-paper {
    flex: 999 1 420px;
    max-width: 720px;
    min-width: 0;
    padding: 4px 14px 6px;
}

.sh-ns-scope {
    min-width: 0;
    min-height: 44px;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--sh-radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sh-ns-scope:hover,
.sh-ns-scope.sh-ns-scope-on {
    background: var(--sh-raised);
}

.sh-ns-scope-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sh-ns-scope-text b {
    font-size: 13.5px;
    font-weight: 600;
}

.sh-ns-scope-text small {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.sh-ns-head {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.sh-ns-row {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.sh-ns-row:last-child {
    border-bottom: 0;
}

.sh-ns-row > .mud-icon-root {
    font-size: 18px;
}

.sh-ns-name {
    flex: 0 0 160px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sh-ns-note.mud-typography {
    flex: 1;
    min-width: 0;
}

@media (max-width: 599.98px) {
    .sh-ns-scopes.mud-paper {
        max-width: none;
    }

    .sh-ns-name {
        flex-basis: auto;
    }
}

/* Toggle options sized to their labels, which stay on one line; on a narrow screen they wrap to a second row. */
.sh-choices.mud-toggle-group {
    display: flex !important;
    flex-wrap: wrap;
    max-width: 100%;
}

.sh-choices .mud-toggle-item {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .sh-choices .mud-toggle-item {
        padding-inline: 6px;
    }
}

/* Draft bar: changes waiting to be saved or published. */
.sh-draft-bar.mud-paper {
    position: sticky;
    top: 8px;
    z-index: 3;
    min-height: 52px;
    padding: 6px 10px 6px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
}

.sh-draft-bar-text {
    flex: 1 1 240px;
    min-width: 0;
}

/* OnlineNow */
.sh-online {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: var(--mud-typography-body2-size);
}

.sh-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mud-palette-success);
    flex: none;
}
