/* Team match cell: home logo far left, away logo far right */
.match-teams-cell {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto minmax(0, 1fr) 40px !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 12px;
}

a.match-list-teams-link {
  display: block !important;
  width: 100% !important;
  color: inherit !important;
  text-decoration: none !important;
}

a.match-list-teams-link:hover .match-list-team-name {
  color: #004c28 !important;
}

.match-list-team-logo-wrap {
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.match-list-team-logo-wrap--home {
  grid-column: 1 !important;
  justify-self: start !important;
}

.match-list-team--home {
  grid-column: 2 !important;
  min-width: 0 !important;
}

.match-list-vs {
  grid-column: 3 !important;
  justify-self: center !important;
}

.match-list-team--away {
  grid-column: 4 !important;
  min-width: 0 !important;
  text-align: right !important;
}

.match-list-team-logo-wrap--away {
  grid-column: 5 !important;
  justify-self: end !important;
}

.match-list-team {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

.match-list-team--home {
  align-items: flex-start !important;
  text-align: left !important;
}

.match-list-team--away {
  align-items: flex-end !important;
  text-align: right !important;
}

.match-list-team-logo {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  display: block !important;
}

.match-list-team-name {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  color: #0f172a !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  margin: 0 0 3px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.match-list-form-row,
.match-list-teams .mp-form-pills,
.mp-form-pills {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 2px !important;
}

.match-list-team--home .match-list-form-row,
.match-list-team--home .mp-form-pills {
  justify-content: flex-start !important;
}

.match-list-team--away .match-list-form-row,
.match-list-team--away .mp-form-pills {
  justify-content: flex-end !important;
}

.mp-form-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  border-radius: 4px !important;
  font-size: 8px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.mp-form-pill.mp-form-win,
.mp-form-pill.mp-form-pill--w {
  background: #16a34a !important;
  border: 1px solid #15803d !important;
  color: #fff !important;
}

.mp-form-pill.mp-form-draw,
.mp-form-pill.mp-form-pill--d {
  background: #eab308 !important;
  border: 1px solid #ca8a04 !important;
  color: #1e293b !important;
}

.mp-form-pill.mp-form-loss,
.mp-form-pill.mp-form-pill--l {
  background: #dc2626 !important;
  border: 1px solid #b91c1c !important;
  color: #fff !important;
}

.mp-form-pill.mp-form-na,
.mp-form-pill.mp-form-pill--na {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
}

.mp-form-pills.mp-form-pills--na .mp-form-pill {
  font-size: 10px !important;
  font-weight: 800 !important;
}

.match-list-form-na {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.match-list-vs span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  color: #fff !important;
  background: linear-gradient(135deg, #bb2000, #dc2626);
  letter-spacing: 0.08em;
}

.matches-table td.match-teams-td,
.event-table td:has(.match-teams-cell) {
  min-width: 260px !important;
  vertical-align: middle !important;
}

.matches-table.table-hover > tbody > tr:hover .match-teams-cell .match-list-team-name,
.matches-table.table-hover > tbody > tr:hover .match-list-team-name {
  color: #0f172a !important;
}

.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-win,
.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-pill--w {
  background: #16a34a !important;
  color: #fff !important;
}

.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-draw,
.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-pill--d {
  background: #eab308 !important;
  color: #1e293b !important;
}

.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-loss,
.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-pill--l {
  background: #dc2626 !important;
  color: #fff !important;
}

.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-na,
.matches-table.table-hover > tbody > tr:hover .mp-form-pill.mp-form-pill--na {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
}

@media (max-width: 767px) {
  .match-teams-cell {
    grid-template-columns: 36px minmax(0, 1fr) auto minmax(0, 1fr) 36px !important;
    column-gap: 6px !important;
    padding: 10px !important;
  }

  .match-list-team-logo-wrap {
    width: 36px !important;
    height: 36px !important;
  }

  .match-list-team-name {
    font-size: 11px !important;
  }

  .mp-form-pill {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    font-size: 7px !important;
  }
}
