/* Game District locker: the Inventory view (hub-inventory.js) and the loadout pictures (hub-locker.js: saved avatar looks,
 * whole-set art, the small "what this game has on" strip). Uses the hub theme tokens from hub-base.css only. */

/* ------------------------------------------------------------- inventory toolbar + filters */
.hub-inv { display: grid; gap: 12px; min-width: 0; }
.hub-inv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hub-inv-bar .hub-inv-search { flex: 1 1 260px; max-width: none; }
.hub-inv-sort { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); font-size: .84rem; }
.hub-inv-sort select, .hub-inv-row .hub-inv-setsel { min-height: 42px; width: auto; max-width: 100%; cursor: pointer;  justify-self: start; }
.hub-inv-row .hub-inv-setsel { min-width: min(100%, 260px); }
.hub-inv-state { flex: 0 1 auto; }
.hub-inv .hub-inv-state button { min-height: 42px; padding: 8px 12px; font-size: .84rem; }
.hub-inv-filters { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.hub-inv-filters:empty { display: none; }
.hub-inv-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.hub-inv-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; color: var(--muted); }
.hub-inv .hub-chips { flex-wrap: wrap; overflow: visible; padding-bottom: 0; min-width: 0; }
.hub-inv .hub-chip { padding: 5px 11px; font-size: .8rem; }
.hub-inv-gem { display: inline-block; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--rar-color, var(--muted)); }
.hub-inv-gem.dashboard-rarity--common { background: var(--rar-common, #a9a39a); }
.hub-inv-gem.dashboard-rarity--uncommon { background: var(--rar-uncommon, #6fd08c); }
.hub-inv-gem.dashboard-rarity--rare { background: var(--rar-rare, #5aa9ff); }
.hub-inv-gem.dashboard-rarity--epic { background: var(--rar-epic, #b98bff); }
.hub-inv-gem.dashboard-rarity--legendary { background: var(--rar-legendary, #ffb84d); }
.hub-inv-gem.dashboard-rarity--mythic { background: var(--rar-mythic, #ff6fa8); }
.hub-inv-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 2px; }
.hub-inv-active .hub-inv-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--gold); background: transparent; color: var(--text); font-weight: 800; font-size: .78rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-inv-active .hub-inv-pill:hover, .hub-inv-active .hub-inv-pill:focus-visible { background: var(--gold); color: var(--on-gold); }
.hub-inv-clear { margin-left: 4px; }
.hub-inv-count { color: var(--muted); font-size: .84rem; }
.hub-inv-count strong { font-weight: 800; }
.hub-inv-empty .hub-link { margin-left: 6px; }

/* ------------------------------------------------------------- item cards */
.hub-inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.hub-inv-card {
    position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; min-width: 0; padding: 8px 8px 10px;
    border-radius: 14px; border: 1px solid var(--line); background: var(--surface); border-top: 3px solid var(--rar-color, var(--line-2));
}
.hub-inv-card.dashboard-rarity--common { --rar-color: var(--rar-common); }
.hub-inv-card.dashboard-rarity--uncommon { --rar-color: var(--rar-uncommon); }
.hub-inv-card.dashboard-rarity--rare { --rar-color: var(--rar-rare); }
.hub-inv-card.dashboard-rarity--epic { --rar-color: var(--rar-epic); }
.hub-inv-card.dashboard-rarity--legendary { --rar-color: var(--rar-legendary); }
.hub-inv-card.dashboard-rarity--mythic { --rar-color: var(--rar-mythic); }
.hub-inv-card.is-equipped { border-color: var(--green); border-top-color: var(--rar-color, var(--green)); box-shadow: 0 0 0 1px var(--green) inset; }
.hub-inv-art {
    display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; padding: 0; border-radius: 10px; overflow: hidden;
    border: 0; background: var(--surface-3); cursor: var(--gcur-zoom, pointer);
}
.hub-inv-art > * { max-width: 100%; max-height: 100%; }
.hub-inv-art:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hub-inv-eq {
    position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
    background: var(--green); color: #0d1a10; font-size: .7rem; font-weight: 900; pointer-events: none;
}
.hub-inv-copy { display: grid; gap: 1px; min-width: 0; }
.hub-inv-copy strong { font-weight: 800; font-size: .9rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-inv-copy small { color: var(--muted); font-weight: 700; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-inv-tags { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 4px; min-width: 0; }
.hub-inv-card .hub-inv-set {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; padding: 2px 8px; border-radius: 999px;
    border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-size: .7rem; font-weight: 800; cursor: pointer;
}
.hub-inv-card .hub-inv-set span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-inv-card .hub-inv-set:hover, .hub-inv-card .hub-inv-set:focus-visible { border-color: var(--gold); color: var(--text); }
.hub-inv-acts { display: flex; gap: 6px; }
.hub-inv-acts .retro-button-secondary { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 6px 8px; font-size: .78rem; justify-content: center; }
.hub-inv-acts .retro-button-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Try on is an icon button next to Equip (its name is in aria-label and the tooltip), so Equip / Unequip never gets cut */
.hub-inv-acts .hub-inv-try { flex: 0 0 38px; padding: 6px 0; }
.hub-inv-acts .hub-inv-try .retro-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub-inv-acts .hub-inv-try .retro-button-icon { margin: 0; }
.hub-phone .hub-inv-acts .hub-inv-try { flex: 1 1 auto; }
.hub-phone .hub-inv-acts .hub-inv-try .retro-button-label { position: static; width: auto; height: auto; clip: auto; }

/* ------------------------------------------------------------- sets */
.hub-inv-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.hub-inv-setcard { display: grid; gap: 8px; min-width: 0; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.hub-inv-setcard.is-complete { border-color: var(--gold); }
.hub-inv-setcard.is-new .hub-setart { opacity: .7; }
.hub-inv-settop { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; }
.hub-inv-sethead { display: grid; gap: 4px; min-width: 0; }
.hub-inv-sethead strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-inv-sethead small { color: var(--muted); font-size: .74rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-inv-setn { color: var(--muted); font-weight: 800; font-size: .8rem; font-variant-numeric: tabular-nums; }
.hub-inv-setcard.is-complete .hub-inv-setn { color: var(--gold); }
.hub-inv-bar-track { display: block; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hub-inv-bar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.hub-inv-setacts { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.hub-inv-setacts .hub-link { margin-left: 0; padding: 4px 0; font-size: .82rem; }

/* ------------------------------------------------------------- set art (shared with Locker > Loadouts) */
.hub-setart { display: grid; width: 76px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #3b3172; flex: 0 0 auto; }
.hub-setart.is-look img, .hub-setart.is-look svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.hub-setart.is-grid { aspect-ratio: 1; background: var(--surface-3); gap: 2px; padding: 2px; grid-template-columns: 1fr 1fr; }
.hub-setart.is-grid.is-n1 { grid-template-columns: 1fr; }
.hub-setart.is-grid.is-n3 > :first-child { grid-row: span 2; }
.hub-setart-cell { display: grid; place-items: center; min-width: 0; min-height: 0; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.hub-setart-cell > * { max-width: 100%; max-height: 100%; }
.hub-setart-cell.is-missing { opacity: .4; filter: grayscale(.8); }
.hub-lk-set-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; }
.hub-lk-set-top .hub-setart { width: 64px; }

/* ------------------------------------------------------------- saved avatar looks in Locker > Loadouts */
.hub-lk-looks { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.hub-lk-looks h4 { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hub-lk-looks-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.hub-lk-looks-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.hub-lk-look { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 10px; align-items: center; min-width: 0; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.hub-lk-look.is-current { border-color: var(--green); }
.hub-lk-look-art { grid-row: span 2; display: block; width: 64px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #3b3172; }
.hub-lk-look-art img, .hub-lk-look-art svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.hub-lk-look-copy { display: grid; min-width: 0; }
.hub-lk-look-copy strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-lk-look-copy small { color: var(--muted); font-weight: 700; font-size: .76rem; }
.hub-lk-look-copy em { font-style: normal; color: var(--green); }
.hub-lk-look-acts { display: flex; gap: 6px; min-width: 0; }
.hub-lk-look .hub-lk-look-acts > * { flex: 1 1 0; min-width: 0; min-height: 34px; padding: 5px 8px; font-size: .78rem; justify-content: center; }
.hub-lk-look-acts [disabled] { cursor: default; opacity: .65; }

/* the small strip of what a game's loadout has on */
.hub-loadout-peek { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.hub-loadout-peek-cell { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); }
.hub-loadout-peek-cell > * { max-width: 100%; max-height: 100%; }
.hub-loadout-peek b { color: var(--muted); font-size: .76rem; font-weight: 900; padding-left: 2px; }

/* the Filters button: phones only, the filter panel folds away behind it there */
.hub-inv-bar .hub-inv-ftoggle { display: none; position: relative; min-height: 42px; }
.hub-inv-fcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--gold); color: var(--on-gold); font-size: .72rem; font-weight: 900; }
.hub-inv-fcount[hidden] { display: none; }
.hub-inv-activewrap:empty { display: none; }

/* ------------------------------------------------------------- phones */
@media (max-width: 640px) {
    .hub-inv-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .hub-inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .hub-inv-sort { flex: 1 1 auto; }
    .hub-inv-sort select { flex: 1 1 auto; }
    .hub-inv-state { flex: 1 1 100%; }
    .hub-loadout-peek-cell:nth-child(n+3) { display: none; }
}
.hub-phone .hub-inv-bar .hub-inv-search { flex-basis: 100%; }
.hub-phone .hub-inv-bar .hub-inv-ftoggle { display: inline-flex; flex: 0 0 auto; order: 2; }
.hub-phone .hub-inv-bar .hub-inv-state { order: 3; }
.hub-phone .hub-inv-filters:not(.is-open) { display: none; }
.hub-phone .hub-inv-sort { flex: 1 1 0; min-width: 0; order: 1; }
.hub-phone .hub-inv-sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub-phone .hub-inv-sort select { flex: 1 1 auto; min-width: 0; width: 100%; }
.hub-phone .hub-inv-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.hub-phone .hub-inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hub-phone .hub-inv-acts { flex-direction: column; }
.hub-phone .hub-inv-acts .retro-button-secondary, .hub-phone .hub-lk-look-acts > *, .hub-phone .hub-inv-state button, .hub-phone .hub-inv .hub-chip { min-height: 44px; }
.hub-phone .hub-inv-set, .hub-phone .hub-inv-pill { min-height: 32px; }
.hub-phone .hub-inv-setacts .hub-link { min-height: 44px; }
