/* wgf-spell-extras.css - Spell facts, How to learn it, Spell sounds (spell_extras_render.py).
   -------------------------------------------------------------------------------
   Real client art only: each fact is a spellbook entry, the icon sitting in the
   client's spellbook icon frame (assets/ui/spellbook-item-iconframe.png, 138x131,
   window 78x78 at 42,19) over the spellbook list backplate. Colour from
   static/css/_tokens.css; no hex, no gradients, no green chrome. */

.wgf-sx-book {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
  margin: 0 0 var(--space-2, 8px);
}

.wgf-sx-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 2px 10px 2px 0;
  position: relative;
}
/* The client tints this glow down under each entry; full strength it reads as a smear. */
.wgf-sx-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/assets/ui/spellbook-list-backplate.png) left center / 100% 100% no-repeat;
  opacity: 0.14;
  pointer-events: none;
}

/* The frame box keeps the art's 138:131 ratio; the icon fills the art's window. */
.wgf-sx-frame {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 68px;
}
.wgf-sx-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/assets/ui/spellbook-item-iconframe.png) center / 100% 100% no-repeat;
}
.wgf-sx-frame img {
  position: absolute;
  left: 30.4%;
  top: 14.5%;
  width: 56.6%;
  height: 59.6%;
  display: block;
}

.wgf-sx-entry__text {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wgf-sx-entry__k {
  font-family: var(--font-game, serif);
  color: var(--wgf-gold);
  font-size: var(--text-xs, 0.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wgf-sx-entry__v {
  color: var(--wgf-text);
  font-size: var(--text-md, 1.05rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.wgf-sx-entry--id .wgf-sx-entry__v { color: var(--wgf-muted); font-variant-numeric: tabular-nums; }

/* ---- How to learn it ---- */
.wgf-sx-book--learn { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.wgf-sx-sides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-3, 16px);
}
.wgf-sx-side__h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-2, 8px) 0;
  font-family: var(--font-game, serif);
  color: var(--wgf-gold);
  font-size: var(--text-md, 1.05rem);
}
.wgf-sx-side__h img { border: 1px solid var(--wgf-metal); }
.wgf-sx-npc { display: block; color: var(--wgf-text); }
.wgf-sx-npc__title { display: block; color: var(--wgf-muted); font-size: var(--text-xs, 0.75rem); }
.wgf-sx-cap {
  margin-left: 4px;
  padding: 0 6px;
  border: 1px solid var(--wgf-metal);
  color: var(--wgf-gold);
  font-size: var(--text-xs, 0.75rem);
}
.wgf-sx-coord { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--wgf-gold); }

.wgf-sx-more { margin: 6px 0 0; }
.wgf-sx-more summary {
  cursor: pointer;
  color: var(--wgf-gold);
  font-size: var(--text-sm, 0.875rem);
  padding: 6px 0;
}

/* ---- Spell sounds ---- */
/* The rows are the archive's own (sound_browse_render.file_row), so they sit inside its
   .snd-page scope for the player tokens; the page-width rules are switched off here. */
.wgf-sx-sndwrap.snd-page { max-width: none; margin: 0; padding: 0; }
.wgf-sx-kit { margin: 0 0 var(--space-3, 16px); }
.wgf-sx-kit__h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  font-family: var(--font-game, serif);
  font-size: var(--text-md, 1.05rem);
}
.wgf-sx-kit__h a { color: var(--wgf-gold); }
.wgf-sx-kit__id { color: var(--wgf-muted); font-size: var(--text-xs, 0.75rem); font-family: inherit; }

@media (max-width: 520px) {
  .wgf-sx-book { grid-template-columns: 1fr; }
  .wgf-sx-sides { grid-template-columns: 1fr; }
}

/* ---- Comments: one outbound link (owner 2026-10-09) ---- */
.wgf-window .wgf-comments-elsewhere { margin: var(--space-2, 8px) 0; font-size: var(--text-md, 1.05rem); }
.wgf-window .wgf-comments-outbound { color: var(--wgf-gold); }

/* ---- "WoW Forever: what our data shows" (spell_forever) ----
   wgf-world.css owns these rows elsewhere but is not linked on spell pages, so the label and
   value ran together ("Sighted in the beta clientBuild 1.60.1"). Same two-column row here. */
.wgf-window .wgf-world-facts { display: grid; gap: 0; margin: 0 0 var(--space-2, 8px); }
.wgf-window .wgf-world-facts__row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) 3fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--wgf-border-neutral, var(--wgf-metal));
}
.wgf-window .wgf-world-facts__label {
  font-family: var(--font-game, serif);
  color: var(--wgf-gold);
  font-size: var(--text-sm, 0.875rem);
}
.wgf-window .wgf-world-facts__value { color: var(--wgf-text); }
@media (max-width: 520px) {
  .wgf-window .wgf-world-facts__row { grid-template-columns: 1fr; gap: 2px; }
}
/* The screen-reader suffix on the link; its usual home (the comments sheet) is not on this page. */
.wgf-window .wgf-comments-elsewhere .wgf-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- Icon downloads (owner 2026-10-09: every icon on the page downloads) ---- */
a.wgf-sx-frame { display: block; }
a.wgf-sx-frame:hover::after, a.wgf-sx-frame:focus-visible::after { filter: brightness(1.25); }
.wgf-sx-side__dl { display: inline-flex; }

/* the spell's own icon: every size we host */
.wgf-icodl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: var(--space-2, 8px) 0 0;
  font-size: var(--text-xs, 0.75rem);
}
.wgf-icodl-row [data-l]::before { content: attr(data-l); }
.wgf-icodl-row__k { color: var(--wgf-muted); margin-right: 2px; }
.wgf-icodl-row__a,
.wgf-icodl-row__page {
  padding: 2px 8px;
  border: 1px solid var(--wgf-metal);
  background: var(--wgf-bg-2);
  color: var(--wgf-gold);
  text-decoration: none;
}
.wgf-icodl-row__a:hover, .wgf-icodl-row__page:hover { border-color: var(--wgf-gold); }
.wgf-icodl-row__page { color: var(--wgf-text); }

/* cohort tiles are links themselves, so the download is a corner button beside the link */
.wgf-spd-tilebox { position: relative; display: flex; }
.wgf-spd-tilebox > .wgf-spd-tile { flex: 1 1 auto; min-width: 0; padding-right: 32px; }
.wgf-icodl {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--wgf-metal);
  background: var(--wgf-bg-2);
  color: var(--wgf-gold);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  opacity: 0.55;
}
.wgf-spd-tilebox:hover .wgf-icodl, .wgf-icodl:focus-visible { opacity: 1; border-color: var(--wgf-gold); }
