/* Load after the component styles. Broadcast canvases keep their fixed geometry. */
body .news-all-clubs[aria-pressed="true"] {
  color: #141414;
  background: #ffdf00;
}
body:not(.is-broadcast) main > *,
body:not(.is-broadcast) .site-sections > *,
body:not(.is-broadcast) .site-sections-links > *,
body:not(.is-broadcast) .news-toolbar > *,
body:not(.is-broadcast) .live-tv-controls > *,
body:not(.is-broadcast) .borderos-panel__controls > *,
body:not(.is-broadcast) .news-club-button,
body:not(.is-broadcast) .news-club-button > span,
body:not(.is-broadcast) .live-tv-team,
body:not(.is-broadcast) .live-tv-score,
body:not(.is-broadcast) .news-selected-club > * {
  min-width: 0;
  max-width: 100%;
}

/* Wide tables and tactical boards scroll inside their own viewport. */
body:not(.is-broadcast) .table-scroll,
body:not(.is-broadcast) .saved-history__scroll,
body:not(.is-broadcast) .match-explorer__table-scroll,
body:not(.is-broadcast) .live-pitch__scroll,
body:not(.is-broadcast) .match-pitches__scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

body:not(.is-broadcast) .prediction-confrontation-card {
  grid-template-rows: minmax(24px, auto) minmax(52px, auto) minmax(72px, auto) auto;
  overflow-x: auto;
}

/* The global table nowrap rule must not leak into the fixed statistics tables. */
body:not(.is-broadcast) .live-tv-stats,
body:not(.is-broadcast) .match-explorer__stats {
  table-layout: fixed;
  white-space: normal;
}
body:not(.is-broadcast) .live-tv-stats th,
body:not(.is-broadcast) .live-tv-stats td,
body:not(.is-broadcast) .match-explorer__stats th,
body:not(.is-broadcast) .match-explorer__stats td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

body:not(.is-broadcast) .live-tv-game {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
body:not(.is-broadcast) .live-tv-team strong,
body:not(.is-broadcast) .live-pitch__team-name,
body:not(.is-broadcast) .news-selected-club,
body:not(.is-broadcast) .news-card,
body:not(.is-broadcast) .news-headline,
body:not(.is-broadcast) .borderos-panel__card,
body:not(.is-broadcast) .borderos-panel__sources,
body:not(.is-broadcast) .audience-note,
body:not(.is-broadcast) .chronicle-entry,
body:not(.is-broadcast) .prediction-confrontation-meta {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
body:not(.is-broadcast) #standings .team-news-link {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
body:not(.is-broadcast) .news-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
}
body:not(.is-broadcast) .live-tv-controls select,
body:not(.is-broadcast) .live-tv-controls input,
body:not(.is-broadcast) .news-toolbar select,
body:not(.is-broadcast) .news-toolbar input,
body:not(.is-broadcast) .borderos-panel__controls select {
  min-width: 0;
  max-width: 100%;
}
body:not(.is-broadcast) .borderos-panel__numbers > div {
  min-width: 0;
  flex-basis: 150px;
}
body:not(.is-broadcast) .borderos-panel__numbers dd {
  overflow-wrap: anywhere;
}

/* Names and feedback may grow without moving or scaling the pitch coordinates. */
body:not(.is-broadcast) .match-pitches__graphic-tools-status,
body:not(.is-broadcast) .match-pitches__owner {
  height: auto;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
body:not(.is-broadcast) .match-pitches__club-coach {
  height: auto;
  overflow: visible;
  overflow-wrap: anywhere;
}
body:not(.is-broadcast) .match-pitches__banner {
  height: auto;
}
body:not(.is-broadcast) .match-pitches__player-name {
  overflow-wrap: anywhere;
}

/* Dialogs retain the entire headline, editor and close action at narrow widths. */
dialog.news-reader,
dialog.chronicle-dialog {
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
dialog.news-reader { max-width: 960px; }
dialog.chronicle-dialog { max-width: 740px; }
.news-reader-top {
  flex-wrap: wrap;
}
.news-reader-top > * {
  min-width: 0;
  max-width: 100%;
}
.news-reader textarea {
  box-sizing: border-box;
  max-width: 100%;
  font: inherit;
  resize: vertical;
}
@supports (height: 100dvh) {
  dialog.news-reader,
  dialog.chronicle-dialog { max-height: calc(100dvh - 24px); }
}

body:not(.is-broadcast) .table-scroll:focus-visible,
body:not(.is-broadcast) .saved-history__scroll:focus-visible,
body:not(.is-broadcast) .match-explorer__table-scroll:focus-visible {
  outline: 3px solid #ffdf00;
  outline-offset: -3px;
}
.news-headline:focus-visible,
.news-reader a:focus-visible,
.chronicle-dialog a:focus-visible {
  outline: 3px solid #ffdf00;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  body:not(.is-broadcast) .news-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body:not(.is-broadcast) .live-pitch__position-status {
    min-width: 0;
    flex-basis: 100%;
  }
}
@media (max-width: 600px) {
  body:not(.is-broadcast) .score-row {
    flex-wrap: wrap;
  }
  body:not(.is-broadcast) .score-row > span:first-child {
    flex-basis: 100%;
  }
  body:not(.is-broadcast) .score-inputs {
    width: 100%;
    justify-content: center;
  }
  body:not(.is-broadcast) .borderos-panel__controls label {
    flex-basis: 170px;
  }
  body:not(.is-broadcast) .live-tv-screen,
  body:not(.is-broadcast) .live-tv--theater .live-tv-screen {
    padding: 14px;
  }
  .news-reader input,
  .news-reader select,
  .news-reader textarea,
  .news-reader-top button {
    font-size: 16px;
    min-height: 44px;
  }
}
@media (max-width: 480px) {
  body:not(.is-broadcast) .news-toolbar,
  body:not(.is-broadcast) .live-tv-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  body:not(.is-broadcast) .news-toolbar label:nth-child(3) {
    grid-column: auto;
  }
  body:not(.is-broadcast) .live-tv-scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body:not(.is-broadcast) .live-tv-score {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}
