/* styles.css — Draft HQ
 *
 * Palette and type are fixed by the SDS design system (see CLAUDE.md).
 * Zilla Slab for headings and team names only. Inter for everything else.
 * The board reads as a 1970s pegboard scoreboard; picks slot in with a short
 * card-drop. That transition is the only motion in the app.
 */

:root {
  --midnight-navy: #0D1B3E;
  --astroturf-green: #2D6A2E;
  --locker-cream: #F2E8D5;
  --pennant-gold: #E0A526;
  --foul-flag-red: #B5322C;
  --chalk: #FFFFFF;

  --surface: #0A1533;
  --surface-2: #132450;
  --line: #24365F;
  --muted: #93A3C7;

  --radius: 6px;
  --pad: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--midnight-navy);
  color: var(--locker-cream);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

h1, h2, h3, .brand-name, .team-name, .cell-player {
  font-family: "Zilla Slab", Georgia, serif;
}

button, input, select { font: inherit; }

:focus-visible {
  outline: 3px solid var(--pennant-gold);
  outline-offset: 2px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  color: var(--chalk);
  background: var(--surface-2);
  border-color: var(--line);
}
.btn:hover { filter: brightness(1.15); }
.btn-primary { background: var(--astroturf-green); border-color: #3C8A3E; width: 100%; }
.btn-danger  { background: transparent; border-color: var(--foul-flag-red); color: #F0A9A5; width: 100%; margin-top: 8px; }
.btn-ghost   { background: transparent; border-color: var(--line); color: var(--locker-cream); padding: 7px 11px; }
.btn-send    { background: var(--surface-2); border-color: var(--line); }

/* ---------- join gate ---------- */

.join {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
}
.join-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.join-title { margin: 0 0 4px; font-size: 28px; color: var(--chalk); }
.join-sub { margin: 0 0 20px; color: var(--muted); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--midnight-navy);
  color: var(--locker-cream);
}
.join-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- shell ---------- */

.app { display: flex; flex-direction: column; min-height: 100%; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand-name { font-size: 19px; font-weight: 700; color: var(--chalk); }
.brand-sub { margin-left: 10px; color: var(--muted); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.whoami { color: var(--muted); font-size: 13px; }

.dlq-badge {
  background: var(--foul-flag-red);
  color: var(--chalk);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

/* Video + chat only. The draft board lives in Sleeper. */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 12px;
  padding: 12px;
  min-height: 0;
}

.pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px var(--pad);
  border-bottom: 1px solid var(--line);
}
.pane-head h2 { margin: 0; font-size: 15px; color: var(--chalk); }

.rail { display: grid; gap: 12px; }

/* ---------- board ---------- */

.onclock { font-size: 13px; font-weight: 600; color: var(--pennant-gold); }
.board-scroll { overflow-x: auto; padding: var(--pad); }
.board { display: grid; gap: 4px; min-width: 760px; }
.board-row { display: grid; grid-template-columns: 44px repeat(10, minmax(66px, 1fr)); gap: 4px; }

.rowlabel {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.headcell {
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--locker-cream);
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell {
  min-height: 46px;
  padding: 5px 6px;
  border-radius: 4px;
  background: #0E1C42;
  border: 1px solid var(--line);
  font-size: 12px;
  overflow: hidden;
}
.cell-empty { opacity: 0.5; }
.cell-player {
  display: block;
  font-weight: 600;
  color: var(--chalk);
  font-size: 12.5px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-meta { display: block; color: var(--muted); font-size: 11px; }

.cell-onclock {
  border-color: var(--pennant-gold);
  background: rgba(224, 165, 38, 0.12);
  box-shadow: inset 0 0 0 1px var(--pennant-gold);
}
.cell-onclock .cell-meta { color: var(--pennant-gold); font-weight: 700; }

/* The one place we spend motion: picks slot in. */
@keyframes card-drop {
  from { transform: translateY(-14px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.cell-dropped { animation: card-drop 220ms cubic-bezier(0.2, 0.8, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
  .cell-dropped { animation: none; }
}

/* ---------- commish ---------- */

.commish-body { padding: var(--pad); }
.commish-onclock {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--pennant-gold);
  font-size: 14px;
}
#pick-form input, #pick-form select {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--midnight-navy);
  color: var(--locker-cream);
}
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-error {
  margin: 10px 0 0;
  padding: 9px;
  border-radius: var(--radius);
  background: rgba(181, 50, 44, 0.18);
  border: 1px solid var(--foul-flag-red);
  color: #F3B7B3;
  font-size: 13px;
}

/* ---------- video ---------- */

.pane-video { display: flex; min-height: 0; }
.video-body { flex: 1; display: flex; min-height: 0; }
.video-empty { margin: auto; color: var(--muted); font-size: 13px; padding: var(--pad); }
.video-body iframe {
  flex: 1;
  width: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* ---------- chat ---------- */

.pane-chat { display: flex; flex-direction: column; min-height: 0; }
.chat-log {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg { font-size: 13.5px; word-wrap: break-word; }
.msg-author { font-weight: 700; color: var(--chalk); }
.msg-system { color: var(--muted); font-style: italic; font-size: 12.5px; }
.msg-bot { border-left: 3px solid var(--astroturf-green); padding-left: 8px; }

.chat-form { display: flex; gap: 8px; padding: var(--pad); border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--midnight-navy);
  color: var(--locker-cream);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--foul-flag-red);
  color: var(--chalk);
  padding: 11px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 50;
  max-width: 90vw;
}

/* ---------- phone ---------- */

.btn-compact { padding: 7px 12px; width: auto; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .video-body iframe { min-height: 300px; }
  .chat-log { min-height: 240px; max-height: 45vh; }
  .topbar { gap: 8px; }
  .topbar-right { flex-wrap: wrap; }
}
[hidden]{display:none !important}
