.jupiter-shell {
    height: 100vh;
    overflow: hidden;
}

.jupiter-shell .mud-drawer-content {
    overflow-y: auto;
}

.jupiter-main {
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

/* Filled, outlined, and text buttons share padding. Labels use the same
   face as the rest of the page, not the wide uppercase button style. */
.jupiter-shell .mud-button-root:not(.mud-icon-button) {
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
}

.jupiter-shell .mud-button-text:not(.mud-icon-button):not(.mud-button-text-size-small) {
    padding: 6px 16px;
}

.jupiter-shell .mud-button-filled-size-small:not(.mud-icon-button),
.jupiter-shell .mud-button-outlined-size-small:not(.mud-icon-button),
.jupiter-shell .mud-button-text-size-small:not(.mud-icon-button) {
    padding: 4px 10px;
    font-size: 0.8125rem;
}

.jupiter-shell .mud-toolbar > .mud-button-root + .mud-button-root,
.jupiter-shell .mud-dialog-actions > .mud-button-root + .mud-button-root {
    margin-inline-start: 8px;
}

.jupiter-shell .mud-table-cell .mud-stack-row {
    gap: 8px;
}

.jupiter-tool {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

/* Cards under a fixed tool title. The title, app bar, and drawer stay put. */
.jupiter-tool-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}

/* A tool whose content is taller than the window. The app bar and drawer
   stay put; this region scrolls. */
.jupiter-tool-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
}

/* Shared table look from Orion License File Manager. Page CSS still sets column widths. */
.jupiter-table .mud-table-body .mud-table-row {
    background-color: var(--mud-palette-background);
}

.jupiter-table .mud-table-body .mud-table-row:nth-of-type(odd) {
    background-color: var(--mud-palette-background-gray) !important;
}

.jupiter-table .mud-table-body .mud-table-row:hover {
    background-color: var(--mud-palette-primary-hover) !important;
    cursor: pointer;
}

.jupiter-table .mud-table-body .mud-table-row .mud-table-cell {
    color: var(--mud-palette-info-text);
}

.jupiter-table table {
    width: 100% !important;
}

.jupiter-table thead .mud-table-cell {
    white-space: nowrap;
}

.jupiter-table .mud-table-cell:has(.mud-checkbox) {
    text-align: center;
}

.jupiter-table .mud-table-cell .mud-checkbox {
    display: flex;
    justify-content: center;
}

.jupiter-table .mud-table-body .mud-table-row:has(> :first-child .mud-checkbox-true) {
    background-color: var(--mud-palette-primary) !important;
}

.jupiter-table .mud-checkbox-true svg {
    color: var(--mud-palette-success);
}

.jupiter-table .mud-checkbox-false svg {
    color: var(--mud-palette-error);
}

/* Row inspection tips fill the cell so the tip opens on empty space too. */
.jupiter-row-tip tbody .mud-table-cell {
    position: relative;
    height: 1px;
    padding: 0 !important;
}

.jupiter-row-tip tbody .mud-tooltip-root {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 6px 24px 6px 16px;
}

.jupiter-row-tip tbody td:last-child .mud-tooltip-root {
    padding-inline-end: 16px;
}

.jupiter-table-actions col:last-child,
.jupiter-table-actions .mud-table-cell:last-child {
    width: 1% !important;
    white-space: nowrap;
}

/* Argus and Actions share the window. Each pane scrolls inside its grid. */
.argus-split {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.argus-pane {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.argus-pane-grid {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* The grid fills the pane. Rows scroll. The page controls stay at the bottom. */
.argus-pane-grid > .mud-data-grid {
    flex: 1 1 0;
    min-height: 0;
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.argus-pane-grid .mud-table-container {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow: auto;
}

.argus-pane-grid .mud-table-pagination {
    flex: 0 0 auto;
}

/* The pager's top border is the divider above the page controls. It spans the table. */
.jupiter-table .mud-table-pagination-toolbar {
    width: 100%;
    border-top: 1px solid var(--mud-palette-table-lines);
}

/* An open tooltip is position:absolute. Past the viewport it grows the page
   and a scrollbar appears until the pointer leaves. Fixed positioning does
   not, and the size cap keeps a long note inside the window. */
.mud-popover.mud-tooltip {
    max-width: min(24rem, calc(100vw - 16px)) !important;
    max-height: min(12rem, calc(100vh - 16px)) !important;
    overflow: auto;
    overflow-wrap: anywhere;
    text-align: start;
    box-sizing: border-box;
}
