/* wgf-detail-layout.css - the shared detail-page layout (wgf_detail_layout.py) and the Related
   tab strip (wgf_related_tabs.related_strip). Numbers are the measured Wowhead values in
   _design_ref/WOWHEAD_PARITY_SPEC.md 6.1. Tokens: the --wh-* set from static/css/_tokens.css. */

/* One column for every detail page = the hub column (spec: 1400 on hubs, 1760 on detail).
   The 1760 widening comes from :has() rules in wgf-pagedepth / wgf-pagetext / wgf-item-hub;
   the extra `body` makes this win regardless of sheet order. */
body .wgf-shell-main:has(.wgf-dl) { max-width: var(--wh-maxw, 1400px); }
.wgf-dl { max-width: var(--wh-maxw, 1400px); margin-inline: auto; }

/* Grid: main + Quick Facts column. 980px matches wgf-seo-pages.css so the ad rail
   (display:none below 980) and this layout flip together. */
@media (min-width: 980px) {
  .wgf-dl.wgf-seo-layout { grid-template-columns: minmax(0, 1fr) 336px; }
  .wgf-dl.wgf-seo-layout--full { grid-template-columns: minmax(0, 1fr); }
}

/* ---- title row ---- */
.wgf-dl__notice { margin: 0 0 12px; padding: 12px 16px; border-radius: var(--wh-radius, 4px);
  background: rgba(255,255,255,.05); color: var(--wh-text, #bbb); font-size: var(--wh-fs, 14px); }
.wgf-dl__titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 0 0 12px; min-height: 48px; }
.wgf-dl__titles { flex: 1 1 280px; min-width: 0; }
.wgf-dl__h1 { margin: 0; font-family: var(--wh-font, "Open Sans", Arial, sans-serif);
  font-size: var(--wh-h1, 38px); line-height: var(--wh-h1-lh, 48px); font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--wh-heading, #fff); overflow-wrap: anywhere; }
.wgf-dl__sub { margin: 2px 0 0; color: var(--wh-muted, #888); font-size: var(--wh-fs, 14px); line-height: 1.4; }
.wgf-dl__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.wgf-dl__btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: var(--wh-radius, 4px); background: var(--wh-raise, #2a2a2a);
  border: 1px solid var(--wh-border, #303030); color: var(--wh-text, #bbb);
  font-size: var(--wh-fs-sm, 12px); text-decoration: none; }
.wgf-dl__btn:hover { color: var(--wh-heading, #fff); border-color: var(--wh-accent, #ffd100); }

/* ---- lead: tooltip block (320) + media slot ---- */
.wgf-dl__lead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin: 0 0 16px; }
.wgf-dl__tooltip { display: flex; align-items: flex-start; gap: 12px; flex: 0 1 auto; max-width: 100%; }
.wgf-dl__tt { width: 320px; max-width: 100%; box-sizing: border-box; min-width: 0; }
.wgf-dl__tt .wgf-vitem-tt, .wgf-dl__tt .wgf-iig-tip { max-width: none; width: 100%; box-sizing: border-box; }
.wgf-dl__media { flex: 0 1 488px; max-width: 100%; min-width: 0; }
.wgf-dl__media img, .wgf-dl__media canvas, .wgf-dl__media iframe { max-width: 100%; height: auto; }
.wgf-dl__cap { margin: 4px 0 0; color: var(--wh-muted, #888); font-size: var(--wh-fs-sm, 12px); }
.wgf-dl__body { margin: 0 0 16px; color: var(--wh-text, #bbb); font-size: var(--wh-fs, 14px); line-height: 1.5; }

/* ---- section headings: Wowhead 21px sections, 28px Related band ---- */
.wgf-dl__h2 { margin: 0 0 8px; font-size: 21px; line-height: 32px; font-weight: 600;
  color: var(--wh-heading, #fff); text-transform: none; letter-spacing: 0; }
.wgf-dl__section { margin: 0 0 16px; }
.wgf-dl .wgf-seo-main .wgf-section > .section-heading { font-size: 21px; min-height: 40px; }

/* ---- Quick Facts ---- */
.wgf-dl__qf { background: var(--wh-panel, #202020); border-radius: var(--wh-radius, 4px);
  padding: 0 0 8px; box-sizing: border-box; min-width: 0; overflow: hidden; }
.wgf-dl__qfh { margin: 0; padding: 0 12px; min-height: 36px; display: flex; align-items: center;
  background: var(--wh-bar, #181818); font-size: 16px; font-weight: 600; color: var(--wh-heading, #fff);
  text-transform: none; letter-spacing: 0; }
.wgf-dl__facts { width: 100%; border-collapse: collapse; font-size: var(--wh-fs, 14px); }
.wgf-dl__facts th, .wgf-dl__facts td { padding: 5px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--wh-bg, #101010); line-height: 1.4; overflow-wrap: anywhere; }
.wgf-dl__facts th { width: 38%; color: var(--wh-muted, #888); font-weight: 400; }
.wgf-dl__facts td { color: var(--wh-text, #bbb); }

/* ---- Related strip ---- */
.wgf-rt { margin: 24px 0 16px; }
.wgf-rt__h { margin: 0 0 8px; font-size: 28px; line-height: 35px; font-weight: 600;
  color: var(--wh-heading, #fff); text-transform: none; letter-spacing: 0; }
.wgf-rt__tabs { display: flex; flex-wrap: nowrap; align-items: stretch; height: 50px; box-sizing: border-box;
  background: var(--wh-bar, #181818); border-radius: var(--wh-radius, 4px) var(--wh-radius, 4px) 0 0;
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.wgf-rt__tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 16px;
  color: var(--wh-text, #bbb); font-size: var(--wh-fs, 14px); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; box-sizing: border-box; }
.wgf-rt__tab:hover { color: var(--wh-heading, #fff); }
.wgf-rt__tab.is-active { color: var(--wh-heading, #fff); border-bottom-color: var(--wh-accent, #ffd100); background: var(--wh-panel, #202020); }
.wgf-rt__n { color: var(--wh-muted, #888); }
.wgf-rt__panels { background: var(--wh-panel, #202020); padding: 12px; border-radius: 0 0 var(--wh-radius, 4px) var(--wh-radius, 4px); min-width: 0; }
.wgf-rt__panel { min-width: 0; }
.wgf-rt__panel + .wgf-rt__panel { margin-top: 16px; }
.wgf-rt__panel .wgf-table-wrap { overflow-x: auto; }
/* No JS: panels stack, each under its own heading. JS on: heading hidden, one panel at a time. */
.wgf-rt__ph { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--wh-heading, #fff); }
.wgf-rt--js .wgf-rt__ph { display: none; }
.wgf-rt--js .wgf-rt__panel.is-hidden { display: none; }
.wgf-rt--js .wgf-rt__panel + .wgf-rt__panel { margin-top: 0; }

/* ---- phone: Quick Facts drops under the lead, no page-level overflow ---- */
@media (max-width: 979px) {
  .wgf-dl.wgf-seo-layout { display: flex; flex-direction: column; }
  .wgf-dl .wgf-dl__main { display: contents; }
  .wgf-dl .wgf-dl__notice, .wgf-dl .wgf-dl__titlerow { order: 0; }
  .wgf-dl .wgf-dl__lead { order: 1; }
  .wgf-dl .wgf-dl__aside { order: 2; margin: 0 0 16px; position: static; }
  .wgf-dl .wgf-dl__body { order: 3; }
  .wgf-dl .wgf-dl__related { order: 4; }
  .wgf-dl .wgf-dl__lower { order: 5; }
  .wgf-dl .wgf-dl__main > * { min-width: 0; max-width: 100%; }
}
@media (max-width: 640px) {
  .wgf-dl__h1 { font-size: var(--wh-h1-phone, 21px); line-height: var(--wh-h1-phone-lh, 28px); }
  .wgf-rt__h { font-size: 21px; line-height: 28px; }
  .wgf-dl__tooltip { flex-wrap: wrap; }
  .wgf-dl__media { flex-basis: 100%; }
  .wgf-dl__actions { margin-left: 0; }
}

/* The h1 inside an in-game window's title band (wgf_ingame_header.window_open) sits on the heading
   scale instead of inheriting the 16px band text: it is the module-h2 step, which fits the 42px band. */
.wgf-window__title .wgf-window__h1 { font-family: inherit; font-weight: inherit; font-size: var(--wh-h2, 21px); line-height: var(--wh-h1-phone-lh, 28px); }

/* The icon / art tile in the title row (item icon, dungeon Adventure Guide tile): 104px, 72px on a phone. */
.wgf-dl .wgf-dl__icon { width: 104px; height: auto; flex: 0 0 auto; border-radius: 3px; margin-right: 10px; }
@media (max-width: 640px) { .wgf-dl .wgf-dl__icon { width: 72px; } }
