/* ==========================================================================
   THE AUCTION RUN LIST
   ==========================================================================
   One table, drawn by js/lot-list.js, used by the members area and the admin
   panel. It began on the members side, which is why it reads like a bidder's
   worksheet rather than a database table: colour-coded grades, relative sale
   times, an inspection tick, sortable columns and a thumbnail big enough to
   judge. The admin panel had its own plainer table with none of that.

   Density is deliberate. 30px thumbnails in roughly 40px rows: the extra
   height over a bare table goes to the photograph rather than to padding, so
   the picture is worth looking at without costing many lots per screen.
   ========================================================================== */

.run-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}
/* The container holds a table now, not cards. Stated explicitly so a stray
   display:grid from a class elsewhere cannot squeeze it into a column again. */
#auction-grid { display: block; }
.run-t {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.run-t thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-strong);
  padding: 7px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.run-t th.is-sortable { cursor: pointer; user-select: none; }
.run-t th.is-sortable:hover,
.run-t th[aria-sort] { color: var(--text-primary); }
.run-t th.is-sortable:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: -2px;
}
.run-t th.num, .run-t td.num { text-align: right; }

.run-t tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}
.run-t tbody tr:hover { background: var(--bg-hover, rgba(127, 127, 127, .07)); }
.run-t tbody tr:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: -2px;
}
.run-t td { padding: 4px 8px; vertical-align: middle; }

.run-t img {
  display: block;
  width: 44px;
  height: 30px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--border-subtle);
}
.run-nopic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 30px;
  border-radius: 2px;
  background: var(--border-subtle);
  font-size: 8px;
  letter-spacing: .04em;
  color: var(--text-secondary);
}

.run-lot { color: var(--text-secondary); }
.run-veh { white-space: normal; min-width: 176px; font-weight: 600; font-size: 13.5px; }
.run-veh i { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--text-secondary); }

/* Grade is the headline of a Japanese lot. R and RA are accident-repaired and
   carry the warning colour, never reading like any other grade. */
.run-g { font-weight: 600; }
.run-g.g-hi { color: var(--accent-emerald, #0f7b46); }
.run-g.g-mid { color: var(--text-secondary); }
.run-g.g-r { color: var(--accent-red, #b42318); }

.run-today { color: var(--accent, #b45309); font-weight: 600; }
.run-insp { color: var(--accent-emerald, #0f7b46); font-size: 11px; }

.run-star {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 2px 3px;
  font-size: 14px;
  line-height: 1;
  color: var(--text-secondary);
}
.run-star.is-on { color: var(--accent-gold, #b45309); }
.run-star:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 1px; }

.run-open {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-surface);
  color: inherit;
  cursor: pointer;
}
.run-open:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 1px; }

/* ---- Admin-only columns -------------------------------------------------
   The staff view adds a select box and a source column. They are part of the
   same table rather than a different one, so a change to the run list reaches
   both panels. */
.run-t td.run-pick, .run-t th.run-pick { width: 1%; padding-left: 10px; }
.run-t .run-src { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.run-t .run-built { color: var(--text-secondary); white-space: nowrap; }

/* A minimum bid the house has not published. Shown as zero by decision; muted
   so a real ¥0 reserve and an unpublished one are not the same weight of ink. */
.run-t td.run-nobid { color: var(--text-muted); }

/* The bid guide band on a row. The kind of number sits beneath in small type,
   because a hammer price and a figure derived from retail must not look the
   same weight. */
.run-t td.run-guide { white-space: nowrap; }
.run-t td.run-guide small { display: block; font-size: 10px; color: var(--text-muted); font-weight: 400; }
.run-t td.run-guide-derived { color: var(--text-secondary); }
.run-t td.run-noguide { color: var(--text-muted); }
