/* ui-merchant.css - the vendor as the WoW merchant window. Art = assets/ui/merchant-*.png + bag-*.png (real Classic Era client textures, merchant-manifest.json).
   1 art pixel = var(--u); the whole window scales with the root font size set by js/ui/core.js. Positions are the client frame's own pixel coordinates. */
@property --u { syntax: "<length>"; inherits: true; initial-value: 1px; }   /* registered: .0625em resolves to px where it is declared, so buttons (own UA font size) share the unit */
.mf-stage, .bag-stage { --u: .0625em; position: relative; display: flex; gap: calc(18 * var(--u)); align-items: flex-start; justify-content: center; margin: auto; width: 100%; pointer-events: auto; }
.bag-stage { width: auto; --u: .09em; }
.mf-col { width: calc(384 * var(--u)); flex: none; }
.mframe { position: relative; width: calc(384 * var(--u)); height: calc(452 * var(--u)); }
.mf-art { position: absolute; inset: 0; background: url("../assets/ui/merchant-frame.png") 0 0 / calc(384 * var(--u)) calc(512 * var(--u)) no-repeat; }
.mf-portrait { position: absolute; left: calc(12 * var(--u)); top: calc(9 * var(--u)); width: calc(52 * var(--u)); height: calc(52 * var(--u)); border-radius: 50%; object-fit: cover; }
.mf-title { position: absolute; left: calc(76 * var(--u)); top: calc(13 * var(--u)); width: calc(246 * var(--u)); height: calc(17 * var(--u)); margin: 0; text-align: center; color: #ffd100; font: 700 max(12px, calc(12 * var(--u))) / calc(17 * var(--u)) var(--serif); text-shadow: 1px 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-x, .bag-x { position: absolute; padding: 0; border: 0; background: none; color: #ffd100; font: 700 max(14px, calc(15 * var(--u))) / 1 var(--sans); cursor: pointer; text-shadow: 1px 1px 0 #000; }
.mf-x { left: calc(327 * var(--u)); top: calc(13 * var(--u)); width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.bag-x { left: calc(229 * var(--u)); top: calc(7 * var(--u)); width: calc(19 * var(--u)); height: calc(19 * var(--u)); }
.mf-x:hover, .bag-x:hover, .mf-x:focus-visible, .bag-x:focus-visible { color: #fff; outline: none; }
.mf-list { position: absolute; inset: 0; }
.mf-empty { position: absolute; left: calc(30 * var(--u)); top: calc(110 * var(--u)); width: calc(320 * var(--u)); margin: 0; text-align: center; color: #b9ad90; font-size: max(12px, calc(12 * var(--u))); }
/* one merchant item: the real empty-slot art + icon, the real label-plate art, name, price */
.mi { position: absolute; left: calc((22 + var(--c) * 164) * var(--u)); top: calc((80 + var(--r) * 58) * var(--u)); width: calc(156 * var(--u)); height: calc(46 * var(--u)); padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font-family: var(--sans); }
.mi-slot { position: absolute; left: 0; top: calc(3 * var(--u)); width: calc(37 * var(--u)); height: calc(37 * var(--u)); }
.mi-slot::before, .mf-bb::before { content: ""; position: absolute; left: calc(-13.5 * var(--u)); top: calc(-13.5 * var(--u)); width: calc(64 * var(--u)); height: calc(64 * var(--u)); background: url("../assets/ui/bag-emptyslot.png") center / 100% 100% no-repeat; pointer-events: none; }
.mi-slot .ico.m, .bslot .ico.m { position: absolute; inset: 0; width: 100%; height: 100%; background: none; border-radius: 0; }
.mi-slot::after, .bslot::after, .mf-bb::after { content: ""; position: absolute; inset: calc(-4 * var(--u)); background: url("../assets/ui/slot-hover.png") center / 100% 100% no-repeat; opacity: 0; pointer-events: none; }
.mi:hover .mi-slot::after, .mi:focus-visible .mi-slot::after, .bslot:hover::after, .bslot.sel::after, .bslot:focus-visible::after, .mf-bb:hover::after, .mf-bb:focus-visible::after { opacity: 1; }
.mi:focus, .bslot:focus, .mf-bb:focus, .mf-pg:focus { outline: none; }
.mi-plate { position: absolute; left: calc(38 * var(--u)); top: 0; width: calc(118 * var(--u)); height: calc(41 * var(--u)); padding: calc(4 * var(--u)) calc(8 * var(--u)) 0 calc(9 * var(--u)); background: url("../assets/ui/merchant-labelslots.png") 0 0 / calc(128 * var(--u)) calc(64 * var(--u)) no-repeat; overflow: hidden; }
.mi:hover .mi-plate, .mi:focus-visible .mi-plate { filter: brightness(1.5); }
.mi-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 max(10.5px, calc(10.5 * var(--u))) / 1.15 var(--sans); text-shadow: 1px 1px 0 #000; }
.mi-sub { display: none; }
.ui.narrow .mi-name { -webkit-line-clamp: 1; }
.mi-price { position: absolute; left: calc(9 * var(--u)); bottom: calc(4 * var(--u)); }
.mi.off .mi-slot .ico { filter: grayscale(.6) brightness(.7); }
.mi.poor .mi-price b { color: #ff2020; }
.mny { display: inline-flex; align-items: center; gap: calc(3 * var(--u)); color: #fff; }
.mny b { font: 700 max(10.5px, calc(10.5 * var(--u))) / 1 var(--sans); text-shadow: 1px 1px 0 #000; }
.mc { display: inline-block; width: calc(13 * var(--u)); height: calc(13 * var(--u)); min-width: 10px; min-height: 10px; background: url("../assets/ui/bag-coins.png") 0 0 / 300% 100% no-repeat; }
.mc.g { background-position: 0 0; } .mc.s { background-position: 50% 0; } .mc.c { background-position: 100% 0; }
.mf-money, .bag-money { position: absolute; display: flex; align-items: center; justify-content: flex-end; }
.mf-money { left: calc(22 * var(--u)); top: calc(427 * var(--u)); width: calc(150 * var(--u)); height: calc(18 * var(--u)); }
.mf-money .mny b { font-size: max(11.5px, calc(11.5 * var(--u))); }
.mf-bbrow { position: absolute; left: calc(22 * var(--u)); top: calc(372 * var(--u)); display: flex; align-items: center; gap: calc(10 * var(--u)); }
.mf-bb { position: relative; width: calc(37 * var(--u)); height: calc(37 * var(--u)); padding: 0; border: 0; background: none; cursor: pointer; }
.mf-bb .ico.m { position: absolute; inset: 0; width: 100%; height: 100%; background: none; border-radius: 0; }
.mf-bblabel { color: #ffd100; font: 700 max(11px, calc(11 * var(--u))) var(--sans); text-shadow: 1px 1px 0 #000; }
.mf-pager { position: absolute; left: calc(190 * var(--u)); top: calc(427 * var(--u)); width: calc(150 * var(--u)); height: calc(18 * var(--u)); display: flex; align-items: center; justify-content: space-between; color: #ffd100; font: 700 max(10.5px, calc(10.5 * var(--u))) var(--sans); }
.mf-pg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); min-width: 16px; min-height: 16px; padding: 0; border: 0; cursor: pointer; background: url("../assets/ui/merchant-page.png") 0 0 / 200% 100% no-repeat; }
.mf-pg.next { background-position: 100% 0; }
.mf-pg:disabled { opacity: .35; cursor: default; }
.mf-pg:not(:disabled):hover, .mf-pg:focus-visible { filter: brightness(1.4); }
.mf-tabrow { display: flex; flex-wrap: wrap; gap: .3em; justify-content: center; margin-top: .6em; }
.ftip { position: absolute; z-index: 30; pointer-events: none; width: max-content; max-width: min(22em, 90%); }
.ui.narrow .mf-stage { flex-direction: column; align-items: center; }
.ui.narrow .mf-col, .ui.narrow .bag-col { margin: 0 auto; }
