/* Shared fixture layout: left team | centered result | right team.
 * Interaction and long-name principles follow 84452cup's schedule_overview;
 * this is an independent LoL adaptation, using this project's theme tokens.
 */
.cup-match-card {
  container-type: inline-size;
}
.cup-match-card .match-teams,
.playoff-pending .match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-block: 18px;
}
.cup-match-card .match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cup-match-card .match-team-b {
  justify-content: flex-end;
  text-align: right;
}
.cup-match-card .match-team .team-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.cup-match-card .match-team-name,
.playoff-pending .match-team-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  font-size: 15px;
  font-weight: 500;
  min-width: 0;
}
.cup-match-card .match-result,
.playoff-pending .match-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 76px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: 600 28px/1.15 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
}
.cup-match-card .score-separator {
  color: var(--muted);
  font-weight: 400;
}
.cup-match-card .score-value {
  min-width: .62em;
}
.cup-match-card .score-value.is-winner {
  color: var(--win);
}
.cup-match-card .match-result-pending,
.playoff-pending .match-result-pending {
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
}
.cup-match-card:hover .match-result {
  border-color: var(--accent);
}
.cup-match-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.playoff-pending {
  container-type: inline-size;
}
.playoff-pending .match-teams {
  width: 100%;
  margin-block: auto;
  padding-block: 12px;
}
.playoff-pending .match-team-b {
  text-align: right;
}
.playoff-pending .match-team-name {
  font-size: 13px;
  font-weight: 400;
  -webkit-line-clamp: 3;
}
.playoff-pending .match-result {
  min-width: 42px;
  font-size: 16px;
  padding: 6px;
}
@container (max-width: 320px) {
  .cup-match-card .match-teams {
    gap: 8px;
    margin-block: 15px;
  }
  .cup-match-card .match-team {
    gap: 7px;
  }
  .cup-match-card .match-team-name {
    font-size: 13px;
  }
  .cup-match-card .match-team .team-mark {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }
  .cup-match-card .match-result {
    min-width: 60px;
    padding: 7px;
    gap: 5px;
    font-size: 24px;
  }
  .cup-match-card .match-result-pending {
    font-size: 18px;
  }
}
@container (max-width: 230px) {
  .cup-match-card .match-team {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 5px;
  }
  .cup-match-card .match-team-b .match-team-name {
    order: 1;
  }
  .cup-match-card .match-team-name {
    min-height: 2.8em;
    max-width: 100%;
    font-size: 12px;
  }
  .cup-match-card .match-teams {
    gap: 5px;
  }
  .cup-match-card .match-result {
    min-width: 54px;
    font-size: 22px;
    padding: 6px;
  }
}
/* Match detail keeps the same team/result/team reading order at every width. */
.match-scoreboard .scoreboard-teams {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(12px, 2vw, 30px);
}
.match-scoreboard .scoreboard-team h1,
.match-scoreboard .scoreboard-team h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.match-scoreboard .scoreboard-score > strong {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 3.2em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.match-scoreboard .scoreboard-score > strong > span {
  margin-inline: .24em;
}
.match-scoreboard .scoreboard-score > small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .05em;
}
.game-panel > .section-heading {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.game-panel .game-result {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.game-panel .game-result > span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.game-panel .game-result > strong {
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--win) 40%, var(--line));
  border-radius: 5px;
  background: color-mix(in srgb, var(--win) 9%, var(--surface));
  color: var(--win);
  white-space: nowrap;
}
.game-panel .battle-side-head > span {
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--side) 45%, var(--line));
  border-radius: 4px;
  background: color-mix(in srgb, var(--side) 12%, var(--surface));
  color: var(--side);
  font-weight: 500;
}
.game-panel .battle-side-head h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .match-scoreboard .scoreboard-teams {
    gap: 10px;
  }
  .match-scoreboard .scoreboard-score > strong {
    font-size: 30px;
    min-width: 2.8em;
  }
  .match-scoreboard .scoreboard-team h1,
  .match-scoreboard .scoreboard-team h2 {
    font-size: 16px;
  }
  .cup-match-card .match-meta {
    gap: 8px;
    font-size: 10px;
  }
  .game-panel > .section-heading {
    align-items: flex-start;
  }
  .game-panel .game-result {
    flex-direction: row;
    gap: 6px;
    max-width: 45%;
  }
  .game-panel .game-result > strong,
  .game-panel .game-result > span {
    padding: 5px 7px;
    font-size: 10px;
  }
  .game-panel .battle-side-head > span {
    padding: 4px 7px;
    font-size: 11px;
  }
}
