/* wgf-nav-tiers.css - the tiered header (owner 2026-11-22: game versions as always-visible
 * tabs, big search beside the logo, sections on their own row, icon shortcuts on a version home).
 *
 * Loaded after wgf-nav.css and only re-lays-out what that sheet draws; markup: nav_header.py +
 * nav_gamebar.py. Desktop (>= 900px) rows:
 *   30px  game bar   home | Forever | Retail | Classic Era | TBC | Wrath | Mists ... utility links
 *   56px  identity   logo | search | Realm
 *   42px  sections   the ten menus (mega panels hang from the bottom of this row)
 *   30px  context    breadcrumb + version tag (unchanged)
 * The header scrolls with the page (as it does today). Phones keep the 52px row +
 * drawer + version dropdown from wgf-nav.css. Accent = a 2px line and a dot, never a fill.
 */

.wgf-n2__games { display: none; }

@media (min-width: 900px) {
  header.wgf-shell-topbar:has(.wgf-n2__games) > .wgf-shell-topbar__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 30px 56px 42px;
    grid-template-areas: "games games games" "logo search realm" "menu menu menu";
    height: auto; padding: 0; gap: 0; align-items: stretch;
  }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games),
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) > .wgf-n2__body { display: contents; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) > .wgf-n2__vsw { display: none; }

  /* row 1: game bar */
  .wgf-n2__games {
    grid-area: games; display: flex; align-items: stretch; min-width: 0; padding: 0 8px;
    background: #090a0e; border-bottom: 1px solid var(--n2-line, #3a3120);
  }
  .wgf-n2__ghome { display: flex; align-items: center; padding: 0 10px; color: var(--n2-muted, #a79b80); }
  .wgf-n2__ghome svg { width: 15px; height: 15px; }
  .wgf-n2__ghome:hover { color: #fff; }
  .wgf-n2__gtab {
    display: flex; align-items: center; gap: 7px; padding: 0 14px; white-space: nowrap;
    font: 600 12px/1 var(--font-game, 'FrizQuadrata', serif); letter-spacing: .09em; text-transform: uppercase;
    color: var(--n2-muted, #a79b80); border-top: 2px solid transparent;
  }
  .wgf-n2__gtab i { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--vc)); opacity: .75; }
  .wgf-n2__gtab:hover { color: #fff; background: rgba(255, 255, 255, .05); }
  .wgf-n2__gtab:hover i { opacity: 1; }
  .wgf-n2__gtab[aria-current] {
    color: #fff; background: linear-gradient(180deg, #232733, #171a21);
    border-top-color: rgb(var(--vc)); box-shadow: 1px 0 0 var(--n2-line, #3a3120), -1px 0 0 var(--n2-line, #3a3120);
  }
  .wgf-n2__gtab[aria-current] i { opacity: 1; box-shadow: 0 0 8px rgb(var(--vc)); }
  .wgf-n2__gutil { display: flex; align-items: center; gap: 18px; margin-left: auto; padding: 0 10px; font-size: 13px; color: var(--n2-faint, #6f6858); white-space: nowrap; }
  .wgf-n2__gutil a:hover { color: var(--n2-gold-b, #ffe375); }

  /* row 2: logo | search | realm */
  header.wgf-shell-topbar:has(.wgf-n2__games) .wgf-shell-logo {
    grid-area: logo; align-self: center; margin: 0 22px 0 18px; font-size: 24px; gap: 10px;
  }
  header.wgf-shell-topbar:has(.wgf-n2__games) .wgf-logo-coin { width: 32px; height: 32px; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__search {
    grid-area: search; align-self: center; flex: none; min-width: 0; margin: 0; max-width: 920px; width: 100%;
  }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__sbox { height: 40px; flex: 1 1 auto; min-width: 0; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__kbd { margin-right: 46px; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__realm { grid-area: realm; margin: 0 8px 0 16px; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__realm .wgf-realm-btn { border-left: 0; }

  /* row 3: the sections */
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__menu {
    grid-area: menu; height: 42px; margin: 0; padding: 0 8px;
    border-top: 1px solid var(--n2-line, #3a3120); background: rgba(0, 0, 0, .22);
  }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__t {
    height: 41px; padding: 0 16px; font-size: 13px; letter-spacing: .09em; text-transform: uppercase;
  }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__item[data-sec="games"] { margin-left: auto; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__item[data-sec="games"] > .wgf-n2__t {
    height: 28px; margin: 6px 6px 0 6px; padding: 0 13px;
  }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__mega { top: 128px; max-height: calc(100vh - 150px); }
}

@media (min-width: 900px) and (max-width: 1279px) {
  header.wgf-shell-topbar:has(.wgf-n2__games) .wgf-shell-logo { font-size: 22px; gap: 9px; margin: 0 16px 0 14px; }
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__t { padding: 0 11px; font-size: 12px; }
  .wgf-n2__gtab { padding: 0 10px; }
}
@media (min-width: 900px) and (max-width: 1049px) {
  header.wgf-shell-topbar .wgf-n2:has(.wgf-n2__games) .wgf-n2__t { padding: 0 7px; letter-spacing: .05em; }
  .wgf-n2__gutil { display: none; }
}

/* ---- version-home shortcut tiles (all widths) ---------------------------------------------- */
.wgf-n2__tiles {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px;
  padding: 30px 16px 12px; background: linear-gradient(180deg, #0c0d12, #101218);
  border-top: 1px solid var(--wgf-metal-soft, #3a3120);
}
.wgf-n2__tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.wgf-n2__tart {
  display: flex; justify-content: center; align-items: flex-end; width: 100%; height: 44px;
  background: linear-gradient(180deg, #1c1f27, #13151b);
  border: 1px solid var(--wgf-metal-soft, #3a3120); border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 2px 6px rgba(0, 0, 0, .5);
}
.wgf-n2__tart img {
  width: 48px; height: 48px; margin-bottom: 8px; border-radius: 4px;
  border: 1px solid var(--wgf-gold-dim, #8a7440); box-shadow: 0 4px 10px rgba(0, 0, 0, .7);
  transition: transform .12s ease;
}
.wgf-n2__tile b {
  font: 600 12px/1.2 var(--font-game, 'FrizQuadrata', serif); letter-spacing: .1em; text-transform: uppercase;
  color: var(--wgf-text, #f4ecd8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.wgf-n2__tile:hover .wgf-n2__tart, .wgf-n2__tile:focus-visible .wgf-n2__tart { border-color: rgb(var(--vc)); background: linear-gradient(180deg, #262a35, #181b22); }
.wgf-n2__tile:hover img { transform: translateY(-3px); }
.wgf-n2__tile:hover b { color: var(--wgf-gold-bright, #ffe375); }
.wgf-n2__tile:focus-visible { outline: 2px solid var(--wgf-gold-bright, #ffe375); outline-offset: 3px; }

@media (max-width: 899px) {
  .wgf-n2__tiles {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 24px 12px 10px;
    scroll-snap-type: x proximity;
  }
  .wgf-n2__tiles::-webkit-scrollbar { display: none; }
  .wgf-n2__tile { flex: 0 0 104px; scroll-snap-align: start; }
  .wgf-n2__tile b { font-size: 11px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  .wgf-n2__tart img { transition: none; }
}
