.match-history-card {
  display: block;
  position: relative;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-left: 3px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

a.match-history-card:hover {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.match-history-card--win {
  border-left-color: #22c55e;
}

.match-history-card--draw {
  border-left-color: #9ca3af;
}

.match-history-card--loss {
  border-left-color: #f85c5f;
}

.match-history-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #7d7d7d;
  background: #f5f5f5;
  margin: -8px -16px 12px;
  padding: 10px 20px;
  border-radius: 8px;
}
.match-history-card__flag {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.match-history-card__dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.match-history-card__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.match-history-card__body::before {
  content: "";
}

.match-history-card__teams {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-history-card__home-name,
.match-history-card__away-name {
  font-size: 14px;
  font-weight: 400;
  color: #232323;
  line-height: 1.3;
}

.match-history-card__home-name {
  text-align: right;
}

.match-history-card__away-name {
  text-align: left;
}

.match-history-card__logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.match-history-card__score {
  font-size: 16px;
  font-weight: 400;
  color: #232323;
  padding: 0 4px;
  white-space: nowrap;
}

.match-history-card__stats {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.match-history-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7d7d7d;
  font-size: 14px;
  line-height: 1;
}

.match-history-card__stat-icon {
  flex-shrink: 0;
  color: #7d7d7d;
}

.match-history-card__stat-icon--card {
  width: 15px;
  height: 20px;
}

.match-history-card__stat-value {
  font-size: 14px;
  font-weight: 400;
  color: #232323;
}

@media (max-width: 768px) {
  .match-history-card {
    padding: 10px 14px;
  }

  .match-history-card__header {
    font-size: 12px;
    gap: 4px;
    background: transparent;
    margin: 0 -14px 0;
    padding: 0 14px 10px;
    border-bottom: 1px solid #ebebeb;
  }

  .match-history-card__body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .match-history-card__body::before {
    display: none;
  }

  .match-history-card__teams,
  .match-history-card__stats {
    grid-column: 1;
    justify-self: stretch;
  }

  .match-history-card__teams {
    justify-content: center;
    padding-top: 10px;
  }

  .match-history-card__stats {
    justify-content: center;
    gap: 18px;
    margin: 10px -14px 0;
    padding: 10px 14px 0;
    border-top: 1px solid #ebebeb;
  }

  .match-history-card__home-name,
  .match-history-card__away-name {
    font-size: 12px;
  }
}
