/* Rows of figures. The block scrolls sideways on its own rather than widening the page on a phone. */
.table {
    overflow-x: auto;
}

.table__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.table__heading {
    padding: 0 var(--spacing-md) var(--spacing-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-on-surface-muted);
    text-align: left;
    white-space: nowrap;
    border-bottom: var(--border-width) solid var(--color-divider-subtle);
}

.table__heading:first-child,
.table__cell:first-child {
    padding-left: 0;
}

.table__heading:last-child,
.table__cell:last-child {
    padding-right: 0;
}

/* As roomy as the rows of a list. The rule is on top, so the last row ends without one and the first meets the heading's. */
.table__cell {
    padding: var(--spacing-md);
    border-top: var(--border-width) solid var(--color-divider-subtle);
}

/* A value that reads wrong broken across lines, such as a model id: the table scrolls instead. */
.table__cell--nowrap {
    white-space: nowrap;
}

/* A totals row: set apart from the rows it adds up. */
.table__cell--total {
    font-weight: var(--font-weight-medium);
    text-align: left;
    border-top: var(--border-width) solid var(--color-border);
}

.table__heading--numeric,
.table__cell--numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* A name with its logo or icon in front. */
.table__name {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.table__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Put the comparable value first, with supporting counts beneath it. */
.table__value {
    display: block;
    font-weight: var(--font-weight-medium);
}

.table__detail {
    display: block;
    color: var(--color-on-surface-muted);
    font-weight: var(--font-weight-regular);
}

.table__cell--top {
    vertical-align: top;
}

.table__cell--identity {
    max-width: 18rem;
    overflow-wrap: anywhere;
}
