/* =========================================================
   CFE Icons — base class.
   Color inherits from parent text color via stroke="currentColor".
   Never hardcode a stroke or fill on the SVG itself.
   ========================================================= */
.cfe-ic {
  display: inline-block;
  vertical-align: -0.125em; /* optical baseline against adjacent text */
  flex-shrink: 0;
  /* width / height come from the size attr or inline style set by cfe_icon() */
}

/* Defensive default: SVGs emitted without explicit width/height attrs (e.g. via
   the bbcf JS cfeIcon() helper) would otherwise render at the browser default
   replaced-element size (300x150) and blow out layouts. Collapse to 1em. */
.cfe-ic:not([width]):not([height]) {
  width: 1em;
  height: 1em;
}

/* Mirror the legacy bb-icon "_before" margin convention: when the icon sits
   before its label in BB nav items, add the trailing space the font glyphs
   used to ship. The font built this margin into its character box; sprite
   SVGs need it explicit. */
.cfe-ic._before {
  margin-right: 0.5em;
}

/* Optical-weight normalization for icons whose strokes fill the 24x24 canvas
   more than the average glyph in this set. They render at identical pixel
   dimensions as the others, but read as visually larger in tight rails like
   the BB profile sidebar. Shrink them ~12% around the canvas center. */
.cfe-ic use[href="#cfe-graduation-cap"],
.cfe-ic use[href="#cfe-receipt"],
.cfe-ic use[href="#cfe-settings"] {
  transform: scale(0.88);
  transform-origin: 12px 12px;
}

/* Match font-icon sizing when a sprite SVG carries BuddyBoss's ._mi menu-icon
   class. Mirrors theme.css `.menu-item i._mi` (which only targets <i>/<img>),
   so SVGs in nav rails like /profile/ render at 18px instead of inherited 1em. */
svg.cfe-ic._mi {
  width: 18px;
  height: 18px;
  margin-top: -0.265em;
  vertical-align: middle;
}
