/* EMBER MARKET — the market's own layout. Colours, labels and buttons come from app.css, so this
   file only holds what the auction room doesn't have: the strip, the grid, the sheet. */

body { padding-bottom: 80px; }
main { padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- header bits */
.wm { font: 400 22px/1 var(--serif); letter-spacing: .3em; color: var(--wax); }
.wm i { font-style: normal; color: var(--brass); }
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tab { background: none; border: 0; border-bottom: 1px solid transparent; color: var(--wax-mute); font: 400 12px var(--mono);
  letter-spacing: .1em; text-transform: uppercase; padding: 10px 14px; cursor: pointer; }
.tab:hover { color: var(--wax-dim); }
.tab.on { color: var(--wax); border-bottom-color: var(--brass); }
.hright { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  color: var(--wax); font: 500 13px var(--mono); padding: 9px 14px; cursor: pointer; }
#wchip { border-color: rgba(201,164,92,.4); }
#seatchip { cursor: pointer; }
#seatchip .dot { width: 7px; height: 7px; border-radius: 50%; background: #7bc47f; box-shadow: 0 0 6px rgba(123,196,127,.7); }
.chip .lab { color: var(--wax-mute); }
.btn { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 12px 18px; cursor: pointer;
  border: 1px solid var(--line-2); background: none; color: var(--wax); }
.btn:hover { border-color: var(--brass); color: var(--brass-hi); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #120e0a; font-weight: 500; }
.btn.brass:hover { background: var(--brass-hi); color: #120e0a; }
.btn.ghost { color: var(--wax-dim); }
.btn[disabled] { opacity: .45; cursor: default; }

/* ---------------------------------------------------------------- the numbers strip */
.strip { display: flex; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line);
  padding: 0 var(--gutter); background: linear-gradient(180deg, rgba(201,164,92,.045), transparent); }
.strip .cell { display: grid; gap: 4px; padding: 16px 28px 16px 0; margin-right: 28px; border-right: 1px solid var(--line); }
.strip .cell:last-child { border-right: 0; }
.strip .cell b { font: 400 22px/1 var(--serif); color: var(--wax); letter-spacing: .01em; }
.strip .cell b.quiet { font: 400 12px/1.5 var(--mono); color: var(--wax-dim); letter-spacing: .04em; }
.grow { flex: 1; }
.right { justify-items: end; text-align: right; }

/* ---------------------------------------------------------------- tools */
.tools { display: flex; align-items: center; gap: 12px; padding: 22px 0 16px; flex-wrap: wrap; }
.seg { display: flex; border: 1px solid var(--line); }
.seg button { background: none; border: 0; color: var(--wax-mute); font: 400 11px var(--mono); letter-spacing: .1em;
  text-transform: uppercase; padding: 11px 16px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--panel); color: var(--wax); }
.in { background: var(--panel); border: 1px solid var(--line); color: var(--wax); font: 400 12px var(--mono); padding: 11px 14px; min-width: 190px; }
.in:focus { outline: none; border-color: var(--brass); }
select.in { min-width: 170px; }
.tools .lab { text-align: right; }

.traitbar { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 18px; }
.tchip { border: 1px solid var(--line); background: none; color: var(--wax-dim); font: 400 11px var(--mono); padding: 7px 12px; cursor: pointer; }
.tchip.on { border-color: var(--brass); color: var(--brass-hi); background: rgba(201,164,92,.08); }
.tgroup { display: flex; align-items: center; gap: 8px; margin-right: 14px; }
.tgroup > .lab { min-width: 52px; }

/* ---------------------------------------------------------------- the grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: grid; grid-template-rows: auto auto; }
.tile:hover { border-color: var(--brass); }
.tile .art { aspect-ratio: 1; background: #0f0c0a; overflow: hidden; position: relative; }
/* rarity: a small tag in the art's corner, and the same colours everywhere a tier shows */
.rk { font: 500 9px var(--mono); letter-spacing: 1.1px; text-transform: uppercase; padding: 3px 6px; border: 1px solid currentColor; background: rgba(12,10,8,.78); }
.tile .rk { position: absolute; top: 8px; left: 8px; }
#shRank .rk { margin-right: 8px; }
.t-legendary { color: #f2c35b; } .t-epic { color: #c79bf2; } .t-rare { color: #7fb4f0; } .t-uncommon { color: #8fcf95; } .t-common { color: #8a8175; }
.tchip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.tchip .dot.t-common { background: #8a8175; }
#shTraits .tp { display: block; font: 400 10px var(--mono); color: var(--wax-mute); margin-top: 3px; letter-spacing: .04em; }
.tile img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.tile .meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 12px 12px; border-top: 1px solid var(--line); }
.tile .n { font: 400 15px var(--serif); letter-spacing: .04em; }
.tile .p { font: 500 12px var(--mono); color: var(--brass-hi); }
.tile .p.none { color: var(--wax-mute); font-weight: 400; }
.tile .p.staked { color: var(--ember); font-weight: 400; letter-spacing: .06em; }
.tile .rank { font-size: 9px; letter-spacing: 1.2px; color: var(--wax-mute); text-transform: uppercase; }
.more { display: flex; justify-content: center; padding: 26px 0 10px; }
.empty { grid-column: 1 / -1; padding: 46px 0 10px; max-width: 460px; }
.empty b { color: var(--wax); font-weight: 500; }

/* ---------------------------------------------------------------- activity */
.feed { width: 100%; border-collapse: collapse; margin-top: 18px; }
.feed th, .feed td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.feed th { background: var(--panel); position: sticky; top: 82px; }
.feed td b { color: var(--brass-hi); font-weight: 500; }
.feed tr:hover td { background: rgba(239,230,210,.02); }
.feed .what { color: var(--wax-dim); }
/* a sale is the thing people came to see: give it the brass edge */
.feed tr.issale td:first-child { box-shadow: inset 2px 0 0 var(--brass); color: var(--brass-hi); }
.feed tr.issale td b { color: var(--ember-hot); }

/* ---------------------------------------------------------------- vault */
.vaulthead { display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--line); margin: 20px 0 22px; }
.vaulthead .cell { display: grid; gap: 4px; padding: 0 28px 18px 0; margin-right: 28px; border-right: 1px solid var(--line); }
.vaulthead .cell:last-child { border-right: 0; padding-right: 0; margin-right: 0; }
.vaulthead b { font: 400 22px/1 var(--serif); }

/* ---------------------------------------------------------------- one Ember */
#scrim { position: fixed; inset: 0; background: rgba(6,5,4,.66); z-index: 40; }
#sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 41; overflow-y: auto;
  background: var(--panel); border-left: 1px solid var(--line-2); padding: 18px 26px 40px; }
/* stays at the top while the sheet scrolls: the way out is always one tap away */
.sheetbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -18px; z-index: 2;
  margin: -18px -26px 0; padding: 14px 26px 10px; background: var(--panel); }
.x { background: none; border: 0; color: var(--wax-dim); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.x:hover { color: var(--wax); }
.shart { margin: 6px -6px 16px; background: #0f0c0a; border: 1px solid var(--line); aspect-ratio: 1; }
.shart img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.shname { font: 400 40px/1 var(--serif); letter-spacing: .01em; }
.shown { margin-top: 10px; font-size: 12px; color: var(--wax-dim); }
.shown b { color: var(--wax); font-weight: 500; }
.shprice { display: flex; gap: 0; margin: 20px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shprice > div { display: grid; gap: 5px; padding: 14px 22px 14px 0; margin-right: 22px; border-right: 1px solid var(--line); }
.shprice > div:last-child { border-right: 0; }
.shprice b { font: 400 24px/1 var(--serif); color: var(--brass-hi); }
.shact { display: flex; flex-wrap: wrap; gap: 8px; }
.shact .in { min-width: 118px; flex: 1; }
.shact .btn { flex: 1; }
.shtraits { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 22px 0; }
.shtraits div { background: var(--panel-2); padding: 11px 13px; display: grid; gap: 4px; }
.shtraits b { font-size: 12px; font-weight: 500; }
.shprov { display: grid; gap: 6px; margin-bottom: 20px; }
.shoffers table { width: 100%; border-collapse: collapse; }
.shoffers td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.shoffers td:last-child { text-align: right; }

/* ---------------------------------------------------------------- paying for one */
#pay { margin: 18px 0 4px; padding: 16px; border: 1px solid var(--brass); background: rgba(201,164,92,.06); }
.payhead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.payhead b { font: 400 26px/1 var(--serif); color: var(--brass-hi); }
.payrow { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.payrow .lab { min-width: 54px; }
.payrow code { flex: 1; font: 400 11px/1.5 var(--mono); color: var(--wax); background: var(--panel-2);
  border: 1px solid var(--line); padding: 8px 10px; word-break: break-all; max-height: 62px; overflow: hidden; }
.payrow .btn { padding: 8px 12px; }
#pay .btn.big { width: 100%; margin-top: 4px; padding: 15px 18px; font-size: 13px; }
.linky { background: none; border: 0; padding: 6px 0; color: var(--wax-dim); font: 400 11px var(--mono);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linky:hover { color: var(--brass-hi); }
#payState { margin-top: 10px; }

/* ---------------------------------------------------------------- toast */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: var(--panel-2);
  border: 1px solid var(--line-2); color: var(--wax); font-size: 12px; padding: 13px 20px; max-width: 90vw; }

@media (max-width: 720px) {
  header { gap: 12px; height: auto; padding: 12px var(--gutter); flex-wrap: wrap; }
  .tabs { order: 3; width: 100%; margin-left: -6px; }
  .strip { overflow-x: auto; }
  .strip .cell.grow { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  #sheet { width: 100vw; }
  .feed th:nth-child(4), .feed td:nth-child(4) { display: none; }
}
