/* ============================================================
   chip.css — the chip family
   ============================================================
   Small, non-clickable pills that name something — a skill, a
   category. One shared shape, two standalone variants:
     .chip--outline  line only, for dark surfaces (the project hero)
     .chip--subtle   quiet grey fill, for light surfaces (cards)
   The label above a heading (.label-text--badge, headings.css) is
   deliberately NOT a chip: its soft corners keep it from reading as
   a button.
   Conventions: _shared/bricks-builder/css-conventions.md

   Contents
     1. Row of chips
     2. Shared shape
     3. Variants

   Last updated: 2026-10-12 (auto-stamped by the pre-commit hook)
   ============================================================ */


/* --- 1. Row of chips ------------------------------------------ */

.chip-list {
    display: flex;
    flex-direction: row;   /* Bricks blocks default to column — force row */
    flex-wrap: wrap;
    gap: var(--space-2xs);
}

/* No chips (e.g. a project without kompetence terms) → hide the row,
   so it adds no blank gap step. Checks for a chip, not for emptiness:
   the {projekt_kompetence_pills} carrier span stays in the row even
   when a post has no terms. */
.chip-list:not(:has(:is(.chip--outline, .chip--subtle))) {
    display: none;
}


/* --- 2. Shared shape ------------------------------------------ */

/* Vertical padding in em keeps the pill slim next to its own text;
   the spacing scale's smallest step made it near-circular. */
:is(.chip--outline, .chip--subtle) {
    inline-size: fit-content;   /* shrink to content — a loop wrapper is a full-width block */
    padding: 0.35em var(--space-xs);
    border-radius: var(--radius-full);
    font-size: var(--text-s);
}


/* --- 3. Variants ---------------------------------------------- */

.chip--outline {
    border: var(--border-width-thin) solid var(--border-subtle);
    color: var(--text-on-dark);
}

.chip--subtle {
    background-color: var(--surface-subtle);
    font-size: var(--text-xs);
    color: var(--text-base);
}
