/* =============================================================================
   wgf-housing-hub.css - /housing/, the decor database hub (housing_hub_render.py).
   Owner ruling 2026-10-06 (Ready Check rc2): every card / panel / button / background
   is real Blizzard UI art, assembled like the client's NineSlice frames. No CSS-drawn
   frames, no gradients, no rounded boxes, no glows. What each piece wears:
     page bg   assets/ui/housing/room-floor.jpg (the client's house-layout floor
               planks) over a flat near-black canvas; the icon mosaic is off here
     catalog   assets/ui/housing/housing-wood-frame.png nine-slice (the in-game
               catalog frame) over housing-wood-frame-basic-background.png; title
               on wood-frame-gradient-header-bg.png
     rail      catalog-nav-bg-primary-2x (wood nav plank) + catalog-nav-top-corbels-2x;
               buttons = category-icons_<atlas>_{inactive,active,pressed}-2x, selected
               = catalog-active-nav-selected-bg-glow-2x behind the active art
     pager     the Game Menu red button: 128-redbutton-{left,right}-cap +
               _128-redbutton-center (pressed / disabled slices); hover and the
               current page = 128-redbutton-highlight laid over in screen blend
     tiles     catalog-list-item-{default,active,pressed}-2x, 1:1
     search    .wgf-input (AH inputfield 3-slice)   selects .wgf-dropdown__control
     buttons   .wgf-btn-red    other panels .wgf-window (UIFrameMetal + stone)
   ============================================================================= */

/* -- page background: the client's floor planks, not the CSS canvas gradient ------------ */
html body:has(.wgf-hh-catalog) { background: #0b0806; isolation: isolate; }
html body:has(.wgf-hh-catalog)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url(/assets/ui/housing/room-floor.jpg) center top / 512px 512px repeat;
  opacity: .32;
}

.wgf-hh-hero { margin-top: var(--space-3, 12px); }
.wgf-hh-hero.wgf-hh-wood { padding: 14px 18px 18px; }
.wgf-hh-hero .wgf-seo-sub { max-width: 70ch; }
.wgf-hh-hero .wgf-hh-cta { display: flex; flex-wrap: wrap; gap: var(--space-2, 8px); margin: var(--space-3, 12px) 0 0; }

.wgf-hh-win { margin: var(--space-5, 20px) 0; min-width: 0; max-width: 100%; }
.wgf-hh-win .wgf-window__body { min-width: 0; }
.wgf-hh-lead { margin: 0 0 var(--space-3, 12px); color: var(--wgf-text); line-height: 1.55; }
.wgf-hh-lead a, .wgf-hh-prose a, .wgf-hh-table a { color: var(--wgf-link, #ffe375); }
.wgf-hh-muted { color: var(--wgf-muted); font-size: .9em; }
.wgf-hh-h3 {
  margin: var(--space-3, 12px) 0 var(--space-2, 8px);
  color: var(--wgf-gold);
  font-family: var(--font-game);
  font-size: var(--text-sm, .95rem);
  font-variant: small-caps;
  letter-spacing: .03em;
}

/* -- the Decor Catalog frame: the client's housing wood nine-slice ----------------------- */
.wgf-hh-catalog, .wgf-hh-wood {
  margin: var(--space-5, 20px) 0;
  min-width: 0;
  max-width: 100%;
  border: 19px solid transparent;
  border-image: url(/assets/ui/housing/housing-wood-frame.png) 40 / 19px stretch;
  background: url(/assets/ui/housing/housing-wood-frame-basic-background.png) left top / 64px 64px repeat #14100b;
  background-clip: padding-box;
  color: var(--wgf-text);
}
.wgf-hh-catalog__title {
  margin: -4px 0 0;
  padding: 8px 12px 16px;
  background: url(/assets/ui/housing/wood-frame-gradient-header-bg.png) center bottom / min(437px, 100%) 84px no-repeat;
  color: var(--wgf-gold, #ffd100);
  font-family: var(--font-game);
  font-size: var(--text-md, 1.1rem);
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: .03em;
  text-align: center;
  text-shadow: var(--text-ink-outline);
}
.wgf-hh-catalog__body { padding: 10px 12px 12px 0; min-width: 0; }

.wgf-hh-cat {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: var(--space-4, 16px);
  align-items: start;
}

/* the rail: wood nav plank + top corbels, the client's round category buttons */
.wgf-hh-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 30px 0 14px;
  background: url(/assets/ui/housing/catalog-nav-bg-primary-2x.png) left top / 78px auto repeat-y;
}
.wgf-hh-rail__corbels {
  position: absolute;
  top: 0;
  left: 0;
  width: 78px;
  height: 32px;
  background: url(/assets/ui/housing/catalog-nav-top-corbels-2x.png) center top / 78px 32px no-repeat;
}
.wgf-hh-railbtn {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 60px;
  color: var(--wgf-gold, #ffd100);
  font-family: var(--font-game);
  font-size: var(--text-sm, .95rem);
  text-decoration: none;
  text-shadow: var(--text-ink-outline);
}
.wgf-hh-railbtn__ico {
  position: relative;
  justify-self: center;
  width: 52px;
  height: 52px;
  background: var(--hh-ico, none) center / contain no-repeat;
}
.wgf-hh-railbtn__ico::after {          /* the active art, stacked so hover never flashes */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hh-ico-on, none) center / contain no-repeat;
  opacity: 0;
}
.wgf-hh-railbtn:hover .wgf-hh-railbtn__ico::after,
.wgf-hh-railbtn:focus-visible .wgf-hh-railbtn__ico::after,
.wgf-hh-railbtn.is-selected .wgf-hh-railbtn__ico::after { opacity: 1; }
.wgf-hh-railbtn:active .wgf-hh-railbtn__ico::after { background-image: var(--hh-ico-down, none); opacity: 1; }
.wgf-hh-railbtn.is-selected .wgf-hh-railbtn__ico::before {   /* the client's selected-nav glow */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 92px;
  transform: translate(-50%, -50%);
  background: url(/assets/ui/housing/catalog-active-nav-selected-bg-glow-2x.png) center / 100% 100% no-repeat;
}
.wgf-hh-railbtn__name { padding-left: 8px; font-variant: small-caps; letter-spacing: .02em; }
.wgf-hh-railbtn__n { padding-left: 6px; color: var(--wgf-muted); font-size: var(--text-xs, .8rem); }
.wgf-hh-railbtn:hover .wgf-hh-railbtn__name,
.wgf-hh-railbtn.is-selected .wgf-hh-railbtn__name { color: #fff; }
.wgf-hh-railbtn:focus-visible { outline: none; }
.wgf-hh-railbtn:focus-visible .wgf-hh-railbtn__name { text-decoration: underline; }
.wgf-hh-main { min-width: 0; }

/* -- the pager: the Game Menu red button, page numbers in gold Friz ---------------------- */
.wgf-hh-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; }
.wgf-hh-pager__pages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wgf-hh-pager__gap { padding: 0 2px; color: var(--wgf-gold, #ffd100); font-family: var(--font-game); }
.wgf-hh-pgbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-width: 46px;
  padding: 0 14px;                  /* == the 56px source cap rendered at 32px tall */
  background:
    url(/assets/ui/128-redbutton-left-cap.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center.png) left center / auto 100% repeat-x content-box;
  color: var(--wgf-gold, #ffd100);
  font-family: var(--font-game);
  font-size: var(--text-sm, .95rem);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-shadow: var(--text-ink-outline);
  isolation: isolate;
}
.wgf-hh-pgbtn--end { min-width: 72px; }
.wgf-hh-pgbtn::after {              /* the client's red highlight, additive like in game */
  content: "";
  position: absolute;
  inset: 0;
  background: url(/assets/ui/128-redbutton-highlight.png) center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}
.wgf-hh-pgbtn:hover::after, .wgf-hh-pgbtn:focus-visible::after { opacity: 1; }
.wgf-hh-pgbtn:hover, .wgf-hh-pgbtn:focus-visible { color: #fff; outline: none; }
.wgf-hh-pgbtn:active, .wgf-hh-pgbtn.is-current {
  background:
    url(/assets/ui/128-redbutton-left-cap-pressed.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap-pressed.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center-pressed.png) left center / auto 100% repeat-x content-box;
}
.wgf-hh-pgbtn.is-current { padding-top: 2px; color: #fff; cursor: default; }
.wgf-hh-pgbtn.is-current::after { opacity: 1; }
.wgf-hh-pgbtn.is-disabled {
  background:
    url(/assets/ui/128-redbutton-left-cap-disabled.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap-disabled.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center-disabled.png) left center / auto 100% repeat-x content-box;
  color: var(--wgf-gold-dim, #8a7a3a);
  cursor: default;
}
.wgf-hh-pgbtn.is-disabled::after { display: none; }
.wgf-hh-credit { margin: 10px 0 0; color: var(--wgf-muted); font-size: .75rem; }

/* search + facet selects */
.wgf-hh-filters { display: grid; gap: var(--space-3, 12px); margin: 0 0 var(--space-3, 12px); }
.wgf-hh-search .wgf-input { width: 100%; }
.wgf-hh-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-2, 8px) var(--space-3, 12px);
}
.wgf-hh-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wgf-hh-field__label {
  color: var(--wgf-gold-muted, var(--wgf-gold));
  font-family: var(--font-game);
  font-size: var(--text-xs, .8rem);
  font-variant: small-caps;
  letter-spacing: .03em;
}
select.wgf-hh-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
select.wgf-hh-select option { background: var(--wgf-panel-2, #16171b); color: var(--wgf-text); }
.wgf-hh-actions { display: flex; flex-wrap: wrap; gap: var(--space-2, 8px); align-items: center; }

.wgf-hh-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 var(--space-2, 8px); }
.wgf-hh-chips > span { color: var(--wgf-muted); font-size: var(--text-xs, .8rem); }
.wgf-hh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 12px;
  background: url(/assets/ui/auctionhouse-nav-button-secondary.png) center / 100% 100% no-repeat;
  background-color: var(--wgf-panel-2);
  color: var(--wgf-gold-muted, var(--wgf-gold));
  font-family: var(--font-game);
  font-size: var(--text-xs, .8rem);
  font-weight: 700;
  text-decoration: none;
  text-shadow: var(--text-ink-outline);
}
.wgf-hh-chip:hover, .wgf-hh-chip:focus-visible {
  background-image: url(/assets/ui/auctionhouse-nav-button-secondary-highlight.png);
  color: var(--wgf-gold-bright);
}
.wgf-hh-chip__n { color: var(--wgf-muted); font-weight: 400; }
.wgf-hh-count { margin: 0 0 var(--space-2, 8px); color: var(--wgf-gold); font-family: var(--font-game); }
.wgf-hh-empty { color: var(--wgf-text); }

/* -- decor tiles: the client's catalog list item, 1:1 ----------------------------------- */
.wgf-hh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px 8px;
  margin: var(--space-2, 8px) 0;
}
.wgf-hh-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--wgf-text);
  text-align: center;
  text-decoration: none;
}
.wgf-hh-tile__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 192 / 196;
  padding: 12%;
  box-sizing: border-box;
  background: url(/assets/ui/housing/catalog-list-item-default-2x.png) center / 100% 100% no-repeat;
}
.wgf-hh-tile:hover .wgf-hh-tile__frame,
.wgf-hh-tile:focus-visible .wgf-hh-tile__frame {
  background-image: url(/assets/ui/housing/catalog-list-item-active-2x.png);
}
.wgf-hh-tile:active .wgf-hh-tile__frame {
  background-image: url(/assets/ui/housing/catalog-list-item-pressed-2x.png);
}
.wgf-hh-tile:focus-visible { outline: none; }
.wgf-hh-tile:focus-visible .wgf-hh-tile__frame { box-shadow: var(--focus-ring); }
.wgf-hh-tile__art { width: 100%; height: 100%; object-fit: contain; }
.wgf-hh-tile__icon { width: 48px; height: 48px; border-radius: 4px; }
.wgf-hh-tile__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  font-size: var(--text-xs, .8rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.wgf-hh-tile:hover .wgf-hh-tile__name { color: var(--wgf-gold-bright); }
.wgf-hh-tile__meta { color: var(--wgf-muted); font-size: .7rem; }
.wgf-hh-tile__price { font-size: .75rem; }

/* -- how to unlock ---------------------------------------------------------------------- */
.wgf-hh-srcs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-2, 8px);
}
.wgf-hh-src { display: flex; flex-direction: column; gap: 4px; }
.wgf-hh-src__main { display: flex; flex-direction: column; text-decoration: none; }
.wgf-hh-src__n { color: var(--wgf-gold-bright); font-family: var(--font-game); font-size: 1.5rem; font-weight: 700; }
.wgf-hh-src__label { color: var(--wgf-text); }
.wgf-hh-src__main:hover .wgf-hh-src__label { color: var(--wgf-gold-bright); }
.wgf-hh-src__guide { color: var(--wgf-link, #ffe375); font-size: var(--text-xs, .8rem); }

/* -- cheapest crafted table ---------------------------------------------------------------- */
.wgf-hh-tablewrap { position: relative; overflow-x: auto; max-width: 100%; }
.wgf-hh-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.wgf-hh-table th, .wgf-hh-table td {
  padding: 6px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--wgf-border-neutral-soft);
}
.wgf-hh-table thead th {
  color: var(--wgf-gold);
  font-family: var(--font-game);
  font-variant: small-caps;
  white-space: nowrap;
}
.wgf-hh-table tbody tr:nth-child(even) { background: url(/assets/ui/auctionhouse-rowstripe-2.png) center / 100% 100%; }
.wgf-hh-table tbody th { font-weight: 400; }
.wgf-hh-rowlink { display: inline-flex; align-items: center; gap: 8px; color: var(--wgf-text); }
.wgf-hh-rowicon { width: 28px; height: 28px; object-fit: contain; flex: 0 0 auto; }

/* -- popular ----------------------------------------------------------------------------- */
.wgf-hh-pop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wgf-hh-pop a { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--wgf-text); text-decoration: none; }
.wgf-hh-pop a:hover span { color: var(--wgf-gold-bright); }

.wgf-hh-prose p { margin: 0 0 var(--space-3, 12px); color: var(--wgf-text); line-height: 1.6; max-width: 75ch; }

/* -- mobile: one column, 16px gutters, nothing wider than the viewport -------------------- */
@media (max-width: 760px) {
  .wgf-hh-cat { grid-template-columns: minmax(0, 1fr); }
  .wgf-hh-catalog, .wgf-hh-wood { border-width: 14px; border-image-width: 14px; }
  .wgf-hh-catalog__body { padding: 8px 0 4px; }
  /* the plank cannot rotate 1:1, so on a phone the client buttons sit in a grid on the
     catalog's own wood background: icon over name over count */
  .wgf-hh-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 4px;
    padding: 0;
    background: none;
  }
  .wgf-hh-rail__corbels { display: none; }
  .wgf-hh-railbtn {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    min-height: 0;
    text-align: center;
    font-size: var(--text-xs, .8rem);
  }
  .wgf-hh-railbtn__ico { width: 46px; height: 46px; }
  .wgf-hh-railbtn.is-selected .wgf-hh-railbtn__ico::before { display: none; }  /* the glow is cut for the plank */
  .wgf-hh-railbtn__name, .wgf-hh-railbtn__n { padding: 0; }
  .wgf-hh-pager, .wgf-hh-pager__pages { gap: 4px; }
  .wgf-hh-pgbtn { min-width: 36px; padding: 0 12px; height: 30px; }
  .wgf-hh-pgbtn--end { min-width: 54px; }
  .wgf-hh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wgf-hh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 6px; }
  .wgf-hh-win .wgf-window__body { padding: var(--space-3, 12px); }
  .wgf-hh-table th:nth-child(2), .wgf-hh-table td:nth-child(2),
  .wgf-hh-table th:nth-child(5), .wgf-hh-table td:nth-child(5) { display: none; }
  .wgf-hh-table th, .wgf-hh-table td { padding: 6px; }
}
@media (max-width: 420px) {
  .wgf-hh-srcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wgf-hh-pop { grid-template-columns: minmax(0, 1fr); }
}

/* -- the long-form hub guide the shell appends (.wgf-hub-guide, not this module's markup):
   on /housing/ it sits in the same client wood frame, never as bare text on the floor -- */
html body:has(.wgf-hh-catalog) .wgf-hub-guide {
  box-sizing: border-box;
  max-width: 100%;
  margin: var(--space-5, 20px) 0;
  padding: 8px 20px 14px;
  border: 19px solid transparent;
  border-image: url(/assets/ui/housing/housing-wood-frame.png) 40 / 19px stretch;
  background: url(/assets/ui/housing/housing-wood-frame-basic-background.png) left top / 64px 64px repeat #14100b;
  background-clip: padding-box;
}
@media (max-width: 760px) {
  html body:has(.wgf-hh-catalog) .wgf-hub-guide { padding: 4px 8px 10px; border-width: 14px; border-image-width: 14px; }
}

/* -- related: client red buttons, no cards -------------------------------------------- */
.wgf-hh-rels { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; margin: 0; padding: 0; list-style: none; }
.wgf-hh-rel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wgf-hh-rel__blurb { color: var(--wgf-muted); font-size: var(--text-xs, .8rem); }
html body:has(.wgf-hh-catalog) .wgf-hub-guide__toc { border: 0; border-radius: 0; padding-left: 0; }
