/* NO raw hex/rgba/rem values — use var(--token) from base/variables.css */
/* ========================================
   ICONS
   ======================================== */

/* An icon from the registry (static/icons/lucide.svg, written by
   templates/partials/_icon.html): a square the size of the text around it, so
   the font size of the element holding it sizes it as it sized the glyph it
   replaced, drawn in that element's text colour (each symbol strokes in
   currentColor). */
.icon {
  display: inline-block;
  flex: 0 0 auto;
  inline-size: var(--size-icon-text);
  block-size: var(--size-icon-text);
  vertical-align: middle;
}

/* A status message's mark (static/js/ui/live_region.js): the icon of its type
   before its words, with no text between them -- the region's text is the
   words alone -- so the gap is here. */
[data-live-mark] > .icon {
  margin-inline-end: var(--spacing-xs);
}

/* An icon that turns while its work runs: the element holding it carries
   .icon-turning -- the wizard's running step, a Domain Knowledge card's line
   while its sources are fetched -- one turn per --duration-spin-slow. */
@keyframes icon-turn {
  to { transform: rotate(var(--rotate-full)); }
}

.icon-turning > .icon {
  animation: icon-turn var(--duration-spin-slow) linear infinite;
}

/* Asked for less motion, the icon stands still: still shown, the words beside
   it saying the work runs (WCAG 2.2 SC 2.3.3; owner popup "Add it now",
   2026-11-26). */
@media (prefers-reduced-motion: reduce) {
  .icon-turning > .icon {
    animation: none;
  }
}
