/* static/css/icons.css — base contract for the Lucide icon helper.
   Inherit color, align to the text baseline, never shrink. vertical-align
   matches FA's inline behaviour so swapping <i> → <svg> does not shift a
   single baseline (zero CLS). */

/* Base — applies to every <svg class="lc …"> emitted by window.icon(). */

/* B21 s3 (CODE-13): this sheet is the `components` cascade layer; the order is declared once, in tokens.css. */
@layer components {

.lc {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.125em;
    stroke-width: var(--_lc-stroke, var(--icon-stroke));
}

/* One stroke for every size since B2: Atelier draws Lucide at 2.0 to match
   Figtree's heavier type (--icon-stroke, tokens.css). A per-size override
   stays possible through --_lc-stroke on the element. */
.lc-xs, .lc-sm, .lc-md, .lc-lg, .lc-xl { --_lc-stroke: var(--icon-stroke); }

/* UX-B16 s1 — the sprite. The chat page's glyphs are <use href="#lc-NAME">
   of one <svg id="lc-sprite"> (partials/_lucide.html's lucide_sprite), so
   the paint a symbol's paths inherit comes from the <svg class="lc"> around
   the <use>: the same values the full-path form carries as attributes, at
   :where() specificity (0), so any rule that recoloured a glyph before still
   wins. The sprite itself takes no room and is never read. */
:where(svg.lc) {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lc-sprite {
    position: absolute;
    inline-size: 0;
    block-size: 0;
    overflow: hidden;
}

/* A glyph that leads a label ("[+] Create share link"): the space the
   Font Awesome <i> got from a margin. Inline-end, so it follows direction. */
.lc-lead { margin-inline-end: 0.5em; }

/* RTL: single mirror rule; the helper decides which icons carry .lc-mirror.
   No call site ever deals with direction. */
[dir="rtl"] .lc-mirror { transform: scaleX(-1); }

/* Spin utility — Lucide ships no animation; replaces fa-spin. */
@keyframes lcSpin { to { transform: rotate(360deg); } }
.icon-spin {
    animation: lcSpin 1s linear infinite;
    transform-origin: 50% 50%;
}
@media (prefers-reduced-motion: reduce) {
    .icon-spin { animation: none; }
}

/* Composite stack (e.g. store + slash for "store-slash"). The base sits
   inline; the overlay is absolutely positioned to strike through. */
.lc-stack { position: relative; display: inline-flex; align-items: center; }
.lc-stack .lc-stack-overlay {
    position: absolute; inset: 0; margin: auto;
    stroke-width: var(--_lc-stroke, 1.5);
}

/* B21 s3 (UX-B16S1-NEW-008, UX-B16S2-NEW-001): the Lucide twins that stood here
   for rules in other sheets are folded into those sheets, each after the rule
   it restates; this sheet is the icon helper's base contract only. */

} /* end @layer components */
