/* league_view.css — per-league standings + scarcity + scout modal.
 *
 * Shared .section/.match/.alert/.arch-* primitives live in base.css.
 * This file holds only the league-view-specific bits.
 */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.lv-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.lv-empty-state h2 {
  color: var(--text-2);
  margin-bottom: 8px;
}

.lv-empty-state button {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent) 100%);
  border: 0;
  color: white;
  padding: 9px 20px;
  margin-top: 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 255, 0.28);
}
.lv-empty-state button:hover { filter: brightness(1.08); }

.standings table { width: 100%; border-collapse: collapse; font-size: 12px; }

.standings th {
  text-align: left;
  padding: 6px;
  border-bottom: 1px solid var(--stroke);
  color: var(--text-muted);
  font-weight: normal;
}

.standings td {
  padding: 6px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.standings tr.focus { background: rgba(243, 156, 44, 0.08); }
.focus-marker       { color: var(--accent); }

.pos-row {
  display: flex;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
}

.pos-row .pos { width: 30px; font-weight: 600; }
.pos-row .val { font-family: var(--font-mono); }

.rank-good { color: var(--accent-good); }
.rank-mid  { color: var(--accent-warn); }
.rank-bad  { color: var(--accent-bad); }

#scout-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
}

#scout-modal-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.scout-modal-card {
  position: relative;
  max-width: 700px;
  margin: 40px auto;
  background: var(--bg-panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-modal);
  animation: riseIn .35s cubic-bezier(.21,.6,.35,1) both;
}

.scout-modal-head {
  position: sticky;
  top: 0;
  background: rgba(21,21,26,0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 13px 18px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scout-modal-head span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scout-modal-head button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- graded trade feed (moved from My Team dashboard) ---------- */
.lv-trades-section { margin-top: 22px; }
.lv-trades-section h2 { margin-bottom: 14px; }
.lv-trade { border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; background: var(--bg-panel); }
.lv-trade-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lv-trade-verdict { font-weight: 700; color: var(--accent-gold); font-size: 14px; }
.lv-trade-teams { display: flex; align-items: stretch; gap: 12px; }
.lv-trade-team { flex: 1; }
.lv-trade-team-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.lv-trade-name { font-weight: 600; font-size: 14px; }
.lv-trade-got { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.lv-trade-vs { align-self: center; color: var(--text-faint); font-size: 18px; }
.lv-tgrade { font-family: var(--font-mono); font-weight: 700; font-size: 13px; padding: 1px 8px; border-radius: 6px; }
.lv-tgrade.g-elite { color: #0a0d14; background: var(--accent-gold); }
.lv-tgrade.g-good  { color: var(--accent-good); background: rgba(74,222,128,0.12); }
.lv-tgrade.g-poor  { color: var(--accent-bad); background: rgba(255,93,87,0.10); }
@media (max-width: 600px) {
  main { padding: 14px; }
  .lv-trade-teams { flex-direction: column; }
  .lv-trade-vs { transform: rotate(90deg); }
  /* The standings table (8 columns) and the graded-trades table can't fit a
     phone width. Scroll them within their own box instead of forcing the whole
     PAGE to scroll sideways. The min-width forces the overflow so the scroll
     actually engages rather than the columns crushing to nothing. */
  .standings, .lv-trades-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .standings table, .lv-trades-section table { min-width: 600px; }
}

/* Manager-ELO badge in the standings Owner/ELO column */
.elo-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(243, 156, 44, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.elo-badge.elo-prov {
  color: var(--accent-warn);
  background: rgba(224, 169, 58, 0.12);
}
