/* B-Gjengen CUP Phase 3J — Gather-style panels + knockout mock preview.
   Scope: /cup-preview/ ONLY. No production CSS, APIs, Steam, AMP or RCON.
*/

/* The four homepage sections have one shared Gather-style outer shell. */
.cup-mode-panel {
  min-width:0;
  background:linear-gradient(145deg,#0c130f,#090e0b);
  border:1px solid #28452f;
  border-radius:11px;
  padding:17px 17px 19px;
  box-shadow:0 12px 28px #0003,inset 0 1px 0 #ffffff05;
}
.cup-mode-panel .section-head { margin:0; font-size:22px; }
.cup-mode-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}
.cup-mode-note {color:#92ad99;font-size:11px;white-space:nowrap}

/* Mock-only selector; the real page will have no dev toolbar. */
.demo-bracket-picker {
  display:inline-flex;
  gap:8px;
  align-items:center;
  white-space:nowrap;
  font-size:11px;
  color:#bfd9c5;
}
.demo-bracket-picker[hidden] {display:none!important}
.demo-bracket-picker select {
  min-width:170px;
  border-radius:7px;
  border:1px solid #4f9161;
  background:#12271b;
  color:#d7fce0;
  font-size:11px;
  font-weight:850;
  padding:7px 9px;
}

/* LIVE: state badge is above the card, but inside the overall panel. */
.cup-live-matches { margin-top:22px }
.cup-live-matches .live-row {margin:0;gap:12px;align-items:start}
.cup-live-matches .live-match-slot {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  align-self:start;
  min-width:0;
  gap:7px;
}
.cup-live-matches .match-slot-heading {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:39px;
  text-align:center;
}
.cup-live-matches .live-match-number {
  font-size:12px;
  line-height:15px;
  letter-spacing:.085em;
  color:#e4eee6;
  font-weight:950;
}
.cup-live-matches .match-slot-status {
  display:flex;
  align-items:center;
  justify-content:center;
}
.cup-live-matches .match-slot-status .pill {
  font-size:9px;
  line-height:1;
  padding:4px 8px;
  border-radius:5px;
}
.cup-live-matches .match-slot-status .pill.finished {
  background:#1d512f;
  color:#d9ffdf;
  border-color:#6fb983;
}

/* Card is content-height: one public button = shorter card;
   authorized second button grows ONLY the footer, not the crest/score area. */
.cup-live-matches .match-card,
.cup-live-matches .match-card.ingame,
.cup-live-matches .match-card.upcoming,
.cup-live-matches .match-card.finished {
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-self:start;
  flex:0 0 auto;
  width:100%;
  height:auto;
  min-height:0;
  padding:11px 9px 9px;
  gap:7px;
  border-radius:11px;
}
/* Same matte graphite/green background for UPCOMING and INGAME. */
.cup-live-matches .match-card.ingame,
.cup-live-matches .match-card.upcoming {
  background:radial-gradient(ellipse 90% 95% at 50% -18%,#28372d 0%,#1e2922 55%,#19231d 100%);
}
.cup-live-matches .match-card.ingame {
  border-color:#72b68a;
  box-shadow:0 0 0 1px #62c67d22,0 0 15px #6bdb8a46,0 8px 20px #0007;
}
.cup-live-matches .match-card.upcoming {
  border-color:#48594e;
  box-shadow:0 7px 20px #0005,inset 0 1px 0 #ffffff07;
}
.cup-live-matches .match-card.finished {
  background:radial-gradient(ellipse 90% 115% at 50% -10%,#315741 0%,#203d2c 48%,#19261e 100%);
  border-color:#78c38d;
  box-shadow:0 0 0 1px #88d69c26,0 0 20px #62dd884c,0 8px 24px #0007;
}
/* Photos, names and score have an invariant vertical position even when
   a second OPEN YOUR LOBBY button appears below the Twitch button. */
.cup-live-matches .match-middle {
  flex:0 0 105px;
  height:105px;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(62px,auto) minmax(0,1fr);
  align-items:start;
  gap:5px;
  margin:0;
  padding:0;
}
.cup-live-matches .match-team,
.cup-live-matches .match-card.upcoming .match-team {
  align-self:start;
  justify-self:center;
  padding:5px 4px 4px;
  gap:4px;
  max-width:113px;
}
.cup-live-matches .match-ico,
.cup-live-matches .match-card.upcoming .match-ico {
  width:min(100%,70px);
  font-size:30px;
}
.cup-live-matches .match-team strong {
  color:#f4fff6;
  font-size:clamp(10px,.85vw,13px);
  line-height:1.14;
}
.cup-live-matches .match-center {
  height:83px;
  align-self:start;
  justify-content:center;
  align-content:center;
  gap:3px;
  padding:0;
  margin:0;
}
.cup-live-matches .match-result {font-size:clamp(18px,1.6vw,26px)}
.cup-live-matches .match-map {font-size:clamp(10px,.76vw,12px);line-height:15px}
.cup-live-matches .match-series-label {
  color:#bde6c9;
  font-size:10px;
  line-height:13px;
  font-weight:950;
  letter-spacing:.045em;
  text-align:center;
}
.cup-live-matches .match-footer {
  flex:0 0 auto;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}
.cup-live-matches .match-cta,
.cup-live-matches .match-watch,
.cup-live-matches .match-lobby {
  display:flex;
  align-items:center;
  justify-content:center;
  width:min(100%,190px);
  min-height:27px;
  padding:4px 7px;
  line-height:17px;
  font-size:9px;
  box-sizing:border-box;
}
.cup-live-matches .match-watch {border-color:#675981}
.cup-live-matches .match-lobby {border-color:#4c9665}

/* Playoffs: the previous four match slots are replaced by two, then one.
   Keep the same cards, but enlarge team marks and score for the grand final. */
.cup-live-matches.live-semis .live-row {
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:min(100%,1040px);
  margin:0 auto;
  gap:19px;
}
.cup-live-matches.live-semis .match-middle {grid-template-columns:minmax(0,1fr) minmax(100px,auto) minmax(0,1fr)}
.cup-live-matches.live-semis .match-team {max-width:155px}
.cup-live-matches.live-semis .match-ico {width:min(100%,82px);font-size:38px}
.cup-live-matches.live-semis .match-team strong {font-size:14px}
.cup-live-matches.live-semis .match-result {font-size:30px}
.cup-live-matches.live-final .live-row {
  grid-template-columns:minmax(0,1fr);
  width:min(100%,830px);
  margin:0 auto;
}
.cup-live-matches.live-final .live-match-number {
  font-size:13px;
  color:#d2f0da;
}
.cup-live-matches.live-final .match-card {
  border-color:#759a73;
  background:radial-gradient(ellipse at 50% 0%,#304b37,#17251c 85%);
}
.cup-live-matches.live-final .match-middle {
  height:150px;
  flex-basis:150px;
  grid-template-columns:minmax(0,1fr) minmax(160px,auto) minmax(0,1fr);
  justify-items:center;
  align-items:center;
}
.cup-live-matches.live-final .match-team,
.cup-live-matches.live-final .match-card.upcoming .match-team {align-self:center;max-width:180px;padding:8px}
.cup-live-matches.live-final .match-ico {width:min(100%,104px);font-size:46px}
.cup-live-matches.live-final .match-team strong {font-size:16px}
.cup-live-matches.live-final .match-center {height:auto}
.cup-live-matches.live-final .match-result {font-size:clamp(33px,3.4vw,50px)}
.cup-live-matches.live-final .match-map {font-size:13px}
.cup-live-matches.live-final .match-footer {padding-bottom:4px}
.cup-live-matches.live-final .match-watch,
.cup-live-matches.live-final .match-lobby {width:min(100%,260px);min-height:31px;font-size:10px}

/* TEAMS: identical VIPERS-dark backdrop ONLY in CUP MODE.
   The CUP INFO/TEAMS detail tab keeps eight separate team tint colors. */
.cup-live-teams {margin-top:16px}
.cup-live-teams .team-page-top {margin:0 0 16px}
.cup-live-teams .team-page-top .section-head {margin:0 4px}
.cup-live-teams .team-grid {margin:0}
.cup-live-teams .team-card {
  background:linear-gradient(128deg,#102d1b,#0a110dcf 75%);
  border-color:#294e35;
}
.cup-live-teams .team-card:after {background:#4a9860;opacity:.08}
/* In CUP MODE keep the team emblem's unique color for recognition. */

/* GROUP STANDINGS and GROUP STAGE each receive a full Gather-style shell. */
.cup-live-teams + .live-schedule {margin-top:17px}
.home-cup-schedule {gap:16px}
.cup-standings-panel .standings-area .section-head {margin:0 4px 16px}
.cup-standings-panel .group-standings-grid {gap:14px}
.cup-standings-panel .group-standings {
  background:linear-gradient(145deg,#101b14,#0b130e);
}
.cup-group-stage-panel .rounds-heading {margin:0 0 13px}
.cup-group-stage-panel .rounds-heading .section-head {margin:0 4px}
.cup-group-stage-panel .round-accordion {margin:0}
.cup-group-stage-panel .round-accordion-item {box-shadow:none}
/* Align state + score + map a little higher, with map closer to team names. */
.round-accordion-item .compact-fixture .fixture-center {
  padding-top:0;
  gap:2px;
  transform:translateY(-5px);
}
.round-accordion-item .compact-fixture .fixture-card-middle {align-items:center}
.round-accordion-item .compact-fixture .fixture-team {justify-content:center}

/* Laptop, tablet and phone. */
@media(max-width:1100px){
  .cup-live-matches.live-groups .live-row {grid-template-columns:repeat(2,minmax(0,1fr))}
  .cup-live-matches .match-middle {grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr)}
  .cup-live-matches .match-team strong {font-size:12px}
}
@media(max-width:700px){
  .cup-mode-panel {padding:13px 11px 15px}
  .cup-mode-panel .section-head {font-size:20px}
  .cup-mode-head {align-items:flex-start;flex-wrap:wrap;gap:5px;margin-bottom:12px}
  .cup-mode-note {white-space:normal;margin-left:16px}
  .cup-live-matches .match-slot-heading {min-height:38px}
  .cup-live-matches .match-middle {flex-basis:103px;height:103px;grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr)}
  .cup-live-matches .match-ico {width:min(100%,74px)}
  .cup-live-matches.live-semis .live-row {grid-template-columns:1fr;max-width:420px}
  .cup-live-matches.live-semis .match-middle {grid-template-columns:minmax(0,1fr) 88px minmax(0,1fr)}
  .cup-live-matches.live-final .match-middle {flex-basis:135px;height:135px;grid-template-columns:minmax(0,1fr) 115px minmax(0,1fr)}
  .cup-live-matches.live-final .match-ico {width:min(100%,78px);font-size:35px}
  .cup-live-matches.live-final .match-result {font-size:30px}
  .cup-live-matches.live-final .match-team strong {font-size:12px}
  .cup-live-matches.live-final .match-map {font-size:11px}
  .cup-standings-panel .group-standings-grid {grid-template-columns:1fr}
  .cup-group-stage-panel .rounds-heading {flex-wrap:wrap}
  .cup-group-stage-panel .rounds-heading>span {font-size:10px}
}
@media(max-width:390px){
  .cup-live-matches .match-middle {grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:3px}
  .cup-live-matches.live-final .match-middle {grid-template-columns:minmax(0,1fr) 100px minmax(0,1fr)}
  .cup-live-matches.live-final .match-result {font-size:26px}
  .demo-bracket-picker {white-space:normal;flex-wrap:wrap}
}
