/* LOSERSLEAGUE V15.12 — global table team-identity alignment
   Rule: flags/crests in every standings/statistics table start from one fixed
   left edge inside the team/club cell. Team name length must never recenter
   the badge. Keep this stylesheet last in index.html. */

/* Current competition tables: identify any cell whose direct child is a
   team identity component and force the identity block to the left edge. */
.wc-table td:has(> .wc-team),
.table td:has(> .team-line),
.stats-table td:has(> .team-line),
.ucl-table td:has(> .ucl-team-line),
.ucl-full-stats td:has(> .ucl-team-line),
.og26-group-card table td:has(> .og26-team),
.nhl-table td:has(> .nhl-team) {
  text-align:left !important;
}

/* The identity component itself always occupies the same cell origin.
   No inline-content centering based on the length of the club/country name. */
.wc-table td:has(> .wc-team) > .wc-team,
.table td:has(> .team-line) > .team-line,
.stats-table td:has(> .team-line) > .team-line,
.ucl-table td:has(> .ucl-team-line) > .ucl-team-line,
.ucl-full-stats td:has(> .ucl-team-line) > .ucl-team-line,
.og26-group-card table td:has(> .og26-team) > .og26-team,
.nhl-table td:has(> .nhl-team) > .nhl-team,
.ll-table-team-cell > .wc-team,
.ll-table-team-cell > .og26-team {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* World Cup: ordinary group standings use column 2; best-third-place table
   uses column 3 because QUALIFY and GROUP precede TEAM. */
.wc-table:not(.wc-thirds) th:nth-child(2),
.wc-table:not(.wc-thirds) td:nth-child(2),
.wc-thirds th:nth-child(3),
.wc-thirds td:nth-child(3) {
  text-align:left !important;
}

/* EPL and UCL standings: club column always uses the same left anchor. */
#tableBox .table th:nth-child(2),
#tableBox .table td:nth-child(2),
.ucl-table th:nth-child(2),
.ucl-table td:nth-child(2),
.og26-group-card table th:nth-child(2),
.og26-group-card table td:nth-child(2) {
  text-align:left !important;
}

/* Stable badge boxes prevent optical drift while images load/fallback. */
.wc-table .ll-flag-badge,
.wc-table .wc-flag-image,
.table .club-mark,
.stats-table .club-mark,
.ucl-table .ucl-real-crest,
.ucl-full-stats .ucl-real-crest,
.og26-group-card table .ll-flag-badge,
.og26-group-card table .og26-flag-image,
.nhl-table .nhl-crest {
  flex-shrink:0 !important;
}

/* Mobile keeps the exact same rule. Widths may become smaller, but the
   left origin of the badge never moves row-to-row. */
@media (max-width:700px) {
  .wc-table td:has(> .wc-team),
  .table td:has(> .team-line),
  .stats-table td:has(> .team-line),
  .ucl-table td:has(> .ucl-team-line),
  .ucl-full-stats td:has(> .ucl-team-line),
  .og26-group-card table td:has(> .og26-team),
  .nhl-table td:has(> .nhl-team) {
    text-align:left !important;
  }
}
