/* wgf-tracked.css - the sitewide tracked-items star + /tracked/ page styles.
   Companion to assets/wgf-tracked.js (window.WGFTracked, which draws the star and
   the list) and assets/wgf-tracked-enrich.js (which hooks and quality-colours the
   rows that component drew).

   Design doctrine: 1:1 in-game chrome. The star is the real client favorite
   asset (assets/ui/auctionhouse-icon-favorite.png) with opacity states - the
   same .wgf-favbtn treatment wgf-chrome.css ships (single-homed there for the
   AH); restated on .wgf-trk-star so pages that load without the chrome kit
   still draw the correct star. Squared corners everywhere, no pills. */

/* ---- the star (fallback twin of .wgf-favbtn in wgf-chrome.css) --------------- */
.wgf-trk-star {
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: url(/assets/ui/auctionhouse-icon-favorite.png) center / contain no-repeat transparent;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 120ms ease, filter 120ms ease;
}
.wgf-trk-star:hover { opacity: 0.85; filter: brightness(1.1); }
.wgf-trk-star.is-tracked {
  opacity: 1;
  filter: brightness(1.15);
}
.wgf-trk-star:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 2px rgba(255, 227, 117, 0.7));
}
.wgf-trk-star.is-disabled { cursor: default; opacity: 0.15; }

@media (prefers-reduced-motion: reduce) {
  .wgf-trk-star { transition: none; }
}

/* ---- inline sign-in prompt (the comments-gate look, anchored to a star) ------
   Warband restyle 2026-08-05: the gate is a gold-trimmed dark well, the same
   panel language as the character-select screen's floating panels. */
.wgf-trk-gate {
  position: fixed;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 280px;
  max-width: calc(100vw - 16px);
  padding: 14px 12px;
  border: 1px solid var(--wgf-gold-dark, #4a3c1c);
  background: var(--wgf-well, #08090c);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 6px 18px rgba(0, 0, 0, 0.6);
}

.wgf-trk-gate__copy {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.5;
  color: var(--wgf-muted, #b3a88f);
}

.wgf-trk-gate__btn { text-decoration: none; }

/* ---- /tracked/ list (realm groups) -------------------------------------------
   Warband restyle 2026-08-05: the list wears the character-select screen's
   panel language wherever it mounts (/tracked/ page, /account/ window). Realm
   group headers are carved gold-trimmed plates, rows are dark warband plates
   that lift gold on hover, and the remove button is the client's own red X
   slice (128-redbutton-exit), never an invented glyph. All colors come from
   the token home in static/css/_tokens.css with literal fallbacks for any
   page that ships without it. */
.wgf-trk-group { margin-top: 14px; }

.wgf-trk-group__title {
  margin: 0 0 8px;
  padding: 5px 10px;
  font-family: var(--font-game, inherit);
  font-size: var(--text-sm, 13px);
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--wgf-gold, #ffd100);
  text-shadow: var(--text-ink-outline, 0 1px 2px rgba(0, 0, 0, 0.92));
  border: 1px solid var(--wgf-gold-dark, #4a3c1c);
  background: var(--wgf-panel, #14161c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wgf-trk-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wgf-trk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 4px;
  border: 1px solid var(--wgf-border-neutral, #2e313a);
  background: var(--wgf-bg-base, #0a0b0f);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}
.wgf-trk-row:hover {
  border-color: var(--wgf-gold-dark, #4a3c1c);
  background: var(--wgf-panel, #14161c);
}
.wgf-trk-row.is-going { opacity: 0.45; }
.wgf-trk-row.is-error { outline: 1px solid rgba(200, 60, 40, 0.7); }

/* The row icon sits in the client's own Auction House item frame
   (auctionhouse-itemicon-small-border.png, 32x32, transparent centre) instead of
   floating loose. border-image is the only way to frame it here: the icon <img>
   is emitted by assets/wgf-tracked.js with no wrapper element to hang
   .wgf-qborder on, and this sheet may not change that markup. 32px box, 4px
   frame, 24px of art - the same 24px the JS asks for. */
.wgf-trk-icon {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  display: block;
  border: 4px solid transparent;
  border-image: url(/assets/ui/auctionhouse-itemicon-small-border.png) 8 stretch;
  background-color: var(--wgf-bg-base, #0a0b0f);
}

.wgf-trk-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wgf-gold-bright, #ffe375);
  text-decoration: none;
}

.wgf-trk-when {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--wgf-muted, #b3a88f);
}

/* The remove control is the client's real red X (the .wgf-window__x /
   .wgf-iconbtn--x slice). The markup keeps its accessible times glyph and
   aria-label; the art paints over it (font-size 0 hides the text glyph). The
   hover/active rules restate the background so wgf-account.css's older flat
   red wash (same specificity, earlier in the cascade) never repaints it. */
.wgf-trk-drop {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: url(/assets/ui/128-redbutton-exit.png) center / contain no-repeat transparent;
  color: transparent;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transition: filter 120ms ease;
}
.wgf-trk-drop:hover {
  background: url(/assets/ui/128-redbutton-exit.png) center / contain no-repeat transparent;
  filter: brightness(1.15);
}
.wgf-trk-drop:active {
  background: url(/assets/ui/128-redbutton-exit-pressed.png) center / contain no-repeat transparent;
  filter: none;
}
.wgf-trk-drop:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 2px rgba(255, 227, 117, 0.7));
}

/* The /tracked/ page seats the list in a chrome-kit well; this modifier is the
   gold trim on that well (the markup hook lives in tracked_app.py only, so the
   /account/ mount is untouched by it). */
.wgf-trk-well { border-color: var(--wgf-gold-dark, #4a3c1c); }

@media (prefers-reduced-motion: reduce) {
  .wgf-trk-drop { transition: none; }
}


/* ---- /tracked/ page furniture (2026-09-03 Blizzard-asset pass) ---------------
   Markup home: tracked_render.py. Three pieces, all painted with committed
   first-party art and the in-game palette - no gradients, no glows, no green.

   Header: the real Auction House item header plate
   (auctionhouse-itemheaderframe.png, 684x144) stretched across the strip, with
   the client's favourite star (auctionhouse-icon-favorite.png, 40x36) as the
   page mark. The plate is decorative, so it is a background, not an <img>. */
.wgf-trk-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  margin: 0 0 14px;
  padding: 12px 16px;
  background: url(/assets/ui/auctionhouse-itemheaderframe.png) left center / 100% 100% no-repeat;
  background-color: var(--wgf-panel, #14161c);
}

.wgf-trk-h1 { margin: 0 0 10px; }

.wgf-trk-hd__mark {
  flex: 0 0 auto;
  display: block;
  width: 40px;
  height: 36px;
}

.wgf-trk-hd__sub {
  margin: 0;
  min-width: 0;
  font-size: 12.8px;
  line-height: 1.5;
  color: var(--wgf-text, #f4ecd8);
  text-shadow: var(--text-ink-outline, 0 1px 2px rgba(0, 0, 0, 0.92));
}

/* "How a watch works": three facts, each with a real assets/icons/ tile. */
.wgf-trk-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.wgf-trk-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--wgf-border-neutral, #2e313a);
  background: var(--wgf-bg-base, #0a0b0f);
}

.wgf-trk-step .wgf-ag-card__icon {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border: 1px solid var(--wgf-gold-dark, #4a3c1c);
}

.wgf-trk-step__t,
.wgf-trk-step__b { display: block; }

.wgf-trk-step__t {
  font-family: var(--font-game, inherit);
  font-size: var(--text-sm, 13px);
  font-weight: 700;
  color: var(--wgf-gold, #ffd100);
}

.wgf-trk-step__b {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--wgf-muted, #b3a88f);
}

/* The rail out. wgf-ag-card.css owns the tile; this only sets the grid density
   so short rows do not stretch to hub-tile height. */
.wgf-trk-rel .wgf-ag-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}


/* ---- /tracked/ header-lane pass (2026-09-03, hdr:tracked) --------------------
   Three additions, markup home tracked_render.py:
     .wgf-trk-why    the sign-in value case (the state most readers get)
     .wgf-trk-facts  the facts table, zebra-striped with the client's own
                     auctionhouse-rowstripe-1/2.png (the AH list stripe)
     .q-*            item quality on a drawn row, applied by
                     assets/wgf-tracked-enrich.js
   No gradients, no glows, and the only green anywhere below is --q2 #1eff00 on
   an UNCOMMON item, which docs/ui-ux/18-blizzard-asset-kit.md permits by name. */

/* The sign-in case sits inside the well, so its steps get a little more room
   than the plain three-step list and the button clears them. */
.wgf-trk-why { margin: 10px 0 12px; }

.wgf-trk-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--wgf-muted, #b3a88f);
}

/* The facts table. auctionhouse-rowstripe-1/2.png are the client's own 16x18
   list-stripe tiles (dimensions read from the PNG headers), so they REPEAT
   rather than stretch; the background-color under them is what shows on a host
   where the art has not been extracted. */
.wgf-trk-facts {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--wgf-border-neutral, #2e313a);
  font-size: 12.8px;
  line-height: 1.55;
}

.wgf-trk-facts__cap {
  caption-side: top;
  padding: 0 0 8px;
  text-align: left;
  font-size: 12px;
  color: var(--wgf-muted, #b3a88f);
}

.wgf-trk-facts tr {
  background: url(/assets/ui/auctionhouse-rowstripe-1.png) left top repeat;
  background-color: var(--wgf-bg-base, #0a0b0f);
}
.wgf-trk-facts tr:nth-child(even) {
  background: url(/assets/ui/auctionhouse-rowstripe-2.png) left top repeat;
  background-color: var(--wgf-panel, #14161c);
}

.wgf-trk-facts__k,
.wgf-trk-facts__v {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.55);
  text-align: left;
  vertical-align: top;
}

.wgf-trk-facts__k {
  width: 34%;
  min-width: 150px;
  font-family: var(--font-game, inherit);
  font-weight: 700;
  color: var(--wgf-gold, #ffd100);
}

.wgf-trk-facts__v { color: var(--wgf-text, #f4ecd8); }

@media (max-width: 520px) {
  /* Stack rather than squeeze: a 34% key column at 320px leaves the value
     column two words wide. */
  .wgf-trk-facts__k,
  .wgf-trk-facts__v { display: block; width: auto; }
  .wgf-trk-facts__k { padding-bottom: 0; border-bottom: 0; }
}

/* Item quality on a tracked row. The class comes from ah_quality (the one home
   for the ladder) via /api/account/saved-items and is applied by
   assets/wgf-tracked-enrich.js; a row whose quality datamine does not know keeps
   the default gold and no ring, because guessing "common" would be a lie. */
.wgf-trk-name.q-poor      { color: var(--q-poor, #9d9d9d); }
.wgf-trk-name.q-common    { color: var(--q-common, #ffffff); }
.wgf-trk-name.q-uncommon  { color: var(--q-uncommon, #1eff00); }
.wgf-trk-name.q-rare      { color: var(--q-rare, #0070dd); }
.wgf-trk-name.q-epic      { color: var(--q-epic, #a335ee); }
.wgf-trk-name.q-legendary { color: var(--q-legendary, #ff8000); }
.wgf-trk-name.q-artifact  { color: var(--q-artifact, #e6cc80); }
.wgf-trk-name.q-heirloom  { color: var(--q-heirloom, #00ccff); }

/* The icon keeps the square auctionhouse-itemicon-small-border.png frame at every
   quality, on purpose. The auctionhouse-itemicon-border-<quality>.png files are
   136x136 ROUND metal rings with a transparent centre, and wgf-chrome.css's
   .wgf-qborder documents the treatment they need: the ring paints as a
   background behind a ROUND icon inside a wrapper element. There is no wrapper
   here - assets/wgf-tracked.js emits a bare <img> - and forcing a round ring
   through border-image on a square 32px frame is the "silver disc bleeding out
   from behind the icon" the owner reported on 2026-08-02. Quality lives on the
   name, which is where the client's own auction list carries it. */
