/*
 * A swatch, a name and its count — the row that names a chart's colours.
 *
 * 130px is the width several of these WANT so they line up in a column, never a
 * hard floor: the row shrinks past it, and only the label inside gives way. Same
 * mistake `table_fit` fixed once — asking "does it still fit" where the question
 * is "can it still be read".
 *
 * The 8px swatch matches `TotalsLine`'s, because the two annotate the same
 * charts and a reader should not be able to tell which drew the legend.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-legend-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 1;
    min-width: 130px;
    gap: var(--lotics-space-8);
  }

  .lotics-legend-item__swatch {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: calc(var(--lotics-radius-control) - var(--lotics-space-8));
    background-color: var(--lotics-legend-item-swatch);
  }

  .lotics-legend-item__label {
    flex-shrink: 1;
    min-width: 0;
  }
}
