/*
 * ONE mark, four kinds; the ink is meaning, not brand, so palette families that no theme moves
 * (theming.md §2.2). 700 on 100: 600-on-50 amber cleared 3:1 so narrowly that a dimmed row 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;
    /*
     * A stretching flex parent would widen the box to its column; `align-self` would also override
     * parents that centre it.
     */
    width: fit-content;
    gap: var(--lotics-space-6);
  }

  /* The smallest disc whose glyph is identifiable at a glance. */
  .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);
  }
}
