/* ===========================================================================
   Live bidding (Phase 2) — shared styles for the auctioneer console and the
   bidder live view. Layered on top of style.css design tokens.
   =========================================================================== */

:root {
  --live-accent: #f59e0b;
  --live-green: #16a34a;
  --live-red: #dc2626;
  --ink: #0f172a;
  --ink-2: #1e293b;
}

/* ---------- Live layout grid ---------- */
.live-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { 
  .live-grid { 
    grid-template-columns: 1fr; 
  } 
}

/* Phase 3A: Enhanced mobile responsiveness */
@media (max-width: 768px) {
  .bidder-body {
    padding: 0.5rem;
  }

  .bidder-hero {
    padding: 1.5rem;
  }

  .lot-title {
    font-size: 1.3rem;
  }

  .current-bid {
    font-size: 2rem;
  }

  .bid-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .quick-bids {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .quick-bid-btn,
  .bid-btn-primary,
  .bid-btn-secondary {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .bid-feed {
    max-height: 200px;
  }

  .bid-feed-entry {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .countdown {
    font-size: 2rem;
  }

  .conn-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .lot-title {
    font-size: 1.1rem;
  }

  .current-bid {
    font-size: 1.5rem;
  }

  .quick-bids {
    grid-template-columns: 1fr;
  }

  .countdown {
    font-size: 1.5rem;
  }
}

.live-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .06);
}
.live-panel h3 { margin: 0 0 14px; font-size: 15px; letter-spacing: .2px; }

/* ---------- Current-lot hero ---------- */
.lot-hero {
  background: linear-gradient(150deg, #0f172a 0%, #1e293b 60%, #243244 100%);
  color: #fff;
  border-radius: 18px;
  padding: 26px 26px 22px;
  position: relative;
  overflow: hidden;
}
.lot-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.25), transparent 70%);
}
.lot-hero .lot-eyebrow {
  text-transform: uppercase; letter-spacing: 1.4px; font-size: 11px;
  color: #94a3b8; font-weight: 700; margin-bottom: 6px;
}
.lot-hero .lot-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; line-height: 1.2; }
.lot-hero .lot-desc { color: #cbd5e1; font-size: 13px; max-width: 90%; margin: 0 0 18px; }

.bid-display { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.bid-amount {
  font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  transition: transform .18s ease;
}
.bid-amount.bump { animation: bidBump .5s cubic-bezier(.2,.8,.2,1); }
@keyframes bidBump {
  0% { transform: scale(1); color: #fff; }
  30% { transform: scale(1.12); color: var(--live-accent); }
  100% { transform: scale(1); color: #fff; }
}
.bid-meta { color: #cbd5e1; font-size: 13px; padding-bottom: 6px; }
.bid-meta strong { color: #fff; }

.lot-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.1); color: #e2e8f0;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.live { color: #4ade80; }
.pill.paused { color: #fbbf24; }
.pill.closed { color: #f87171; }
.pill.reserve-met { color: #4ade80; }
.pill.reserve-no { color: #fca5a5; }
.pill.count { color: #93c5fd; }

.countdown { font-variant-numeric: tabular-nums; font-weight: 800; }
.countdown.urgent { color: #fca5a5; animation: pulseUrgent 1s infinite; }
@keyframes pulseUrgent { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- Bid feed ---------- */
.bid-feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.bid-feed li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 4px; border-bottom: 1px solid var(--border); gap: 10px;
  animation: feedIn .35s ease;
}
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bid-feed li:last-child { border-bottom: none; }
.bid-feed .who { font-weight: 600; color: var(--ink); }
.bid-feed .amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.bid-feed .src {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 7px; border-radius: 6px; background: #f1f5f9; color: #64748b; font-weight: 700;
}
.bid-feed .src.online { background: #dbeafe; color: #1d4ed8; }
.bid-feed .src.floor  { background: #dcfce7; color: #15803d; }
.bid-feed .src.phone  { background: #fef3c7; color: #92400e; }
.bid-feed .src.absentee { background: #ede9fe; color: #6d28d9; }
.bid-feed li.voided { opacity: .45; text-decoration: line-through; }
.bid-feed li.winning { background: #f0fdf4; }

/* ---------- Console controls ---------- */
.ctrl-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ctrl-row .btn { flex: 0 0 auto; }
.btn.success { background: var(--live-green); }
.btn.success:hover { background: #15803d; }
.btn.warn { background: var(--live-accent); color: #1f1300; }
.btn.warn:hover { background: #d97706; }
.field-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.field-inline > div { flex: 1; min-width: 120px; }

.live-empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.live-empty .big { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

.mini-lots { list-style: none; margin: 0; padding: 0; }
.mini-lots li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.mini-lots li:last-child { border-bottom: none; }
.mini-lots .ml-title { font-weight: 600; }
.mini-lots .ml-sub { font-size: 12px; color: var(--muted); }

/* ---------- Bidder live view page ---------- */
.bidder-body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(1200px 600px at 70% -10%, #1e293b, #0b1220 60%);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.bidder-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.bidder-nav .brand { font-weight: 800; font-size: 17px; color: #fff; }
.bidder-nav .brand small { display: block; font-size: 11px; font-weight: 500; color: #64748b; }
.bidder-nav .whoami { font-size: 13px; color: #94a3b8; }
.bidder-nav .whoami strong { color: #fff; }

.bidder-wrap { max-width: 1080px; margin: 0 auto; padding: 28px 22px 60px; }

/* Bidder login card */
.bidder-login {
  max-width: 420px; margin: 8vh auto 0;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 34px; backdrop-filter: blur(6px);
}
.bidder-login h1 { margin: 0 0 4px; font-size: 22px; color: #fff; }
.bidder-login p { margin: 0 0 22px; color: #94a3b8; font-size: 13px; }
.bidder-login label { color: #cbd5e1; }
.bidder-login input { background: #0f172a; color: #fff; border-color: rgba(255,255,255,.15); }
.bidder-login .hint { margin-top: 16px; font-size: 12px; color: #64748b; }

/* Bid action bar (bidder) */
.bid-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.bid-btn {
  border: none; border-radius: 14px; padding: 18px; cursor: pointer;
  font-size: 16px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 24px rgba(37,99,235,.35); transition: transform .1s ease, filter .1s ease;
}
.bid-btn:hover { filter: brightness(1.07); }
.bid-btn:active { transform: translateY(1px); }
.bid-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.bid-btn.big { grid-column: 1 / -1; font-size: 19px; padding: 22px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #1f1300; box-shadow: 0 8px 24px rgba(245,158,11,.35); }
.custom-bid { display: flex; gap: 8px; margin-top: 12px; }
.custom-bid input { background: #0f172a; color: #fff; border-color: rgba(255,255,255,.15); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fff; border: 1px solid rgba(255,255,255,.15);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--live-red); color: #fecaca; }
.toast.success { border-color: var(--live-green); color: #bbf7d0; }

.status-line { font-size: 13px; color: #94a3b8; margin-top: 10px; min-height: 18px; }
.conn-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #64748b; margin-right: 6px; }
.conn-dot.on { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
.conn-dot.off { background: #f87171; }


/* Phase 3B: watch button + absentee (max) bid box on the live view */
.watch-btn {
  cursor: pointer; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.04);
  color: #e2e8f0; font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 999px;
  transition: all .15s ease;
}
.watch-btn:hover { background: rgba(255,255,255,.12); }
.watch-btn.on { background: #f59e0b; border-color: #f59e0b; color: #1a1a1a; font-weight: 700; }
.absentee-box {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.15);
}
.absentee-head { color: #fff; font-weight: 700; font-size: 14px; }
.absentee-hint { color: #94a3b8; font-size: 12px; margin: 2px 0 10px; }
.bid-btn.secondary-btn { background: #334155; }
.bid-btn.secondary-btn:hover { background: #475569; }



/* ---------------- Live video stream (Phase 3B) ---------------- */
.stream-panel {
  background: #000;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.stream-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .3px;
  text-transform: uppercase;
  margin: 2px 4px 10px;
}
.stream-head .live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .7);
  animation: streamPulse 1.6s infinite;
}
@keyframes streamPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); }
  70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.stream-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.stream-frame iframe,
.stream-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  object-fit: contain;
}
