/* wgf-ag-card.css — M64: the Adventure-Guide tile card + grid (owner review 2026-07-03).
   The in-game Adventure Guide idiom: art-backed plate tiles in a uniform grid. Composed by
   every database hub (/classes/, /professions/, /zones/, /dungeons/, /mounts/, ...) through
   the shared hub seam. Art via --agc-art (a first-party image url, 11-blizzard-assets lanes);
   without art the tile falls back to the plate gradient (honest, never broken).
   Tokens only; states: default / hover / focus; reduced-motion respected. */

.wgf-ag-grid {
  display: grid;
  /* auto-fit (not -fill): a 3-card section stretches to fill the row instead of
     clustering left beside phantom empty tracks (owner spacing review 2026-07-03) */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}

.wgf-ag-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 96px;
  border: 1px solid var(--wgf-border-neutral);
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--wgf-text);
  background:
    linear-gradient(180deg, rgba(0,0,0,.20) 0%, rgba(0,0,0,.62) 78%, rgba(0,0,0,.78) 100%),
    var(--agc-art, linear-gradient(180deg, var(--wgf-panel-2), var(--wgf-panel-1)));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.06);
  transition: border-color var(--motion-fast) var(--ease-standard);
}
.wgf-ag-card:hover, .wgf-ag-card:focus-visible {
  border-color: rgba(var(--wgf-gold-rgb), .55);
}
.wgf-ag-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.wgf-ag-card__body {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
}

/* entity icon — always present on a listed entity (doctrine); quality/gold ring */
.wgf-ag-card__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--wgf-gold-rgb), .45);
  border-radius: 3px;
  background: #000;
  object-fit: cover;
}

.wgf-ag-card__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: .04em;
  color: var(--wgf-gold-bright);
  text-shadow: var(--text-ink-outline); /* Tier-3: display text on art */
  line-height: 1.2;
}
.wgf-ag-card__meta {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--wgf-muted);
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

/* compact list variant for dense hubs (currencies, reputations rows) */
.wgf-ag-card--row { min-height: 56px; align-items: center; }
.wgf-ag-card--row .wgf-ag-card__icon { width: 28px; height: 28px; }

/* Render-cost containment (2026-07-04 mobile pass): the big hubs SSR thousands of cards
   (transmog-sets ~4.7k, battle pets ~2.8k, mounts ~3.2k) and phones choked on the initial
   layout/paint. content-visibility skips rendering off-screen cards entirely; the
   intrinsic-size placeholder keeps the scrollbar honest ('auto' pins the real size once a
   card has rendered). Content is untouched - every card is still in the HTML for crawlers
   and find-in-page. */
.wgf-ag-grid .wgf-ag-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 96px;
}

/* A-Z jump strip (wgf-az-jump.js injects it above any 200+-card grid). Quiet chips in
   the inline-filter family look; disabled letters = no entries (honest, not hidden). */
.wgf-az {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-2) 0;
}
.wgf-az__btn {
  min-width: 30px;
  height: 30px;
  padding: 0 var(--space-1);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--wgf-muted);
  background: var(--wgf-bg-2);
  border: 1px solid var(--wgf-metal);
  border-radius: 0;
  cursor: pointer;
}
.wgf-az__btn:hover:not(:disabled) { color: var(--wgf-gold-bright); border-color: rgba(var(--wgf-gold-rgb), .5); }
.wgf-az__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.wgf-az__btn:disabled { opacity: 0.32; cursor: default; }

@media (max-width: 560px) {
  .wgf-ag-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .wgf-ag-card { min-height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .wgf-ag-card { transition: none; }
  .wgf-ag-card:hover { transform: none; }
}
