/*
 * spectator-broadcast.css
 * Broadcast layout styles for the /watch spectator page.
 * DO NOT duplicate :root CSS variables — those are defined in site.css
 * (loaded by BaseLayout). Only broadcast-specific classes live here.
 *
 * The page structure inside #spectator-root:
 *   .event-bar → .board-strip → .seats-strip → .content-area → .info-footer
 */

/* ─── Full-viewport shell ─── */
/* BaseLayout wraps content in <main>; make main fill remaining height */
main:has(#spectator-root) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height, 48px));
  overflow: hidden;
  padding: 0;
}

#spectator-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* ─── Animation ─── */
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  display: inline-block;
  animation: pulse 1.5s infinite;
}

/* ─── Cards ─── */
.c {
  background: #fff;
  color: #111;
  border-radius: 3px;
  padding: 0.15rem 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: monospace;
  display: inline-block;
}
.c.r { color: var(--accent-red); }
.c.back { background: var(--bg-elevated, #0f3460); color: var(--text-muted); }

/* Large community cards */
.c-lg {
  background: #fff;
  color: #111;
  border-radius: 5px;
  padding: 0.4rem 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: monospace;
  min-width: 2.4rem;
  text-align: center;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.c-lg.r { color: var(--accent-red); }
.c-lg.back { background: var(--bg-elevated, #0f3460); color: var(--text-muted); }

/* ─── Action tags ─── */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
}
.tag-fold   { background: rgba(139,148,158,0.2); color: var(--text-muted); }
.tag-raise  { background: rgba(233,69,96,0.2);   color: var(--accent-red); }
.tag-call   { background: rgba(3,218,198,0.15);  color: var(--accent-teal); }
.tag-check  { background: rgba(255,215,0,0.15);  color: var(--accent-gold); }

/* ─── Bot colors ─── */
.bot-claude   { color: #03dac6; }
.bot-gpt      { color: #74aa9c; }
.bot-gemini   { color: #8b6ce7; }
.bot-llama    { color: #ff6b35; }
.bot-grok     { color: #e8a838; }
.bot-deepseek { color: #4a9eff; }

/* ─── Event bar ─── */
.event-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 1rem;
  background: linear-gradient(90deg, var(--bg-elevated, #0f3460) 0%, rgba(233,69,96,0.1) 100%);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  flex-shrink: 0;
}
.event-bar .eb-left   { display: flex; align-items: center; gap: 0.75rem; }
.event-bar .eb-event  { font-weight: 700; color: var(--text-bright); font-size: 0.82rem; }
.event-bar .eb-detail { color: var(--text-muted); }
.event-bar .eb-right  { display: flex; gap: 1.25rem; }
.event-bar .eb-stat   { text-align: center; }
.event-bar .eb-stat .val { font-weight: 700; color: var(--text-bright); font-size: 0.82rem; display: block; }
.event-bar .eb-stat .lbl { color: var(--text-muted); font-size: 0.55rem; text-transform: uppercase; }

/* ─── Board strip ─── */
.board-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(180deg, rgba(15,52,96,0.35) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.board-strip .community { display: flex; gap: 0.5rem; align-items: center; }

.pot-box            { text-align: center; min-width: 80px; }
.pot-box .lbl       { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.pot-box .val       { font-size: 1.1rem; font-weight: 700; color: var(--accent-gold); }

/* ─── Seats strip ─── */
.seats-strip {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.seat-card {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border-right: 1px solid var(--border);
  font-size: 0.72rem;
  min-width: 0;
}
.seat-card:last-child     { border-right: none; }
.seat-card.occupied       { background: rgba(15,52,96,0.25); }
.seat-card.seat-empty     { opacity: 0.5; flex: 0.5; }
.seat-card .sc-name       { font-weight: 700; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-card .sc-stack      { color: var(--text-muted); font-size: 0.72rem; }
.seat-card .sc-cards      { margin: 0.2rem 0; }
.seat-card .sc-bet        { font-size: 0.65rem; color: var(--accent-gold); font-weight: 600; }
.seat-card .sc-action     { margin-top: 0.2rem; }
.seat-card .sc-hud        { font-size: 0.55rem; color: var(--text-muted); margin-top: 0.1rem; }
.seat-card.folded         { opacity: 0.3; }
.seat-card.acting         { background: rgba(255,215,0,0.08); border-top: 2px solid var(--accent-gold); }

.dealer-btn {
  display: inline-block;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  width: 1.1em;
  height: 1.1em;
  line-height: 1.1em;
  text-align: center;
  border-radius: 50%;
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* Round marker in feed */
.log-entry.round-marker {
  justify-content: center;
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.72rem;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0;
}

/* ─── Main content area — fills remaining viewport height ─── */
.content-area {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 0; /* allows flex child to shrink */
  overflow: hidden;
}

.feed-col {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feed-col h3 {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem 0.3rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(48,54,61,0.3);
}
.feed-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 0.75rem;
}

.narr-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(15,52,96,0.1);
}
.narr-col h3 {
  font-size: 0.7rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem 0.3rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(48,54,61,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.commentary-btn {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
}
.commentary-btn.on  { background: rgba(255,215,0,0.15); color: var(--accent-gold); border-color: var(--accent-gold); }
.commentary-btn.off { background: transparent; color: var(--text-muted); }
.narr-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
}

/* ─── Feed entries ─── */
.log-entry {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.25rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(48,54,61,0.15);
}
.log-entry .le-time  { color: var(--text-muted); font-size: 0.6rem; min-width: 32px; }
.log-entry .le-name  { font-weight: 600; min-width: 70px; }
.log-entry .le-chat  { font-style: italic; color: var(--text-primary); }

/* ─── Commentary entries ─── */
.commentary-entry {
  background: rgba(255,215,0,0.04);
  border-radius: var(--radius-sm, 6px);
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.7;
  border-left: 3px solid var(--accent-gold);
  margin-bottom: 0.75rem;
}
.commentary-entry .ce-hand { font-size: 0.65rem; color: var(--accent-gold); font-weight: 600; margin-bottom: 0.25rem; }
.commentary-entry em       { color: var(--accent-gold); font-style: normal; font-weight: 600; }
.commentary-entry .ce-time { font-size: 0.6rem; color: var(--text-muted); margin-top: 0.35rem; }
.commentary-old            { opacity: 0.6; }

/* ─── Info footer ─── */
.info-footer {
  display: flex;
  gap: 1rem;
  padding: 0.3rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.info-footer .val { color: var(--text-bright); font-weight: 600; }

/* Two-voice commentary */
.voice-ace, .voice-wilde { padding: 0.2rem 0; font-size: 0.85rem; line-height: 1.5; }
.voice-ace { color: var(--text-primary); }
.voice-wilde { color: var(--text-muted); font-style: italic; }
.voice-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 0.4rem; }
.voice-ace .voice-label { color: var(--accent-teal); }
.voice-wilde .voice-label { color: var(--accent-gold); }
