/* ======================================
   THE MARKET - the realm's businesses

   The sections (stalls, forge and tailor, property, businesses here) are
   chosen from the shared centered underline tabs (.sec-tabs, controls.css)
   since 2026-08-11 - the big banner nav cards this file used to style are
   gone at the owner's request, and their rules went with them. Each
   section's one-line description is drawn under the bar by market.js.
   ====================================== */

/* -- The realm's businesses: a card per holding, expandable for the sign -- */

.biz-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.biz-card {
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.15s;
}
.biz-card.open  { border-color: var(--accent-gold); }
.biz-card.mine  { border-left: 3px solid var(--accent-gold); }

.biz-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
}
.biz-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.biz-kind {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 400;
}
.biz-owner {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-expand {
  border-top: 1px solid var(--border-dim);
  padding: 0.6rem;
  background: rgba(212, 174, 90, 0.04);
}
.biz-banner {
  width: 100%;
  max-height: 130px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-dim);
  margin-bottom: 0.5rem;
  display: block;
}
.biz-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 0.4rem;
}
.biz-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* A thin progress bar for a business still going up. */
.biz-progress {
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.3rem;
  border: 1px solid var(--border-dim);
}
.biz-progress > span {
  display: block;
  height: 100%;
  background: var(--accent-ember);
}

/* WHAT A BUSINESS SELLS (2026-07-30). One row per service: what it is, what it
   does for you, what it costs, and - when you may not have it - why, printed on
   the card rather than left behind a click. */
.biz-svc-list {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-dim);
  padding-top: 0.4rem;
}
.biz-svc {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}
.biz-svc + .biz-svc { border-top: 1px solid var(--border-dim); }
.biz-svc-info { min-width: 0; }
.biz-svc-name { font-size: 0.78rem; color: var(--text-primary); }
.biz-svc-meta { font-size: 0.66rem; color: var(--text-muted); margin-top: 0.1rem; }
.biz-svc-cut { color: var(--accent-gold); opacity: 0.85; }
.biz-svc-buy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.biz-svc-price {
  color: var(--accent-gold);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.biz-svc-buy .inv-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* The reason a button is dead, spanning both columns underneath it. The title=
   attribute carries the same words for anyone hovering. */
.biz-svc-why {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

/* -- SELLING SEVERAL AT ONCE (the QoL pass, 2026-09-18, item 3.4) ------ */
.sell-bar { position: sticky; top: 0; z-index: 2; padding: 0.4rem 0; background: var(--bg-panel); }
.sell-tick { display: flex; align-items: center; padding-right: 0.5rem; min-width: var(--tap-min); min-height: var(--tap-min); justify-content: center; }
.sell-tick input { width: 1.1rem; height: 1.1rem; }
