@layer infine.components {
/* A table whose rows each open something: Connect's supplier roster, CO₂'s largest products without a footprint.
   A row opts into the hover with .list-table__row, so a table of placeholders can leave it out.
   A table that is not a list, such as a grid of coloured cells, takes the heading alone with .list-table__head on its thead. */

.list-table thead th,
.list-table__head th {
    color: var(--mantine-color-gray-7);
    font-size: var(--mantine-font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    border-bottom: 1px solid var(--infine-blue-light-fade);
    /* A label and its sort chevron are one unit.
       They are separate inline-block boxes, so a narrow column offered a wrap opportunity between them
       and dropped the chevron onto a line of its own;
       that header then stood two lines tall,
       and the cell's vertical centring shifted every single-line header down against it,
       leaving the row visibly out of line.
       The cost is that a two-word header can no longer wrap,
       so the table's minimum width grows by ~50px. */
    white-space: nowrap;
}

.list-table tbody tr {
    cursor: pointer;
    /* Left-edge marker shown on hover to flag the context-switch on click.
       Implemented as an inline-start box-shadow on the row's cells so it
       doesn't shift the row layout — see the .list-table__row:hover td
       rule below. */
    position: relative;
}

.list-table tbody td {
    vertical-align: middle;
    border-bottom: 1px solid var(--mantine-color-gray-1);
}

/* Hover state: subtle blue tint + a left-edge blue-bright stripe so the
   row reads as "about to switch context" rather than just "highlight". */
.list-table tbody tr.list-table__row:hover td {
    background-color: var(--infine-blue-bg);
}
.list-table tbody tr.list-table__row:hover td:first-child {
    box-shadow: inset 3px 0 0 0 var(--infine-blue-bright);
}

/* What a row is named by, the supplier or the product. */
.list-table__name {
    font-weight: 600;
    color: var(--infine-blue);
    font-size: var(--mantine-font-size-sm);
}
}
