/* wgf-listview: the one Wowhead-style listview (wgf_listview.py). Tokens: --wh-*. Measured spec:
   header row 30px, data rows 53px (68px phone), 44px icon, name coloured by quality, 50 per page. */
.wlv { background: var(--wh-panel, #202020); border-radius: var(--wh-radius, 4px); margin: 8px 0 16px; max-width: 100%; min-width: 0; }
.wlv-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding: 8px 10px; font-size: var(--wh-fs-sm, 12px); color: var(--wh-muted, #888); }
.wlv-count { color: var(--wh-text, #bbb); }
.wlv-pager { display: flex; flex-wrap: wrap; gap: 4px; }
.wlv-pg { padding: 3px 9px; border-radius: var(--wh-radius, 4px); background: var(--wh-bar, #181818); color: var(--wh-link, #ffd100); text-decoration: none; white-space: nowrap; }
a.wlv-pg:hover { background: var(--wh-raise, #2a2a2a); }
.wlv-pg--off { color: var(--wh-muted, #888); opacity: .55; }
.wlv-note { margin: 0; padding: 0 10px 8px; font-size: var(--wh-fs-sm, 12px); color: var(--wh-muted, #888); }
.wlv-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* wide screens: clip instead of scroll so the sticky header sticks to the viewport (a scroll container would trap it) */
@media (min-width: 1100px) { .wlv-scroll { overflow-x: clip; } }
.wlv-table { width: 100%; border-collapse: collapse; border: 0; font-size: var(--wh-fs, 14px); }
.wlv-th { position: sticky; top: 0; z-index: 2; height: 32px; padding: 0 10px; text-align: left; white-space: nowrap; font-size: var(--wh-fs-sm, 12px); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--wh-muted, #888); background: var(--wh-bar, #181818);
  border-bottom: 1px solid var(--wh-border, #303030); }
.wlv-th a { color: inherit; text-decoration: none; display: inline-block; }
.wlv-th[data-sort] a::after { content: "\2195"; margin-left: 5px; font-size: 10px; opacity: .45; }
.wlv-th.is-sorted a::after { content: none; }
.wlv-th.is-sorted { box-shadow: inset 0 -2px 0 var(--wh-accent, #ffd100); }
.wlv-th.is-sorted .wlv-arrow { color: var(--wh-accent, #ffd100); }
.wlv-th a:hover, .wlv-th.is-sorted a { color: var(--wh-heading, #fff); }
.wlv-arrow { font-size: 10px; margin-left: 5px; }
.wlv-td { height: 48px; padding: 5px 10px; border-top: 1px solid var(--wh-bar, #181818); vertical-align: middle; color: var(--wh-text, #bbb); }
.wlv-table tbody tr:first-child .wlv-td { border-top: 0; }
.wlv-table tbody tr:nth-child(even) .wlv-td { background: rgba(255,255,255,.03); }
.wlv-tr:hover .wlv-td, .wlv-table tbody tr.wlv-tr:nth-child(even):hover .wlv-td { background: var(--wh-raise, #2a2a2a); }
.wlv-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wlv-td .wgf-price { white-space: nowrap; }
.wlv-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wlv-name-text { display: flex; flex-direction: column; min-width: 0; }
.wlv-icon { width: 36px; height: 36px; flex: none; box-sizing: border-box; border-radius: 3px; background: var(--wh-bar, #181818); border: 1px solid #4a4a4a; }
.wlv-iq-poor { border-color: #9d9d9d; } .wlv-iq-common { border-color: #cfcfcf; } .wlv-iq-uncommon { border-color: #1eff00; }
.wlv-iq-rare { border-color: #0070dd; } .wlv-iq-epic { border-color: #a335ee; } .wlv-iq-legendary { border-color: #ff8000; }
.wlv-iq-artifact { border-color: #e6cc80; } .wlv-iq-heirloom { border-color: #00ccff; }
.wlv-q { font-weight: 600; text-decoration: none; color: var(--wh-link, #ffd100); }
a.wlv-q:hover { text-decoration: underline; }
.wlv-q-poor { color: #9d9d9d; } .wlv-q-common { color: #fff; } .wlv-q-uncommon { color: #1eff00; }
.wlv-q-rare { color: #0070dd; } .wlv-q-epic { color: #a335ee; } .wlv-q-legendary { color: #ff8000; }
.wlv-q-artifact { color: #e6cc80; } .wlv-q-heirloom { color: #00ccff; }
.wlv-sub { font-size: var(--wh-fs-sm, 12px); color: var(--wh-muted, #888); }
.wlv-empty { padding: 28px 12px; text-align: center; color: var(--wh-muted, #888); }
.wlv-empty-msg { margin: 0 0 6px; color: var(--wh-text, #bbb); }
.wlv-empty-hint { display: block; font-size: var(--wh-fs-sm, 12px); }
.wlv-perpage { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.wlv-perpage-l { margin-right: 4px; }
.wlv-pp { padding: 2px 7px; border-radius: var(--wh-radius, 4px); background: var(--wh-bar, #181818); color: var(--wh-link, #ffd100); text-decoration: none; }
.wlv-pp.is-on { color: var(--wh-heading, #fff); box-shadow: inset 0 0 0 1px var(--wh-border, #303030); }
/* tabs: 50px strip */
.wlv-tabs { background: var(--wh-bar, #181818); overflow-x: auto; }
.wlv-tabs ul { display: flex; margin: 0; padding: 0; list-style: none; min-height: 50px; }
.wlv-tab { display: flex; align-items: center; height: 50px; padding: 0 16px; white-space: nowrap; color: var(--wh-text, #bbb);
  text-decoration: none; border-bottom: 3px solid transparent; }
.wlv-tab:hover { color: var(--wh-heading, #fff); }
.wlv-tab.is-active { color: var(--wh-accent, #ffd100); border-bottom-color: var(--wh-accent, #ffd100); }
.wlv-tab-n { margin-left: 5px; color: var(--wh-muted, #888); }
.wlv-pane-h { font-size: var(--wh-fs, 14px); margin: 12px 10px 0; color: var(--wh-heading, #fff); }
.wlv-tabbed.wlv-js .wlv-pane-h { display: none; }
.wlv-tabbed.wlv-js .wlv-pane { display: none; }
.wlv-tabbed.wlv-js .wlv-pane.is-active { display: block; }
/* filter form: compact grid */
.wlv-filter { background: var(--wh-bar, #181818); border: 1px solid var(--wh-border, #303030); border-radius: var(--wh-radius, 4px);
  padding: 10px; margin: 8px 0; max-width: 100%; box-sizing: border-box; }
.wlv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 8px 12px; align-items: end; }
.wlv-f { display: flex; flex-direction: column; gap: 3px; font-size: var(--wh-fs-sm, 12px); min-width: 0; }
.wlv-f--wide { grid-column: span 2; }
.wlv-f-l { color: var(--wh-muted, #888); text-transform: uppercase; letter-spacing: .05em; }
.wlv-f input[type=search], .wlv-f input[type=number], .wlv-f select { min-height: 30px; box-sizing: border-box; width: 100%; padding: 0 8px;
  background: var(--wh-panel, #202020); color: var(--wh-text, #bbb); border: 1px solid var(--wh-border, #303030); border-radius: var(--wh-radius, 4px); }
.wlv-f-pair { display: flex; align-items: center; gap: 6px; }
.wlv-f--check { flex-direction: row; align-items: center; gap: 6px; }
.wlv-more { margin-top: 8px; }
.wlv-more summary { cursor: pointer; color: var(--wh-link, #ffd100); font-size: var(--wh-fs-sm, 12px); margin-bottom: 8px; }
.wlv-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.wlv-reset { color: var(--wh-muted, #888); font-size: var(--wh-fs-sm, 12px); }
/* browse-by tiles above a hub listview (forever_db_browse/hub_tiles.py) */
.wlv-tiles { margin: 10px 0 14px; max-width: 100%; }
.wlv-tiles-h { margin: 0 0 6px; font-size: var(--wh-fs-sm, 12px); text-transform: uppercase; letter-spacing: .05em; color: var(--wh-muted, #888); }
.wlv-tiles ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.wlv-tile { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 10px; text-decoration: none; color: var(--wh-text, #bbb);
  background: var(--wh-panel, #202020); border: 1px solid var(--wh-border, #303030); border-left: 3px solid var(--wh-border, #303030); border-radius: var(--wh-radius, 4px); }
.wlv-tile:hover { background: var(--wh-raise, #2a2a2a); color: var(--wh-heading, #fff); }
.wlv-tile-i { width: 36px; height: 36px; flex: none; border-radius: 3px; border: 1px solid #4a4a4a; box-sizing: border-box; }
.wlv-tile-b { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wlv-tile-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlv-tile-s { font-size: var(--wh-fs-sm, 12px); color: var(--wh-muted, #888); }
.wlv-tile-n { font-variant-numeric: tabular-nums; color: var(--wh-muted, #888); }
.wlv-tile-q1 { border-left-color: #cfcfcf; } .wlv-tile-q2 { border-left-color: #1eff00; } .wlv-tile-q3 { border-left-color: #0070dd; }
.wlv-tile-q4 { border-left-color: #a335ee; } .wlv-tile-q5 { border-left-color: #ff8000; } .wlv-tile-q6 { border-left-color: #e6cc80; }
.wlv-tile-q2 .wlv-tile-t { color: #1eff00; } .wlv-tile-q3 .wlv-tile-t { color: #4a9bf0; } .wlv-tile-q4 .wlv-tile-t { color: #c47bf5; } .wlv-tile-q5 .wlv-tile-t { color: #ff8000; }
@media (max-width: 640px) { .wlv-tiles ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wlv-tiles li { min-width: 0; } .wlv-tile { padding: 6px 8px; } .wlv-tile-i { width: 28px; height: 28px; } }
/* phone: stacked cards, no horizontal scroll at all. The header strip becomes sort pills. */
@media (max-width: 640px) {
  .wlv-scroll { overflow-x: visible; }
  .wlv-table, .wlv-table tbody { display: block; width: 100%; }
  .wlv-table thead { display: block; }
  .wlv-table thead tr { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 6px 8px; background: var(--wh-bar, #181818); }
  .wlv-th { position: static; display: none; height: auto; padding: 4px 8px; border: 0; border-radius: var(--wh-radius, 4px); }
  .wlv-th[data-sort] { display: inline-block; background: var(--wh-panel, #202020); }
  .wlv-th.wlv-hide-phone[data-sort] { display: inline-block; }
  .wlv-th[data-sort]:first-child::before { content: "Sort"; margin-right: 6px; color: var(--wh-muted, #888); }
  .wlv-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; padding: 8px 10px;
    border-top: 1px solid var(--wh-bar, #181818); }
  .wlv-table tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
  .wlv-table tbody tr:nth-child(even) .wlv-td { background: none; }
  .wlv-td { display: block; height: auto; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; font-size: var(--wh-fs-sm, 12px); text-align: left; }
  .wlv-td:empty { display: none; }
  .wlv-td::before { content: attr(data-label) ": "; color: var(--wh-muted, #888); }
  .wlv-td.wlv-col-name, .wlv-td:first-child { grid-column: 1 / -1; font-size: var(--wh-fs, 14px); }
  .wlv-td.wlv-col-name::before, .wlv-td:first-child::before, .wlv-td.wlv-col-thumb::before { content: none; }
  .wlv-hide-phone.wlv-td { display: none; }
  .wlv-num { text-align: left; white-space: normal; }
  .wlv-f--wide { grid-column: auto; }
  .wlv-grid { grid-template-columns: 1fr 1fr; }
  .wlv-name-text { max-width: none; }
  .wlv-perpage { margin-left: 0; }
}
