/* Status pills: a rating as a capsule with its glyph and its word, and the neutral workflow
   badges. Capsules are only for status; provenance is never a pill (see Provenance).
   Words wider than their whole column (a narrow one, or with spaced or enlarged text) wrap inside
   the pill, which grows taller (its fit-content min-height beats the set height) rather than
   sticking out of its card or the page (BLU-396). Next to other things, the pill doesn't shrink: they give
   way first, so its words stay on one line while they can. A Table keeps its pills on one line:
   the table scrolls inside its own region instead. */
.bc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  /* Text the person enlarged grows the pill rather than spilling out of it: 1lh is the line. */
  min-height: calc(1lh + 2 * var(--space-4));
  /* A label that wraps (a narrow column, spaced text) grows it to all its lines plus the same
     padding (fit-content counts the 1px borders), where calc-size() is supported; elsewhere the
     line above holds (BLU-396). */
  min-height: calc-size(fit-content, size + 2 * var(--space-4) - 2px);
  flex-shrink: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 8px 0 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.78125rem;
  line-height: 1.28;
  font-weight: 600;
  vertical-align: middle;
}

/* Ratings: a soft fill and the rating's ink. */
.bc-status-pill--meets { background: var(--meets-soft); color: var(--meets-ink); }
.bc-status-pill--partial { background: var(--partial-soft); color: var(--partial-ink); }
.bc-status-pill--gap { background: var(--gap-soft); color: var(--gap-ink); }
.bc-status-pill--na { background: var(--na-soft); color: var(--na-ink); }

/* Unknown is dashed: nothing has been seen yet. */
.bc-status-pill--unknown {
  background: var(--unknown-soft);
  border-style: dashed;
  border-color: var(--unknown);
  color: var(--unknown-ink);
}

/* Workflow stages: neutral, never green, never action. */
.bc-status-pill--workflow { background: var(--fill); color: var(--label-2); }
.bc-status-pill--needs-you { background: var(--fill); color: var(--label); }

/* A rating an AI proposed that no person has confirmed: dashed (not confirmed), no fill. It goes
   with a rating modifier; the AiMark sparkle follows the word, and the pill sits inside a
   bc-ai-dot that holds the note. A value the third party declared and nobody here confirmed is
   dashed the same way, with no sparkle (--declared), and its provenance caption follows it.
   Declared after the other variants so they win. */
.bc-status-pill--drafted,
.bc-status-pill--declared {
  background: transparent;
  border-style: dashed;
  border-color: currentColor;
}

.bc-status-pill__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: currentColor;
}

.bc-status-pill__icon { flex: 0 0 auto; display: block; }

/* Words for screen readers only, such as ", AI-assessed, not yet checked". */
.bc-status-pill__hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Forced colours (Windows contrast themes) drop fills, so a workflow pill's dot would vanish. (The
   capsule keeps its edge: the forced border colour replaces the transparent one, solid or dashed.)
   The dot is drawn as a border instead, in the pill's ink, so it takes CanvasText, and HighlightText
   inside a highlighted row. */
@media (forced-colors: active) {
  .bc-status-pill__dot {
    box-sizing: border-box;
    border: 3px solid;
  }
}
