/* Batch 7A: late, scoped corrections for confirmed plugin-owned regressions. */

.cx-match-card,
.cx-match-card > *,
.cx-match-card .cx-card-link-wrapper,
.cx-match-card .cx-match-teams,
.cx-match-card .cx-match-team {
  min-width: 0;
  max-width: 100%;
}

.cx-match-card .cx-card-link-wrapper {
  display: block !important;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.cx-match-card .cx-match-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  width: 100%;
}

.cx-match-card .cx-team-identity {
  min-width: 0;
  max-width: 100%;
}

.cx-match-card .cx-team-score {
  min-width: 0;
  max-width: 100%;
  line-height: 1.35;
  text-align: right;
}

.cx-live-filter-tabs {
  min-width: 0;
  max-width: 100%;
}

.cx-live-filter-tabs .lcw-fixture-status-btn {
  min-width: 0 !important;
  gap: 4px !important;
  white-space: nowrap;
}

.cx-live-filter-tabs .lcw-fixture-status-btn > span:first-child {
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit;
}

.cx-live-filter-tabs .lcw-fixture-status-btn > span:last-child,
.cx-live-filter-tabs .lcw-fixture-status-btn > b:last-child {
  min-width: 18px;
  height: 18px;
  margin-left: 0 !important;
  padding: 0 5px;
  font-size: 10px;
}

.cx-team-hero .cx-team-hero-main {
  min-width: 0;
}

.cx-team-hero .cx-team-hero-identity {
  min-width: 0;
}

.cx-team-hero .cx-flag-wrap.cx-team-logo-lg {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 88px !important;
  width: 88px !important;
  min-width: 88px !important;
  height: 88px !important;
  min-height: 88px !important;
  padding: 10px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(19, 45, 66, 0.16);
}

.cx-team-hero .cx-flag-wrap.cx-team-logo-lg img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  object-fit: contain !important;
}

.cx-team-hero .cx-team-ranking-grid {
  width: min(100%, 360px);
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  overflow: visible;
}

.cx-team-hero .cx-team-ranking-tile {
  min-width: 0;
}

.lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-country {
  line-height: 1.3;
  text-overflow: clip;
}

.lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-country img {
  width: 24px !important;
  height: 24px !important;
  margin-right: 4px;
  object-fit: contain !important;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .cx-live-filter-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px !important;
    width: 100%;
    overflow: visible !important;
  }

  .cx-live-filter-tabs .lcw-fixture-status-btn {
    width: 100%;
    padding: 9px 6px !important;
    flex: none !important;
    font-size: 12px !important;
  }

  .cx-match-card .cx-match-team {
    grid-template-columns: minmax(76px, 0.8fr) minmax(0, 1.2fr);
  }

  .cx-match-card .cx-team-score {
    white-space: normal;
  }

  .cx-match-card .cx-match-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .cx-match-card .cx-match-actions .cx-btn-primary {
    grid-column: auto;
  }

  .cx-match-card .cx-match-actions .cx-btn {
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 11px;
  }

  .cx-team-hero {
    padding: 20px !important;
  }

  .cx-team-hero .cx-team-hero-main {
    align-items: stretch;
    gap: 18px;
  }

  .cx-team-hero .cx-team-hero-identity {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .cx-team-hero .cx-flag-wrap.cx-team-logo-lg {
    flex-basis: 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    height: 72px !important;
    min-height: 72px !important;
    padding: 8px !important;
  }

  .cx-team-hero .cx-team-hero-identity h1 {
    margin-top: 0;
    font-size: 29px;
  }

  .cx-team-hero .cx-team-ranking-grid {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    overflow: visible;
    padding: 0;
  }

  .cx-team-hero .cx-team-ranking-tile {
    min-width: 0;
    padding: 12px 8px;
  }

  .cx-team-hero .cx-team-ranking-tile strong {
    font-size: 22px;
  }

  .cx-team-hero .cx-team-ranking-tile small {
    font-size: 10px;
    line-height: 1.3;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-country,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-country {
    width: 96px !important;
    max-width: 96px;
    white-space: normal;
    overflow: visible;
    overflow-wrap: normal;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table {
    width: 100%;
    table-layout: fixed;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td {
    box-sizing: border-box;
    padding-right: 4px !important;
    padding-left: 4px !important;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-pos,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-pos {
    width: 38px !important;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-player,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-player {
    width: auto !important;
    min-width: 0;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-rating,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-rating {
    width: 52px !important;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th {
    font-size: 10px;
  }

  .lcw-ranking-v3 .lcw-rank-player-cell {
    min-width: 0;
    gap: 6px;
  }

  .lcw-ranking-v3 .lcw-rank-player-cell a {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 600px) and (max-width: 768px) {
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-pos,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-pos {
    width: 44px !important;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-country,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-country {
    width: 124px !important;
    max-width: 124px;
  }

  .lcw-ranking-v3.lcw-rank-player-view .lcw-table th.lcw-col-rating,
  .lcw-ranking-v3.lcw-rank-player-view .lcw-table td.lcw-col-rating {
    width: 64px !important;
  }
}

@media (max-width: 380px) {
  .cx-live-filter-tabs .lcw-fixture-status-btn {
    padding-right: 4px !important;
    padding-left: 4px !important;
    font-size: 11px !important;
  }

  .cx-team-hero {
    padding: 18px !important;
  }

  .cx-team-hero .cx-team-ranking-tile {
    padding-right: 6px;
    padding-left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx-match-card {
    transition: none;
  }

  .cx-match-card:hover {
    transform: none;
  }
}
