/* Compact matchday layout ported from /opt/manager-spiel/app/index.html.
   Specific selectors override Manager2's legacy card layout, keeping its colours. */
@media (max-width: 1100px) {
  .main { min-width: 0; }
  #currentMatchday, #currentMatchday .current-matchday-wrap, #currentMatchday .panel { min-width: 0; max-width: 100%; }
  #currentMatchday .current-lineup-grid { min-width: 0; grid-template-columns: minmax(0, 1fr); padding: 6px 0; gap: 9px; }
  #currentMatchday .current-lineup-card { min-width: 0; overflow: hidden; }
  #currentMatchday .current-eval-table { min-width: 0 !important; width: 100%; table-layout: fixed; font-size: 7px; }
  #currentMatchday .current-eval-table th,
  #currentMatchday .current-eval-table td { padding: 4px 1px; line-height: 1.05; overflow-wrap: anywhere; }
  #currentMatchday .current-lineup-card .current-eval-table thead th { font-size: 6px !important; }
  #currentMatchday .current-eval-table th:first-child,
  #currentMatchday .current-eval-table td:first-child { width: 27%; padding-left: 4px; }
  #currentMatchday .current-eval-table th:not(:first-child),
  #currentMatchday .current-eval-table td:not(:first-child) { width: auto; }
  #currentMatchday .current-eval-table td:first-child b { font-size: 8px; }
  #currentMatchday .current-lineup-title { padding: 8px; }
  #currentMatchday .current-lineup-title h3 { font-size: 13px; }
  #currentRanking { min-width: 0; }
  #currentRanking .current-ranking { margin: 0 0 12px; overflow: hidden !important; }
  #currentRanking .current-ranking h3 { position: static; font-size: 13px; padding: 9px; }
  #currentRanking .ranking-row {
    display: grid !important;
    grid-template-columns: 68px repeat(14, minmax(0, 1fr));
    min-width: 0 !important; font-size: 6px; line-height: 1.05;
    width: 100%; margin: 0; gap: 0;
    border: 0; border-bottom: 1px solid #d7e2eb;
    border-radius: 0; box-sizing: border-box;
  }
  #currentRanking .ranking-row > span, #currentRanking .ranking-row.manager-rank > span, #currentRanking .ranking-row.header > span {
    grid-column: auto; flex-direction: row;
    align-items: center !important; justify-content: center !important;
    text-align: center !important; min-height: 0 !important;
    min-width: 0; padding: 5px 1px !important;
    font-size: 6px !important; line-height: 1.05 !important;
    overflow-wrap: anywhere; word-break: normal;
  }
  #currentRanking .ranking-row > span:first-child {
    grid-column: auto; justify-content: flex-start !important;
    text-align: left !important; padding-left: 3px !important;
    font-size: 8px !important;
  }
  #currentRanking .ranking-row.header > span, #currentRanking .ranking-row > span:nth-child(n+14) { font-size: 5.5px !important; }
  #currentRanking .ranking-row > span::before { content: none !important; display: none !important; }
  /* These rules must win against the later inline Manager2 desktop styles. */
  #currentMatchday #currentRanking .ranking-row > span {
    font-size: 6px !important; line-height: 1.05 !important;
    min-height: 0 !important; padding: 5px 1px !important;
    white-space: nowrap; overflow-wrap: normal;
  }
  #currentMatchday #currentRanking .ranking-row > span:first-child,
  #currentMatchday #currentRanking .ranking-row > span:first-child b {
    font-size: 8px !important; padding-left: 3px !important;
  }
  #currentMatchday #currentRanking .ranking-row.header > span {
    font-size: 5.5px !important; line-height: 1.05 !important;
    white-space: normal; overflow-wrap: anywhere;
    background: #e3eff7 !important; color: #17394f !important;
  }
  #currentMatchday #currentRanking .ranking-row.header,
  #currentMatchday #currentRanking .ranking-row.manager-rank {
    border-left-width: 0 !important;
  }
}
