.match-statistics {
  margin: 24px 0;
}
.match-statistics__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text, #232323);
}

.match-statistics__filter {
  margin-bottom: 16px;
}
.match-statistics .sort-btn:not(.sort-btn--active) {
  background: transparent;
  color: #7d7d7d;
}
.match-statistics .sort-btn--active {
  background-color: var(--white, #fff);
  color: var(--primary, #9345d8);
  border-color: transparent;
}
.match-statistics .sort-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

.match-statistics__periods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-statistics__periods .match-statistics__period[hidden] {
  display: none;
}
.match-statistics__period {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-statistics__group {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.match-statistics__group-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text, #232323);
  line-height: 1.3;
}

.match-statistics__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-statistics__row-top {
  display: grid;
  grid-template-columns: 1fr 4fr 1fr;
  align-items: center;
  gap: 8px;
}
.match-statistics__row-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.match-statistics__row-value.is-home {
  text-align: left;
}
.match-statistics__row-value.is-away {
  text-align: right;
}
.match-statistics__row-value.is-winner {
  color: var(--primary, #9345d8);
}
.match-statistics__row-value:not(.is-winner) {
  color: #7d7d7d;
}
.match-statistics__row-label {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--text, #232323);
  line-height: 1.3;
  word-wrap: break-word;
}

.match-statistics__row-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.match-statistics__bar-track {
  height: 8px;
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
}
.match-statistics__bar-track--home {
  justify-content: flex-end;
}
.match-statistics__bar-track--away {
  justify-content: flex-start;
}
.match-statistics__bar {
  height: 100%;
  border-radius: 10px;
  background: #7d7d7d;
  transition: width 0.2s ease;
}
.match-statistics__bar.is-winner {
  background: var(--primary, #9345d8);
}

.match-statistics__possession-bar {
  display: flex;
  height: 40px;
  background: #7d7d7d;
  border-radius: 100px;
  overflow: hidden;
}
.match-statistics__possession-bar-home,
.match-statistics__possession-bar-away {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  box-sizing: border-box;
  background: #7d7d7d;
}
.match-statistics__possession-bar-home.is-winner,
.match-statistics__possession-bar-away.is-winner {
  background: var(--primary, #9345d8);
}

.match-statistics--empty .match-statistics__empty {
  padding: 24px;
  text-align: center;
  color: #7d7d7d;
  background: #fff;
  border-radius: 14px;
}

@media (max-width: 768px) {
  .match-statistics__title {
    font-size: 18px;
  }
  .match-statistics__group {
    padding: 14px;
    gap: 12px;
  }
  .match-statistics__group-title {
    font-size: 16px;
  }
  .match-statistics__row {
    gap: 4px;
  }
  .match-statistics__row-value {
    font-size: 14px;
  }
  .match-statistics__row-label {
    font-size: 12px;
  }
}
