/* B-Gjengen CUP Phase 3K — one broadcast link + spectator lobby stats.
   Preview-only CSS. Does not change Gather, MatchZy or server behavior.
*/

/* One Twitch link shared by the whole CUP stage, never per match. */
.cup-live-matches .cup-mode-head {
  align-items:center;
  gap:16px;
}
.cup-live-matches .cup-broadcast-head {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:11px;
  min-width:0;
}
.cup-live-matches .cup-broadcast-head .section-head {
  margin:0;
  white-space:nowrap;
}
.cup-live-matches .cup-broadcast-separator {
  font-size:18px;
  font-weight:750;
  color:#5a8568;
  line-height:1;
}
.cup-live-matches .cup-stream-link {
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#cbb9f5;
  font-size:clamp(11px,.88vw,14px);
  line-height:1.35;
  font-weight:900;
  letter-spacing:.035em;
  text-decoration:none;
  border-bottom:1px solid #735c97;
  padding:3px 1px 2px;
  transition:color .15s,border-color .15s;
}
.cup-live-matches .cup-stream-link:hover {
  color:#f0e3ff;
  border-color:#d1acff;
}
.cup-live-matches .cup-stream-link:focus-visible {
  outline:2px solid #c4a3f9;
  outline-offset:4px;
  border-radius:3px;
}
/* One OPEN LOBBY action on every match; the JS checks preview permissions. */
.cup-live-matches .match-footer {
  min-height:29px;
}
.cup-live-matches .match-lobby {
  border-color:#477956;
  background:linear-gradient(180deg,#1a3c26,#142a1b);
  color:#e3f9e9;
}
.cup-live-matches .match-lobby:hover,
.cup-live-matches .match-lobby:focus-visible {
  border-color:#7fdd9b;
  background:#225735;
}
.cup-live-matches .match-card.finished .match-lobby {
  background:#183d29;
  border-color:#6f9b7b;
}

/* The spectator lobby unfolds BELOW the live card row but remains within
   the same Gather-style outer LIVE MATCHES panel. It is never a real join UI. */
.cup-spectator-panel {
  width:100%;
  min-width:0;
  box-sizing:border-box;
  margin-top:20px;
  padding:17px 16px 15px;
  border:1px solid #3a6b49;
  border-radius:11px;
  background:linear-gradient(160deg,#111d15,#0a120d);
  box-shadow:0 8px 25px #0007,inset 0 1px 0 #ffffff08;
}
.cup-spectator-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding:0 1px 12px;
  margin-bottom:14px;
  border-bottom:1px solid #263f2d;
}
.cup-spectator-head strong {
  font-size:14px;
  letter-spacing:.05em;
  color:#e8fff0;
  font-weight:950;
}
.cup-spectator-head span {
  font-size:10px;
  line-height:1.4;
  font-weight:800;
  letter-spacing:.035em;
  color:#a0b3a5;
}
.cup-spectator-content {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(130px,.42fr) minmax(0,1fr);
  align-items:stretch;
  gap:14px;
}
.cup-spectator-team {
  min-width:0;
  border:1px solid #31513a;
  border-radius:9px;
  background:linear-gradient(150deg,#14251a,#0c1610);
  padding:13px 12px 10px;
}
.cup-spectator-team h3 {
  margin:0 0 11px;
  text-align:center;
  font-size:16px;
  font-weight:950;
  color:#e6ffeb;
}
.cup-spectator-table-wrap {
  min-width:0;
  overflow-x:auto;
}
.cup-spectator-team table {
  width:100%;
  min-width:250px;
  table-layout:fixed;
  border-collapse:collapse;
  color:#e0f0e3;
  font-variant-numeric:tabular-nums;
}
.cup-spectator-team th,
.cup-spectator-team td {
  padding:9px 8px;
  text-align:right;
  border-bottom:1px solid #284231;
  font-size:12px;
  white-space:nowrap;
}
.cup-spectator-team thead th {
  font-size:10px;
  font-weight:950;
  color:#9ec6ab;
  letter-spacing:.07em;
  padding-top:3px;
}
.cup-spectator-team th:first-child {text-align:left;width:43%}
.cup-spectator-team tbody th {
  color:#f2fff5;
  overflow:hidden;
  text-overflow:ellipsis;
  font-weight:850;
}
.cup-spectator-team tbody tr:last-child th,
.cup-spectator-team tbody tr:last-child td {border-bottom:0}
.cup-spectator-result {
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:10px;
  padding:12px 3px;
  text-align:center;
}
.cup-spectator-result > strong {
  color:#f4fff6;
  font-size:clamp(23px,2.5vw,38px);
  font-weight:1000;
  letter-spacing:-.035em;
  white-space:nowrap;
  text-shadow:0 1px 9px #0008;
}
.cup-spectator-result > span:nth-of-type(2) {
  color:#b9ddc3;
  font-size:clamp(11px,1vw,15px);
  font-weight:950;
  letter-spacing:.05em;
  overflow-wrap:anywhere;
}
.cup-spectator-result > small {
  color:#85b495;
  font-size:10px;
  font-weight:850;
  letter-spacing:.055em;
}
.cup-spectator-actions {
  display:flex;
  justify-content:center;
  padding-top:16px;
}
.cup-spectator-close {
  min-height:34px;
  width:min(100%,190px);
  padding:7px 18px;
  border-color:#528765;
  color:#e5fce9;
  cursor:pointer;
}
.cup-spectator-close:hover,
.cup-spectator-close:focus-visible {border-color:#9df5ae;background:#235036}
.cup-spectator-close:focus-visible {outline:2px solid #b9ffcc;outline-offset:3px}

@media(max-width:1100px){
  .cup-spectator-content {grid-template-columns:minmax(0,1fr) minmax(96px,.38fr) minmax(0,1fr);gap:9px}
  .cup-spectator-team {padding:10px 7px}
  .cup-spectator-team th,.cup-spectator-team td {padding:8px 4px;font-size:11px}
  .cup-spectator-result > strong {font-size:24px}
}
@media(max-width:700px){
  .cup-live-matches .cup-mode-head {align-items:flex-start}
  .cup-live-matches .cup-broadcast-head {gap:7px;align-items:center}
  .cup-live-matches .cup-broadcast-separator {font-size:14px}
  .cup-live-matches .cup-stream-link {font-size:11px}
  .cup-spectator-panel {margin-top:14px;padding:13px 9px}
  .cup-spectator-content {
    grid-template-columns:minmax(0,1fr);
    gap:11px;
  }
  .cup-spectator-result {
    order:0;
    padding:6px 0;
    gap:4px;
  }
  .cup-spectator-team:first-child {order:1}
  .cup-spectator-team:last-child {order:2}
  .cup-spectator-result > strong {font-size:26px}
  .cup-spectator-team table {min-width:0}
  .cup-spectator-team th,.cup-spectator-team td {font-size:12px}
  .cup-spectator-head span {font-size:9px}
}
@media(max-width:390px){
  .cup-live-matches .cup-broadcast-head .section-head {font-size:18px}
  .cup-live-matches .cup-stream-link {font-size:10px}
  .cup-spectator-team th,.cup-spectator-team td {padding:7px 4px}
}
