/*
 * ONE mark, four kinds, and the ink is the MEANING rather than the brand — so
 * the three that say something take palette families and none of them moves
 * with a theme (theming.md §2.2).
 *
 * The ink is 700 on a 100 ground: at 600-on-50 the amber measured ~3.4:1, over
 * the 3:1 floor for a graphical object by so little that any dimming — a decided
 * row at half opacity, which this renders inside routinely — put it under.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-diff-mark {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    /* The mark is the DISC's width, never its container's. A flex parent that
       stretches its children — a table cell, a detail row — otherwise makes this
       box the column's width, which moves nothing visible and quietly makes the
       mark's own box a lie. `align-self` would fix it too and would also
       overrule a parent that centres the mark, which is most of them. */
    width: fit-content;
    gap: var(--lotics-space-6);
  }

  /* 22 is this component's own measure: the smallest disc whose glyph is still
     identifiable at a glance, which is the only thing a scan mark must be. */
  .lotics-diff-mark__disc {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: var(--lotics-radius-full);
    background-color: transparent;
  }

  .lotics-diff-mark[data-kind="added"] .lotics-diff-mark__disc {
    background-color: var(--lotics-tone-emerald-strong);
    --lotics-icon-color: var(--lotics-tone-emerald-ink);
  }

  .lotics-diff-mark[data-kind="changed"] .lotics-diff-mark__disc {
    background-color: var(--lotics-tone-amber-strong);
    --lotics-icon-color: var(--lotics-tone-amber-ink);
  }

  .lotics-diff-mark[data-kind="removed"] .lotics-diff-mark__disc {
    background-color: var(--lotics-tone-red-strong);
    --lotics-icon-color: var(--lotics-tone-red-ink);
  }
}
