/* wgf-spells-index.css - the /spells/ surface (spells_index_app + spells_index_render).
 *
 * Art: the client's own spellbook nine-slices, verified on disk 2026-09-03:
 *   /assets/ui/spellbook-item-iconframe.png   the round spell-slot frame
 *   /assets/ui/spellbook-item-backplate.png   the slot backplate
 *   /assets/ui/spellbook-divider.png          the page rule between entries
 * Colour: palette tokens only (docs/ui-ux/17-blizzard-palette.md) - near-black slate,
 * bronze/gold edges, gold headings, parchment text. The ONLY green here is
 * --q-uncommon on an uncommon ITEM name, which is Blizzard's own semantic.
 * No gradients, no glows, no green chrome, no third-party art.
 * Type: var(--font-game) is the client's FrizQuadrata (@font-face in static/css/_tokens.css). */

/* ── header art strip ─────────────────────────────────────────────────────────────── */
.wgf-spx-art {
  margin: var(--space-3) 0 var(--space-4);
  border: 1px solid var(--wgf-metal, #6e5a2a);
  border-radius: var(--radius-card, 5px);
  background: var(--wgf-well, #08090c);
  overflow: hidden;
}
.wgf-spx-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  object-position: center 38%;
}
.wgf-spx-art__cap {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--wgf-metal-soft, #3a3120);
  color: var(--wgf-neutral-text, #9b9384);
  font-size: .8rem;
}

/* ── identity block ───────────────────────────────────────────────────────────────── */
.wgf-spx-id {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-3);
}
.wgf-spx-id__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wgf-spx-id__name {
  font-family: var(--font-game, 'FrizQuadrata', 'Cinzel', serif);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--wgf-gold-primary, #ffd100);
}
.wgf-spx-id__cat {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wgf-neutral-text, #9b9384);
}

/* ── facts strip ──────────────────────────────────────────────────────────────────── */
.wgf-spx-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}
.wgf-spx-fact {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--wgf-border, rgba(255, 209, 0, .2));
  border-radius: var(--radius-control, 4px);
  background: var(--wgf-panel-1, #14161c);
}
.wgf-spx-fact__k {
  display: block;
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--wgf-neutral-text, #9b9384);
}
.wgf-spx-fact__v {
  display: block;
  margin-top: 2px;
  font-family: var(--font-game, 'FrizQuadrata', 'Cinzel', serif);
  font-size: 1.05rem;
  color: var(--wgf-text, #f4ecd8);
}

/* ── the spell list (the in-game spellbook page) ──────────────────────────────────── */
.wgf-spx-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  border: 1px solid var(--wgf-metal, #6e5a2a);
  border-radius: var(--radius-card, 5px);
  background: var(--wgf-well, #08090c);
}
.wgf-spx-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--wgf-border-neutral-soft, #202229);
  /* the big skill lines render ~900 rows: skip off-screen paint like the card grids do */
  content-visibility: auto;
  contain-intrinsic-size: auto 76px;
}
.wgf-spx-row:last-child { border-bottom: 0; }
.wgf-spx-row:hover { background: var(--wgf-panel-1, #14161c); }

/* The client's spell-slot frame, seated on its backplate. Both are round, so the icon is
   masked round too - a square icon inside the ring reads as a disc bleeding out. */
.wgf-spx-frame {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-image: url(/assets/ui/spellbook-item-iconframe.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.wgf-spx-frame__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}
.wgf-spx-frame--empty {
  background-image: url(/assets/ui/spellbook-item-backplate.png);
  opacity: .55;
}

.wgf-spx-row__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wgf-spx-row__name {
  font-family: var(--font-game, 'FrizQuadrata', 'Cinzel', serif);
  font-size: 1.02rem;
  color: var(--wgf-gold-link, #ffe375);
  text-decoration: none;
}
.wgf-spx-row__name:hover { color: var(--wgf-gold-hover, #e8b923); text-decoration: underline; }
.wgf-spx-row__meta {
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--wgf-neutral-text, #9b9384);
}
.wgf-spx-row__desc {
  color: var(--wgf-text, #f4ecd8);
  font-size: .9rem;
  line-height: 1.45;
}
.wgf-spx-row__makes,
.wgf-spx-row__reagents {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-top: 2px;
}
.wgf-spx-lab {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wgf-neutral-text, #9b9384);
}
.wgf-spx-reagent { display: inline-flex; align-items: center; gap: 3px; }
.wgf-spx-qty { font-size: .78rem; color: var(--wgf-muted, #b3a88f); }

/* Item chips: the icon comes from seo_links.item_link (<img class="wgf-icon">). */
.wgf-spx-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 6px 1px 3px;
  border: 1px solid var(--wgf-border-neutral, #2e313a);
  border-radius: var(--radius-control, 4px);
  background: var(--wgf-panel-1, #14161c);
  font-size: .86rem;
  text-decoration: none;
}
.wgf-spx-chip:hover { border-color: var(--wgf-gold-accent, #b7912f); }
.wgf-spx-chip img { width: 18px; height: 18px; border-radius: 2px; background: #000; }

/* Item quality - the client's scale, tokens in static/css/_tokens.css. */
.wgf-spx-q0 { color: var(--q-poor, #9d9d9d); }
.wgf-spx-q1 { color: var(--q-common, #ffffff); }
.wgf-spx-q2 { color: var(--q-uncommon, #1eff00); }
.wgf-spx-q3 { color: var(--q-rare, #0070dd); }
.wgf-spx-q4 { color: var(--q-epic, #a335ee); }
.wgf-spx-q5 { color: var(--q-legendary, #ff8000); }
.wgf-spx-q6 { color: var(--q-artifact, #e6cc80); }
.wgf-spx-q7 { color: var(--q-heirloom, #00ccff); }

/* The client's spellbook page rule, between the list and what follows it. */
.wgf-spx-rule {
  height: 8px;
  margin: var(--space-4) 0;
  border: 0;
  background: url(/assets/ui/spellbook-divider.png) center / contain no-repeat;
}

@media (max-width: 640px) {
  .wgf-spx-art img { max-height: 170px; }
  .wgf-spx-id__name { font-size: 1.25rem; }
  .wgf-spx-row { padding: var(--space-2); gap: var(--space-2); }
}
