/* =============================================================================
   auction.css — the Auction House tab (#view-auctions). Scoped .au-* so it
   never collides with the shop grid, terminal, or storefronts. Themed entirely
   off the shared market.css / it-tokens palette variables.
   ========================================================================== */

.au-wrap{ max-width:1200px; margin:0 auto; padding:20px clamp(12px,3vw,32px) 64px; }

/* ---- header ------------------------------------------------------------- */
.au-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.au-title{ font-size:clamp(22px,3.4vw,34px); font-weight:900; letter-spacing:-.01em; color:var(--ink-hi); line-height:1.05; }
.au-sub{ color:var(--ink-lo); font-size:13px; margin-top:4px; max-width:52ch; }
.au-new{ display:inline-flex; align-items:center; gap:8px; background:var(--p400); color:var(--on-accent); font-weight:800; font-size:14px; border-radius:12px; padding:11px 16px; box-shadow:0 6px 18px rgba(77,169,238,.28); }
.au-new:hover{ background:var(--p500); }

/* ---- filter chips ------------------------------------------------------- */
.au-filters{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 18px; }
.au-chip{ border:1px solid var(--hairline-2); background:var(--panel); color:var(--ink-mid); border-radius:999px; padding:7px 14px; font-weight:700; font-size:13px; }
.au-chip[aria-pressed="true"]{ background:var(--p400); color:var(--on-accent); border-color:transparent; }
.au-chip:hover{ color:var(--ink-hi); }

/* ---- grid --------------------------------------------------------------- */
.au-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(238px,1fr)); gap:14px; }
.au-card{ position:relative; background:var(--panel); border:1px solid var(--hairline); border-radius:16px; overflow:hidden; display:flex; flex-direction:column; transition:border-color .15s, transform .15s; }
.au-card:hover{ border-color:var(--p300); transform:translateY(-2px); }
.au-thumb{ aspect-ratio:1/1; background:var(--well) center/cover no-repeat; display:flex; align-items:center; justify-content:center; color:var(--ink-faint); font-size:34px; }
.au-thumb img{ width:100%; height:100%; object-fit:cover; }
.au-body{ padding:12px 13px 14px; display:flex; flex-direction:column; gap:7px; }
.au-name{ font-weight:800; color:var(--ink-hi); font-size:14px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.au-coll{ color:var(--ink-faint); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.au-rowline{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.au-k{ color:var(--ink-lo); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.au-v{ color:var(--ink-hi); font-weight:800; font-size:15px; }
.au-v small{ color:var(--ink-lo); font-weight:600; font-size:11px; }
.au-bin{ color:var(--sweep); font-weight:800; }

/* status pill + countdown */
.au-pill{ position:absolute; top:10px; left:10px; z-index:2; font-size:11px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; padding:4px 9px; border-radius:999px; backdrop-filter:blur(4px); }
.au-pill.live{ background:rgba(59,224,138,.16); color:var(--gain); box-shadow:inset 0 0 0 1px rgba(59,224,138,.4); }
.au-pill.scheduled{ background:rgba(77,169,238,.16); color:var(--p500); box-shadow:inset 0 0 0 1px rgba(77,169,238,.4); }
.au-pill.ended{ background:rgba(255,255,255,.07); color:var(--ink-lo); box-shadow:inset 0 0 0 1px var(--hairline-2); }
.au-pill.silentbadge{ left:auto; right:10px; background:rgba(242,166,25,.16); color:var(--sweep); box-shadow:inset 0 0 0 1px rgba(242,166,25,.4); }

/* open vs silent segmented toggle (schedule form) */
.au-seg{ display:flex; border:1px solid var(--hairline-2); border-radius:10px; overflow:hidden; }
.au-seg-btn{ flex:1; padding:9px 10px; font-weight:800; font-size:13px; color:var(--ink-mid); background:var(--well); }
.au-seg-btn + .au-seg-btn{ border-left:1px solid var(--hairline-2); }
.au-seg-btn[aria-pressed="true"]{ background:var(--p400); color:var(--on-accent); }
.au-seg-btn:hover{ color:var(--ink-hi); }
.au-seg-btn[aria-pressed="true"]:hover{ color:var(--on-accent); }
.au-clock{ font-variant-numeric:tabular-nums; color:var(--ink-mid); font-weight:700; font-size:12px; }
.au-clock.hot{ color:var(--loss); }

/* ---- empty / error state ----------------------------------------------- */
.au-empty{ text-align:center; padding:70px 20px; color:var(--ink-lo); }
.au-empty h3{ color:var(--ink-hi); font-size:18px; margin:0 0 6px; }
.au-empty p{ margin:0 auto; max-width:44ch; font-size:13px; }

/* ---- modal (schedule + detail) ----------------------------------------- */
.au-back{ position:fixed; inset:0; z-index:8000; background:rgba(4,8,14,.72); backdrop-filter:blur(4px); display:flex; align-items:flex-start; justify-content:center; overflow:auto; padding:5vh 14px 40px; }
.au-modal{ width:100%; max-width:520px; background:var(--panel); border:1px solid var(--hairline-2); border-radius:18px; box-shadow:0 24px 60px rgba(0,0,0,.5); }
.au-modal-hd{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--hairline); }
.au-modal-hd h3{ margin:0; font-size:17px; color:var(--ink-hi); font-weight:800; }
.au-x{ font-size:22px; color:var(--ink-lo); line-height:1; padding:2px 6px; border-radius:8px; }
.au-x:hover{ color:var(--ink-hi); background:var(--hover); }
.au-form{ padding:16px 18px 20px; display:flex; flex-direction:column; gap:13px; }
.au-field{ display:flex; flex-direction:column; gap:5px; }
.au-field label{ font-size:12px; font-weight:700; color:var(--ink-mid); }
.au-field .hint{ font-size:11px; color:var(--ink-faint); }
.au-input{ background:var(--well); border:1px solid var(--hairline-2); border-radius:10px; padding:10px 12px; color:var(--ink-hi); font-size:14px; }
.au-input:focus{ border-color:var(--p400); }
.au-two{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.au-actions{ display:flex; gap:10px; margin-top:4px; }
.au-btn{ flex:1; border-radius:11px; padding:12px; font-weight:800; font-size:14px; text-align:center; }
.au-btn.primary{ background:var(--p400); color:var(--on-accent); }
.au-btn.primary:hover{ background:var(--p500); }
.au-btn.ghost{ background:var(--hover); color:var(--ink-mid); }
.au-btn.ghost:hover{ color:var(--ink-hi); }
.au-btn.buynow{ background:var(--sweep); color:#1b1204; }
.au-btn[disabled]{ opacity:.5; pointer-events:none; }
.au-status{ font-size:12.5px; min-height:16px; }
.au-status.err{ color:var(--loss); }
.au-status.ok{ color:var(--gain); }
.au-note{ font-size:11px; color:var(--ink-faint); text-align:center; }

/* detail modal bid history */
.au-detail-top{ display:flex; gap:14px; padding:16px 18px; }
.au-detail-top .au-thumb{ width:120px; height:120px; flex:0 0 auto; border-radius:12px; overflow:hidden; }
.au-detail-meta{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.au-bids{ max-height:180px; overflow:auto; margin:0 18px; border-top:1px solid var(--hairline); }
.au-bid{ display:flex; justify-content:space-between; gap:10px; padding:8px 2px; border-bottom:1px solid var(--hairline); font-size:12.5px; }
.au-bid .who{ color:var(--ink-lo); font-family:var(--font-num); }
.au-bid .amt{ color:var(--ink-hi); font-weight:800; }
.au-testnet{ display:inline-block; font-size:10px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--sweep); border:1px solid var(--sweep); border-radius:6px; padding:2px 6px; }

/* MOBILE — 16px inputs so iOS Safari never zooms the page on focus. */
@media (max-width:640px){
  .au-input{ font-size:16px; }
}
