/* ==========================================================================
 * Festival Studio - spot bidding (Milestone F)
 *
 * Vendors > Spot bidding (views/spot-bidding.js, st-spot-auction / -setup /
 * -bulk / -money), its dialogs (st-spot-pick, st-spot-announce, st-spot-mail,
 * st-spot-bid), the lot map (ui/spot-lot-map.js, st-spot-map) and the
 * bidding page (views/bid.js, st-spot-page / -lot / -legend / -rules).
 * Colours are the kit's tokens; the lot colours come from the data
 * (spot-core.js LOT_TONE_COLORS) as inline styles. Nothing here moves.
 * ========================================================================== */

/* ---------- Vendors tabs ---------- */
.st-vendors-panel { padding-top: 18px; }

/* ---------- shared ---------- */
.st-spot-warn { color: var(--st-amber); }
.st-spot-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Results: where the winner's stand went. */
.st-spot-place { align-items: flex-start; font-size: 13px; line-height: 1.35; white-space: normal; }
.st-spot-place .st-link { max-width: 100%; text-align: left; }
.st-spot-place.is-warn > span { color: var(--st-amber); }
.st-spot-place__acts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 4px; }
.st-spot-place__acts .st-btn { max-width: 100%; }
.st-spot-place__acts .st-btn__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-spot-attn { display: flex; flex-direction: column; gap: 6px; }
.st-spot-attn .st-spot-place__acts { flex-direction: row; flex-wrap: wrap; }
.st-spot-status { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.st-spot-time { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st-spot-time .is-urgent, .st-spot-time.is-urgent { color: var(--st-amber); font-weight: 600; }
.st-spot-h3 { font-size: 13px; font-weight: 600; color: var(--st-text); margin: 4px 0 6px; }
.st-spot-history, .st-spot-queue { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.st-spot-history li, .st-spot-queue li {
  display: grid; grid-template-columns: 84px 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--st-border); font-size: 13px;
}
.st-spot-queue { list-style: decimal inside; }
.st-spot-queue li { display: list-item; }

/* ---------- the auctions list and one auction ---------- */
.st-spot-auction { display: flex; flex-direction: column; gap: 14px; }
.st-spot-auction__top { margin-bottom: -6px; }
.st-spot-auction__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.st-spot-auction__heading { min-width: 0; flex: 1 1 320px; }
.st-spot-auction__title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.st-spot-auction__phase { margin-top: 4px; font-size: 13px; }
.st-spot-auction__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.st-spot-panel { display: flex; flex-direction: column; gap: 16px; }

/* ---------- setup ---------- */
.st-spot-setup { display: flex; flex-direction: column; gap: 16px; max-width: 1080px; }
.st-spot-setup__card .st-card__body { display: flex; flex-direction: column; gap: 14px; }
.st-spot-setup__scroll { overflow-x: auto; }
.st-spot-setup__table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.st-spot-setup__table th {
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--st-text-muted); padding: 8px 8px; border-bottom: 1px solid var(--st-border); white-space: nowrap;
}
.st-spot-setup__table td { padding: 6px 8px; border-bottom: 1px solid var(--st-border); vertical-align: middle; }
.st-spot-setup__table tr.is-picked td { background: rgba(109, 92, 255, 0.07); }
.st-spot-setup__table--read td { padding: 10px 12px; }
.st-spot-setup__table--read th { padding: 10px 12px; }
.st-spot-setup__check { width: 34px; }
.st-spot-setup__stand { max-width: 240px; overflow: hidden; }
.st-spot-setup__stand .st-truncate { display: inline-block; max-width: 100%; vertical-align: middle; }
.st-spot-setup__stand > * + * { margin-left: 6px; }
.st-spot-setup__table .st-input--sm { min-width: 0; width: 100%; }
.st-spot-setup__actions { justify-content: flex-end; }

.st-spot-money__wrap { display: inline-flex; align-items: center; position: relative; width: 100%; min-width: 92px; }
.st-spot-money__sign { position: absolute; left: 9px; color: var(--st-text-muted); font-size: 13px; pointer-events: none; }
.st-spot-money__wrap .st-input { padding-left: 20px; font-variant-numeric: tabular-nums; }
.st-spot-money.is-invalid, .st-spot-money__wrap .is-invalid { border-color: var(--st-red); }

.st-spot-bulk {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px;
  background: var(--st-bg-elev); border: 1px solid var(--st-border); border-radius: var(--st-r-10);
}
.st-spot-bulk__label { font-size: 12.5px; font-weight: 600; color: var(--st-text-dim); }
.st-spot-bulk__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--st-text-muted); }
.st-spot-bulk__item .st-spot-money__wrap { width: 108px; }
.st-spot-bulk > .st-spot-warn { flex-basis: 100%; margin: 0; }
.st-spot-bulk > .st-spot-warn:empty { display: none; }

/* ---------- the area picker (ui/spot-area-picker.js) ---------- */
.st-spot-pick-dialog.st-modal--lg .st-dialog__panel { width: min(1080px, calc(100vw - 32px)); max-width: none; }
.st-spot-pick { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; min-height: 460px; }
.st-spot-pick__side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.st-spot-pick__side .st-toolbar { margin-bottom: 0; }
.st-spot-pick__count { font-size: 12.5px; font-weight: 600; color: var(--st-text-dim); }
.st-spot-pick__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 420px; border: 1px solid var(--st-border); border-radius: var(--st-r-10); }
.st-spot-pick__item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--st-border); font-size: 13px; }
.st-spot-pick__item.is-picked { background: rgba(109, 92, 255, 0.09); }
.st-spot-pick__item.is-off { color: var(--st-text-muted); }
.st-spot-pick__name { flex: 1 1 auto; min-width: 0; }
.st-spot-pick__size { flex: 0 0 auto; font-size: 12px; color: var(--st-text-muted); }
.st-spot-pick--empty { display: block; min-height: 0; }
.st-spot-pick__none { padding: 14px; }
.st-spot-pick__mapbox { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-spot-pick__map { flex: 1 1 auto; min-height: 420px; border-radius: var(--st-r-10); overflow: hidden; }

/* ---------- announce and the email preview ---------- */
.st-spot-announce-dialog.st-modal--lg .st-dialog__panel { width: min(1080px, calc(100vw - 32px)); max-width: none; }
.st-spot-announce { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.1fr); gap: 20px; }
.st-spot-announce__preview { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-spot-announce__link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-spot-announce__url {
  flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; padding: 6px 8px; border-radius: var(--st-r-8); background: var(--st-bg-elev); border: 1px solid var(--st-border);
}
.st-spot-mail { border-radius: var(--st-r-12); overflow: hidden; border: 1px solid var(--st-border-strong); background: #f4f5f8; color: #111; }
.st-spot-mail__head { display: grid; gap: 4px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e3e5ec; font-size: 12.5px; }
.st-spot-mail__head > div { display: grid; grid-template-columns: 62px 1fr; gap: 8px; min-width: 0; }
.st-spot-mail__head .st-muted { color: #6b7280; }
.st-spot-mail__body { margin: 14px; padding: 20px 22px; background: #fff; border-radius: 10px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; }
.st-spot-mail__body p { margin: 0 0 10px; }
.st-spot-mail__brand { font-weight: 800; letter-spacing: 0.08em; color: #5b4cff; font-size: 13px; }
.st-spot-mail__title { font-size: 20px; margin: 0 0 10px; color: #111; }
.st-spot-mail__facts { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 13.5px; }
.st-spot-mail__facts th { text-align: left; color: #555; font-weight: 600; padding: 6px 10px 6px 0; width: 130px; vertical-align: top; }
.st-spot-mail__facts td { padding: 6px 0; border-bottom: 1px solid #eee; }
.st-spot-mail__cta { text-align: center; margin: 16px 0 !important; }
.st-spot-mail__button { display: inline-block; background: #5b4cff; color: #fff; font-weight: 700; padding: 11px 22px; border-radius: 8px; }
.st-spot-mail__rules { margin: 0 0 12px; padding-left: 18px; list-style: disc; font-size: 13px; color: #333; }
.st-spot-mail__foot { font-size: 12px; color: #6b7280; }
.st-spot-mail__link { color: #5b4cff; word-break: break-all; }
.st-spot-mail__frame { display: block; width: 100%; height: 560px; border: 0; background: #fff; }
.st-spot-switch:empty { display: none; }
.st-spot-switch { margin-bottom: 14px; }

/* ---------- Place bid ---------- */
.st-spot-bid__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 0; }
.st-spot-bid__ext { display: block; margin-top: 2px; font-size: 11.5px; color: var(--st-amber); }
.st-spot-bid__facts > div { padding: 8px 10px; border-radius: var(--st-r-10); background: var(--st-bg-elev); border: 1px solid var(--st-border); }
.st-spot-bid__facts dt { font-size: 11.5px; color: var(--st-text-muted); }
.st-spot-bid__facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--st-text); }
.st-spot-bid__money { display: flex; align-items: center; position: relative; }
.st-spot-bid__sign { position: absolute; left: 12px; font-size: 18px; color: var(--st-text-muted); pointer-events: none; }
.st-spot-bid__amount { padding-left: 28px; font-size: 20px; font-weight: 700; height: 46px; font-variant-numeric: tabular-nums; }
.st-spot-bid__quick { display: flex; flex-wrap: wrap; gap: 6px; }
.st-spot-bid__notice:empty { display: none; }
.st-spot-bid__consent { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--st-text); }
.st-spot-blocked__list { list-style: none; margin: 0; padding: 0; }
.st-spot-blocked__list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--st-border); }
.st-spot-blocked__list li > .st-btn { margin-left: auto; }
.st-spot-paused:empty { display: none; }

/* ---------- Pay now ---------- */
.st-spot-pay__sum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; }
.st-spot-pay__amount { font-size: 26px; font-weight: 700; color: var(--st-text); }
.st-spot-pay__element { min-height: 120px; margin-bottom: 12px; }

/* ---------- the lot map ---------- */
.st-spot-map { position: relative; height: 100%; min-height: 360px; background: var(--st-bg-elev); }
.st-spot-map > .st-spot-map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-spot-map__wait { position: absolute; inset: 0; display: grid; place-items: center; }
.st-spot-map .st-map-fallback { position: absolute; inset: 0; }

/* ---------- the bidding page ---------- */
.st-spot-page { display: flex; flex-direction: column; }
.st-spot-bidpage { display: flex; flex-direction: column; gap: 14px; }
.st-spot-phase { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13.5px; color: var(--st-text-dim); margin-top: -10px; }
.st-spot-phase .st-muted { font-size: 12.5px; }
.st-spot-won { display: flex; flex-direction: column; gap: 10px; }
.st-spot-won:empty { display: none; }
.st-spot-bidgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
.st-spot-mapcard .st-card__body { display: flex; flex-direction: column; }
.st-spot-mapcard .st-spot-map { height: max(420px, calc(100dvh - 330px)); border-top: 1px solid var(--st-border); }
.st-spot-listcard .st-card__body { padding-top: 4px; }
.st-spot-listcard .st-card__header { flex-wrap: wrap; gap: 8px; }

.st-spot-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; font-size: 12.5px; color: var(--st-text-dim); border-top: 1px solid var(--st-border); }
.st-spot-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.st-spot-legend__ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid; }

.st-spot-lots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: max(420px, calc(100dvh - 330px)); overflow-y: auto; }
.st-spot-lot {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'dot main nums' 'dot time act';
  align-items: center; gap: 4px 12px; padding: 12px 6px; border-bottom: 1px solid var(--st-border);
}
.st-spot-lot:last-child { border-bottom: 0; }
.st-spot-lot.is-selected { background: rgba(109, 92, 255, 0.08); border-radius: var(--st-r-10); }
.st-spot-lot__pick { grid-area: dot; align-self: start; margin-top: 3px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.st-spot-lot__dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid; }
.st-spot-lot__main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-spot-lot__title { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; }
.st-spot-lot__title strong { flex: 0 0 auto; white-space: nowrap; }
.st-spot-lot__size, .st-spot-lot__stand { font-size: 12.5px; color: var(--st-text-muted); }
.st-spot-lot__size { flex: 0 0 auto; white-space: nowrap; }
.st-spot-lot__stand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-spot-lot__state { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.st-spot-lot__nums { grid-area: nums; text-align: right; }
.st-spot-lot__price { font-size: 17px; font-weight: 700; color: var(--st-text); }
.st-spot-lot__time { grid-area: time; font-size: 12.5px; color: var(--st-text-dim); }
.st-spot-lot__act { grid-area: act; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.st-spot-lot__act:empty { display: none; }
.st-spot-lot.is-top .st-spot-lot__price { color: var(--st-green); }
.st-spot-lot.is-outbid .st-spot-lot__price { color: var(--st-amber); }
.st-spot-lot.is-closed .st-spot-lot__price { color: var(--st-text-dim); }

.st-spot-rules .st-callout { max-width: 820px; }
.st-spot-rules__list { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.st-spot-rules__list li { color: var(--st-text-dim); font-size: 13px; }
.st-spot-rules__list li + li { margin-top: 3px; }

/* The back link above the title (bidBackLink); empty for invited vendors. */
.st-spot-back:empty { display: none; }
/* "You already lead Spot 9 - one spot per vendor" above the list. */
.st-spot-block:empty { display: none; }
.st-spot-block { margin: 6px 0 4px; }
.st-spot-lot__act .st-btn:disabled { opacity: 0.55; }

/* ---------- narrow ---------- */
@media (max-width: 1100px) {
  /* Still side by side (the page has no rail): the list stays in view next to the map. */
  .st-spot-bidgrid { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); }
  .st-spot-mapcard .st-spot-map { height: max(380px, calc(100dvh - 360px)); }
}
@media (max-width: 900px) {
  .st-spot-bidgrid { grid-template-columns: 1fr; }
  .st-spot-mapcard .st-spot-map { height: 340px; }
  .st-spot-lots { max-height: none; }
}
@media (max-width: 860px) {
  .st-spot-pick, .st-spot-announce { grid-template-columns: 1fr; }
  .st-spot-pick__map { min-height: 300px; }
}
@media (max-width: 560px) {
  .st-spot-mapcard .st-spot-map { height: 280px; }
  /* A phone: the action gets its own full-width row under the countdown. */
  .st-spot-lot {
    grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'dot main nums' 'dot time time' 'dot act act';
    padding: 12px 2px;
  }
  .st-spot-lot__act { justify-self: stretch; margin-top: 6px; }
  .st-spot-lot__act .st-btn { width: 100%; justify-content: center; }
  /* A long state ("Won - pay by Fri, Nov 13 · 5:00 PM") wraps instead of running under the price. */
  .st-spot-lot__state .st-badge { white-space: normal; text-align: left; height: auto; min-height: 22px; padding: 3px 8px; line-height: 1.3; flex: 0 1 auto; border-radius: 11px; }
  .st-spot-lot__stand { display: none; }
  .st-spot-lot__price { font-size: 16px; }
  .st-spot-phase { margin-top: -6px; }
  .st-spot-listcard .st-card__header { flex-direction: column; align-items: flex-start; }
}
