/* wgf-factions - the reputation FAMILY sheet (/factions/ index + the blocks the
   2026-09-03 Blizzard-asset pass added to /faction/<slug>-<id>/).

   assets/wgf-faction.css stays what it was: the detail page's original crest, data
   grids and quest list. This sheet carries only what that pass introduced, so neither
   file mixes two jobs:

     .wgf-fct-art          the index header band - one extracted loading screen
     .wgf-fct-crestframe   the crest seated in the client's round metal item ring
     .wgf-fct-standing--*  the standing ladder in the reputation bar's own colours

   Kit first: the frame itself is .wgf-qborder from assets/wgf-chrome.css (the real
   auctionhouse-itemicon-border nine-slice), the cards are .wgf-ag-card, the wells and
   striped rows are the wgf-chrome control roster. Nothing here re-themes anything.

   Palette: docs/ui-ux/17-blizzard-palette.md tokens. Slate plate, bronze rule, gold
   text, no gradients, no glows, radius 0 on data surfaces. The only greens are the
   reputation-standing words below, which are Blizzard semantics on the green-purge
   keep-list, carrying the SAME values the collection journal already serves
   (assets/wgf-collection-journal.css .wgf-jrnl__standing--*) - one vocabulary, not a
   second palette.
   ========================================================================= */

/* -----------------------------------------------------------------------------
   The index header art. A real extracted loading screen (assets/loading-screens/),
   resolved by wgf_zonebg and CREDITED by wgf_zonebg.wallpaper_strip_html at the foot
   of the page - this rule only frames it. Fixed aspect so the band never reflows the
   grid while the image decodes; no art resolved means faction_render emits nothing
   and this rule never applies.
   --------------------------------------------------------------------------- */
.wgf-fct-art {
  margin: 0 0 var(--space-4);
  border: 1px solid var(--wgf-metal);
  background: var(--wgf-well);
  overflow: hidden;
}

.wgf-fct-art__img {
  display: block;
  width: 100%;
  height: clamp(120px, 22vw, 260px);
  object-fit: cover;
  object-position: center 38%;
}

.wgf-fct-art__cap {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--wgf-metal);
  background: var(--wgf-panel-1);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--wgf-muted);
}

/* -----------------------------------------------------------------------------
   The crest ring. .wgf-qborder supplies the metal frame texture and sizes itself to
   its own background; these rules only seat it inline with the title and stop it
   collapsing when the page is narrow.
   --------------------------------------------------------------------------- */
.wgf-fct-crestframe {
  flex: 0 0 auto;
  align-self: center;
}

.wgf-fct-crestframe .wgf-qborder__icon {
  display: block;
}

/* .wgf-qborder is a fixed 44px ring holding a 32px icon (wgf-chrome.css). These are the
   two other sizes this family needs; the ring art is background-size 100% 100%, so it
   scales cleanly with the box. */
.wgf-fct-crestframe--sm { width: 28px; height: 28px; }
.wgf-fct-crestframe--sm .wgf-qborder__icon { width: 20px; height: 20px; }

.wgf-fct-crestframe--lg { width: 56px; height: 56px; }
.wgf-fct-crestframe--lg .wgf-qborder__icon { width: 40px; height: 40px; }

/* The expansion crest sits beside the reputation crest in the hero, one size down:
   it labels the era, it is not the page's identity. */
.wgf-fct-seal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--wgf-muted);
}

.wgf-fct-seal__label { letter-spacing: .02em; }

/* -----------------------------------------------------------------------------
   Standing colours. The in-game reputation bar paints each rank; these are the same
   words and the same values the collection journal serves, so a reader who has seen
   one has seen both. Applied only to a recognised client standing (faction_read
   .standing_slug returns '' otherwise), never to an invented rank.
   --------------------------------------------------------------------------- */
.wgf-fct-standing { font-weight: 700; }
.wgf-fct-standing--exalted    { color: var(--q-heirloom); }
.wgf-fct-standing--revered    { color: var(--q-uncommon); }
.wgf-fct-standing--honored    { color: #6fd66f; }
.wgf-fct-standing--friendly   { color: #b7d99a; }
.wgf-fct-standing--neutral    { color: var(--wgf-gold-muted); }
.wgf-fct-standing--unfriendly,
.wgf-fct-standing--hostile,
.wgf-fct-standing--hated      { color: var(--wgf-down); }

/* The row a character actually starts on keeps the gold marker wgf-faction.css sets,
   so the start marker still reads over the standing colour. */
.wgf-fct-grid__rows .is-start .wgf-fct-standing { color: var(--wgf-gold-bright); }

/* -----------------------------------------------------------------------------
   Items the reputation's own quests pay out. Each <li> holds one item_link, which
   already carries its icon (.wgf-icon, sized by wgf-item-tooltip.css) and the
   data-wgf-item hover-card hook - this rule only lays the list out as slots.
   --------------------------------------------------------------------------- */
.wgf-fct-loot {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .wgf-fct-loot { grid-template-columns: 1fr 1fr; }
}

.wgf-fct-loot__item {
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--wgf-border-neutral-soft);
  background: var(--wgf-panel-1);
}

.wgf-fct-loot__item a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--wgf-gold-link);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wgf-fct-loot__item a:hover { text-decoration: underline; }

/* -----------------------------------------------------------------------------
   Index grid meta. The group label replaces the expansion enum, which Blizzard left
   at 0 on most reputations; it is quieter than the name it sits under.
   --------------------------------------------------------------------------- */
.wgf-ag-grid .wgf-ag-card__meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--wgf-muted);
}
