/* GoalGrid domestic league table qualification zones. */
body[data-page="match"].match-detail-readable .gg-match-standings-legend {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  margin: 0 0 .45rem;
  padding: .42rem .55rem;
  border: 1px solid rgba(124, 159, 184, .12);
  border-radius: 10px;
  background: rgba(3, 12, 20, .38);
}

body[data-page="match"].match-detail-readable .gg-match-standings-legend-title {
  flex: 0 0 auto;
  padding-right: .65rem;
  border-right: 1px solid rgba(124, 159, 184, .14);
  color: #8ca1b4;
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="match"].match-detail-readable .gg-match-standings-legend-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  min-width: 0;
}

body[data-page="match"].match-detail-readable .gg-match-standings-legend-item {
  --zone-color: #8296a8;
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  flex: 0 0 auto;
  color: #b4c4d1;
  font-size: .66rem;
  white-space: nowrap;
}

body[data-page="match"].match-detail-readable .gg-match-standings-legend-item i {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: var(--zone-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--zone-color) 16%, transparent);
}

body[data-page="match"].match-detail-readable .gg-match-standings-legend-item b {
  color: var(--zone-color);
  font-size: .66rem;
  font-variant-numeric: tabular-nums;
}

body[data-page="match"].match-detail-readable :is(.gg-match-standings-legend-item, .gg-match-standings-table .nt-stand-row).zone-cl { --zone-color: #61df91; }
body[data-page="match"].match-detail-readable :is(.gg-match-standings-legend-item, .gg-match-standings-table .nt-stand-row).zone-europe { --zone-color: #35e0c2; }
body[data-page="match"].match-detail-readable :is(.gg-match-standings-legend-item, .gg-match-standings-table .nt-stand-row).zone-europa { --zone-color: #60a5fa; }
body[data-page="match"].match-detail-readable :is(.gg-match-standings-legend-item, .gg-match-standings-table .nt-stand-row).zone-conference { --zone-color: #c084fc; }
body[data-page="match"].match-detail-readable :is(.gg-match-standings-legend-item, .gg-match-standings-table .nt-stand-row).zone-playoff { --zone-color: #f4c95d; }
body[data-page="match"].match-detail-readable :is(.gg-match-standings-legend-item, .gg-match-standings-table .nt-stand-row).zone-relegation { --zone-color: #ff7185; }

body[data-page="match"].match-detail-readable .gg-match-standings-table {
  border-color: rgba(124, 159, 184, .14);
  border-radius: 12px;
  background: rgba(3, 12, 20, .44);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-head {
  padding-block: .46rem;
  background: rgba(124, 159, 184, .07);
  color: #8097aa;
  border-bottom-color: rgba(124, 159, 184, .13);
  font-size: .66rem;
}

body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row {
  position: relative;
  min-height: 2.55rem;
  padding-block: .34rem;
  border-bottom-color: rgba(124, 159, 184, .08);
  cursor: default;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row:hover { background: rgba(124, 159, 184, .055); }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row.active {
  background: linear-gradient(90deg, rgba(53, 224, 194, .115), rgba(53, 224, 194, .045));
  box-shadow: inset 3px 0 0 #35e0c2;
}

body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-pos { justify-content: center; gap: 0; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-pos::before { display: none; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.62rem;
  height: 1.62rem;
  border: 1px solid rgba(124, 159, 184, .18);
  border-radius: 999px;
  background: rgba(124, 159, 184, .06);
  color: #afbeca;
  font-size: .69rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row[class*="zone-"] .nt-stand-rank {
  border-color: color-mix(in srgb, var(--zone-color) 58%, transparent);
  background: color-mix(in srgb, var(--zone-color) 16%, transparent);
  color: var(--zone-color);
}

body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-name { color: #edf4f8; font-size: .77rem; font-weight: 700; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-num { color: #afbfcc; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-gd.is-positive { color: #61df91; font-weight: 700; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-gd.is-negative { color: #ff7185; font-weight: 700; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-pts { color: #fff; font-size: .77rem; }
body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-form-letter {
  min-width: .92rem;
  width: .92rem;
  height: .92rem;
  border-radius: 999px;
  font-size: .53rem;
  letter-spacing: 0;
}

/* Keep the table controls compact: the title and selected buttons already
   communicate the mode, so the repeated helper copy is visually redundant. */
body[data-page="match"].match-detail-readable .nt-standings-section-match:has(.gg-match-standings-table) .gg-md-section-head small,
body[data-page="match"].match-detail-readable .nt-standings-section-match:has(.gg-match-standings-table) > [data-role="league-table-mode-note"] {
  display: none;
}

body[data-page="match"].match-detail-readable .nt-standings-section-match:has(.gg-match-standings-table) .gg-md-section-head {
  padding-bottom: .42rem;
  margin-bottom: .3rem;
}

body[data-page="match"].match-detail-readable .gg-match-standings-controls {
  margin-block: .25rem .38rem;
  padding-block: .2rem;
}

body[data-page="match"].match-detail-readable .gg-match-standings-controls .match-detail-pill-field {
  display: block;
}

body[data-page="match"].match-detail-readable .gg-match-standings-controls .match-detail-pill-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  body[data-page="match"].match-detail-readable .gg-match-standings-controls { width: 100%; }
  body[data-page="match"].match-detail-readable .gg-match-standings-controls .match-detail-pill-field { width: 100%; gap: .35rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-controls .match-detail-pill-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1 1 auto;
  }
  body[data-page="match"].match-detail-readable .gg-match-standings-controls .match-detail-pill-btn { min-width: 0; min-height: 44px !important; padding-inline: .38rem; font-size: .64rem; }
  body[data-page="match"].match-detail-readable .nt-standings-section-match:has(.gg-match-standings-table) .gg-md-section-head { padding-bottom: .3rem; margin-bottom: .22rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-controls { margin-block: .2rem .32rem; padding-block: .15rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-legend { display: flex; padding: .38rem .45rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-legend-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  body[data-page="match"].match-detail-readable .gg-match-standings-legend-items {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: .08rem .1rem .12rem;
    scrollbar-width: none;
  }
  body[data-page="match"].match-detail-readable .gg-match-standings-legend-items::-webkit-scrollbar { display: none; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-head,
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row { padding-inline: .32rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-head { padding-block: .4rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row { min-height: 2.45rem; padding-block: .28rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-rank { width: 1.35rem; height: 1.35rem; font-size: .6rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-team .gg-team-logo-sm,
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-team .gg-team-logo-sm-wrap { width: 1.18rem; height: 1.18rem; flex-basis: 1.18rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-name { font-size: .66rem; }
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-form-letter { min-width: .72rem; width: .72rem; height: .72rem; font-size: .46rem; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="match"].match-detail-readable .gg-match-standings-table .nt-stand-row { transition: none; }
}
