/* B-Gjengen CUP — Phase 3H: Photoshop-inspired match cards
   Mock preview styling ONLY. No real lobby auth / MatchZy / API integration.
   Loaded after cup.css, before cup-embed.css. Scoped to CUP classes.
*/

/* ── LIVE MATCHES: four broadcast cards ───────────────────────────────── */
.cup-live-matches { margin-top: 22px; }
.cup-live-matches > .section-head { margin: 0 4px 14px; }
.cup-live-matches .section-note { font-size: 11px; letter-spacing: .02em; }
.cup-live-matches .live-row {
  margin-top: 0;
  gap: 13px;
  align-items: stretch;
}

.cup-live-matches .match-card,
.cup-live-matches .match-card.ingame,
.cup-live-matches .match-card.finished,
.cup-live-matches .match-card.upcoming {
  isolation: isolate;
  position: relative;
  overflow: visible;
  min-width: 0;
  min-height: 296px;
  display: grid;
  grid-template-rows: 37px 1fr 43px;
  gap: 0;
  padding: 18px 14px 12px;
  border-radius: 15px;
  border: 1px solid #43594b;
  background: radial-gradient(ellipse 95% 68% at 50% 0%, #2c4434 0%, #232d27 48%, #19211c 100%);
  box-shadow: inset 0 1px 0 #ffffff0b, 0 10px 25px #0004;
}
.cup-live-matches .match-card.ingame {
  border-color: #75b786;
  background: radial-gradient(ellipse 100% 75% at 50% -5%, #385d44 0%, #27372d 44%, #1b221e 100%);
  box-shadow: 0 0 0 1px #7de69a33, 0 0 18px #65e98b5c,
              0 7px 23px #0007, inset 0 1px 0 #ffffff22;
}
.cup-live-matches .match-card.finished {
  border-color: #7fc691;
  background: radial-gradient(ellipse 115% 83% at 50% 25%, #4baf63 0%, #327c45 33%, #223b29 68%, #1a231d 100%);
  box-shadow: 0 0 0 1px #b8ffd278, 0 0 23px #68f19274,
              0 8px 28px #0007, inset 0 1px 0 #ffffff2a;
}
.cup-live-matches .match-card.upcoming {
  border-color: #595452;
  background: radial-gradient(ellipse 105% 100% at 50% -18%, #553837 0%, #302e2b 57%, #202622 100%);
  box-shadow: inset 0 1px 0 #ffffff0d, 0 9px 22px #0004;
}

/* The status is always centered, never competing with match metadata. */
.cup-live-matches .match-head {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  text-align: center;
}
.cup-live-matches .match-head .pill {
  font-size: 11px;
  font-weight: 950;
  padding: 7px 11px;
  line-height: 1;
  border-radius: 8px;
  box-shadow: 0 1px 2px #0007;
}
.cup-live-matches .match-head .pill.ingame { border-color: #b5573c; background: #893a27; }
.cup-live-matches .match-head .pill.finished { border-color: #6dbc7d; background: #235d35; color: #e2ffe7; }
.cup-live-matches .match-head .pill.upcoming { border-color: #626f67; background: #313c36; color: #d7ddd9; }

/* Left emblem, centered score/map, right emblem. */
.cup-live-matches .match-middle {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(78px,auto) minmax(0,1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
}
.cup-live-matches .match-team {
  --side-glow: #e77e69;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: 100%;
  max-width: 141px;
  justify-self: start;
  padding: 11px 6px 8px;
  border: 1px solid #ffffff09;
  border-radius: 14px;
  background: linear-gradient(155deg,#222c27ed,#121c18f2);
  box-shadow: inset 0 0 20px #ffffff06;
}
.cup-live-matches .match-team.side-right { --side-glow: #676cff; justify-self: end; }
.cup-live-matches .match-card.upcoming .match-team {
  max-width: 115px;
  padding: 7px 5px 5px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.cup-live-matches .match-ico {
  display: grid;
  place-items: center;
  width: min(100%,94px);
  aspect-ratio: 1;
  height: auto;
  border: 2px solid color-mix(in srgb, var(--side-glow) 72%, #25342b);
  border-radius: 23px;
  background: #131d17;
  font-size: clamp(27px, 2.5vw, 43px);
  line-height: 1;
  text-shadow: 0 0 11px currentColor;
  box-shadow: 0 0 0 5px #0b100e99, 0 0 13px 5px var(--side-glow), inset 0 0 15px #000a;
}
.cup-live-matches .match-card.upcoming .match-ico {
  width: min(100%,94px);
  border-color: #42604d;
  box-shadow: none;
  text-shadow: none;
}
.cup-live-matches .match-team strong {
  min-width: 0;
  max-width: 100%;
  color: #fff;
  font-size: clamp(11px, .97vw, 15px);
  font-weight: 1000;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 6px #000d;
}
.cup-live-matches .match-center {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
}
.cup-live-matches .match-result {
  color: #f7fff9;
  font-size: clamp(19px, 2.05vw, 34px);
  font-weight: 1000;
  letter-spacing: -.03em;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 7px #08180dd9;
}
.cup-live-matches .match-map {
  min-height: 18px;
  margin: 0;
  color: #dae9dc;
  font-size: clamp(10px,.87vw,14px);
  letter-spacing: .04em;
  line-height: 18px;
  font-weight: 900;
}
.cup-live-matches .match-card.upcoming .match-result { font-size: clamp(23px,2.1vw,34px); }
.cup-live-matches .match-card.finished .match-team.winner-team .match-ico {
  border-color: #94ffb1;
  background: #1a4b2a;
  box-shadow: 0 0 0 5px #0d2115b8, 0 0 20px 7px #78ff9f99, inset 0 0 16px #57df7a33;
}
.cup-live-matches .match-card.finished .match-team.loser-team .match-ico {
  border-color: #e86761;
  background: #2d191a;
  box-shadow: 0 0 0 5px #2010139c, 0 0 14px 5px #ed605477, inset 0 0 14px #a73b3b45;
}
.cup-live-matches .match-card.finished .match-team strong { color: #f1fff3; }

/* The button exists ONLY when the mock player or SUPREME LEADER can enter. */
.cup-live-matches .match-footer {
  display: flex;
  align-items: end;
  justify-content: center;
  min-width: 0;
}
.cup-live-matches .match-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%,225px);
  min-height: 34px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #5e9d70;
  border-radius: 7px;
  background: linear-gradient(180deg,#1b472a,#122a1b);
  color: #dcffe5;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.cup-live-matches .match-cta:hover,
.cup-live-matches .match-cta:focus-visible {
  border-color: #a0ffbb;
  background: #22633a;
  transform: translateY(-1px);
}
.cup-live-matches .match-cta:focus-visible { outline: 2px solid #b9ffcc; outline-offset: 2px; }

/* ── GROUP STAGE: compact cards with the same visual language ─────────── */
.round-accordion-item .fixture.compact-fixture {
  position: relative;
  isolation: isolate;
  min-height: 163px;
  display: grid;
  grid-template-rows: 27px minmax(0,1fr);
  gap: 4px;
  padding: 10px 9px 12px;
  background: radial-gradient(ellipse at 50% -30%, #324237, #19221d 72%);
  border: 1px solid #526659;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #ffffff0d;
}
.round-accordion-item .fixture.compact-fixture.ingame {
  border-color: #65a777;
  background: radial-gradient(ellipse at 50% -35%, #315742, #1a2b22 80%);
  box-shadow: 0 0 11px #61ec8c3b, inset 0 1px 0 #ffffff15;
}
.round-accordion-item .fixture.compact-fixture.finished {
  border-color: #569866;
  background: radial-gradient(ellipse at 50% -20%, #3d9654, #244d32 62%, #183023 100%);
  box-shadow: 0 0 9px #47d87926, inset 0 1px 0 #ffffff11;
}
.round-accordion-item .fixture.compact-fixture.upcoming {
  border-color: #57605a;
  background: radial-gradient(ellipse at 50% -35%, #3c3f3b, #252d28 84%);
  box-shadow: none;
}
.round-accordion-item .compact-fixture .fixture-top {
  justify-content: center;
  text-align: center;
  margin: 0;
}
.round-accordion-item .compact-fixture .pill {
  font-size: 9px;
  font-weight: 900;
  padding: 4px 7px;
  line-height: 1;
}
.round-accordion-item .compact-fixture .fixture-card-middle {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(66px,auto) minmax(0,1fr);
  gap: 5px;
  align-items: center;
  text-align: center;
}
.round-accordion-item .compact-fixture .fixture-team {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 7px;
}
.round-accordion-item .compact-fixture .fixture-crest {
  display: grid;
  place-items: center;
  width: min(100%,53px);
  aspect-ratio: 1;
  border: 1px solid #526857;
  border-radius: 12px;
  background: #15231b;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 0 8px currentColor;
}
.round-accordion-item .compact-fixture.ingame .fixture-crest {
  border-color: #749581;
  box-shadow: 0 0 9px #6de89238;
}
.round-accordion-item .compact-fixture.finished .fixture-team.winner-team .fixture-crest {
  border-color: #9af7b1;
  box-shadow: 0 0 12px #8bffc469;
  background: #15492a;
}
.round-accordion-item .compact-fixture.finished .fixture-team:not(.winner-team) .fixture-crest {
  opacity: .78;
}
.round-accordion-item .compact-fixture .fixture-team strong {
  width: 100%;
  min-width: 0;
  color: #f2fff5;
  font-size: clamp(10px,.88vw,13px);
  line-height: 1.2;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.round-accordion-item .compact-fixture .fixture-center {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.round-accordion-item .compact-fixture .fixture-score {
  color: #f8fff9;
  font-size: clamp(16px,1.38vw,23px);
  line-height: 1;
  letter-spacing: -.025em;
  font-weight: 1000;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.round-accordion-item .compact-fixture.upcoming .fixture-score { font-size: 20px; }
.round-accordion-item .compact-fixture .fixture-map {
  min-height: 15px;
  margin: 0;
  color: #c5dfca;
  font-size: clamp(9px,.74vw,12px);
  line-height: 15px;
  letter-spacing: .02em;
  font-weight: 900;
  text-transform: uppercase;
}

/* Still one halo around the CURRENT round shell, never the other rounds. */
.round-accordion-item.ingame {
  border-color: #4a9660;
  box-shadow: 0 0 0 1px #39e05f1a,
              0 0 22px #39e05f36,
              0 12px 28px #0005;
}

/* Responsive: cards remain usable at laptop and mobile widths. */
@media (max-width: 1350px) {
  .cup-live-matches .match-card { padding-left: 9px; padding-right: 9px; }
  .cup-live-matches .match-middle { grid-template-columns: minmax(0,1fr) minmax(63px,auto) minmax(0,1fr); gap: 3px; }
  .cup-live-matches .match-ico { width: min(100%,78px); }
  .cup-live-matches .match-team { padding: 10px 4px 7px; }
}
@media (max-width: 1100px) {
  .cup-live-matches .live-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cup-live-matches .match-card, .cup-live-matches .match-card.ingame,
  .cup-live-matches .match-card.finished, .cup-live-matches .match-card.upcoming { min-height: 290px; }
  .cup-live-matches .match-ico { width: min(100%,98px); }
  .cup-live-matches .match-team strong { font-size: 14px; }
  .round-accordion-item .compact-fixture .fixture-team strong { font-size: 13px; }
}
@media (max-width: 700px) {
  .cup-live-matches { margin-top: 17px; }
  .cup-live-matches > .section-head { font-size: 20px; flex-wrap: wrap; }
  .cup-live-matches .section-note { width: 100%; margin: -5px 0 0 16px; }
  .cup-live-matches .live-row { grid-template-columns: 1fr; gap: 15px; }
  .cup-live-matches .match-card, .cup-live-matches .match-card.ingame,
  .cup-live-matches .match-card.finished, .cup-live-matches .match-card.upcoming { min-height: 266px; padding: 13px 12px 10px; }
  .cup-live-matches .match-ico { width: min(100%,95px); font-size: 35px; }
  .cup-live-matches .match-middle { grid-template-columns: minmax(0,1fr) minmax(80px,auto) minmax(0,1fr); gap: 6px; }
  .cup-live-matches .match-result { font-size: 27px; }
  .cup-live-matches .match-map { font-size: 12px; }
  .cup-live-matches .match-team strong { font-size: 13px; }
  .round-accordion-item .fixture.compact-fixture { min-height: 168px; }
  .round-accordion-item .compact-fixture .fixture-crest { width: min(100%,60px); font-size: 31px; }
  .round-accordion-item .compact-fixture .fixture-score { font-size: 23px; }
  .round-accordion-item .compact-fixture .fixture-team strong { font-size: 13px; }
}
@media (max-width: 390px) {
  .cup-live-matches .match-middle { grid-template-columns: minmax(0,1fr) 74px minmax(0,1fr); gap: 3px; }
  .cup-live-matches .match-ico { width: min(100%,77px); font-size: 29px; }
  .cup-live-matches .match-team strong { font-size: 12px; }
  .cup-live-matches .match-result { font-size: 22px; }
  .round-accordion-item .compact-fixture .fixture-score { font-size: 19px; }
}
