/* Public rating match list: stable horizontal alignment and national colours.
   Loaded last; deliberately scoped to /ratings.html only. */

/* v23's public blue theme intentionally used !important white opponent badges.
   Restore the country palette already shipped in team-colors.json, without
   changing the rest of the light-blue match card. */
body.public-home-v670 .latest-wrap .match-opponent,
body.public-home-v670 .past-wrap .match-opponent,
body.public-home-v670 .opponent-brazil .match-opponent {
  background-color: var(--opponent-soft, #f3f7fb) !important;
  border: 1px solid var(--opponent-accent, #b4c8db) !important;
  color: var(--opponent-text, #21466c) !important;
  box-shadow: inset 3px 0 0 var(--opponent-accent, #b4c8db);
}

/* Two action buttons on the latest game and one on older games used to
   produce different available score-column widths. Give all rows identical
   grid columns, and keep the central score assembly fixed in place. */
/* Desktop: six stable columns for both the two-button latest row and the
   one-button past rows. Minimum total width is 785px, below the desktop
   content width at this breakpoint. The score block gets >=350px so its
   inner 328px grid plus cell padding never overflows. */
@media (min-width: 981px) {
  body.public-home-v670 .latest-wrap .match-row,
  body.public-home-v670 .past-wrap .match-row {
    grid-template-columns: 72px 80px minmax(350px, 1fr) 78px 60px 145px;
  }
}
/* Narrow desktop: reduce score block in step with available card width.
   Minimum total is 733px (fits the 821px viewport's content area). */
@media (min-width: 821px) and (max-width: 980px) {
  body.public-home-v670 .latest-wrap .match-row,
  body.public-home-v670 .past-wrap .match-row {
    grid-template-columns: 70px 80px minmax(316px, 1fr) 76px 56px 135px;
  }
  body.public-home-v670 .match-score {
    grid-template-columns: 62px 64px minmax(0, 1fr);
    column-gap: 4px;
    max-width: 316px;
  }
  body.public-home-v670 .match-score > div { width: 64px; }
  body.public-home-v670 .match-actions .btn { padding-left: 6px; padding-right: 6px; }
}

@media (min-width: 821px) {
  body.public-home-v670 .match-competition {
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  body.public-home-v670 .match-score > div {
    position: relative;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.public-home-v670 .match-score .score-box {
    line-height: 30px;
  }
  body.public-home-v670 .match-score .pk-note {
    position: absolute;
    top: 31px;
    left: 0;
    right: 0;
    margin-top: 0;
    line-height: 11px;
  }
  body.public-home-v670 .match-actions {
    justify-content: flex-end;
  }
}

/* Mobile keeps the original stacked card layout; only badge colour changes. */
