.team-squad {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.team-squad__empty {
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  color: #7d7d7d;
  font-size: 14px;
  text-align: center;
}

.team-squad__table {
  display: flex;
  flex-direction: column;
  padding: 4px;
  border-radius: 14px;
  background: #fff;
  font-family: "Onest", sans-serif;
}

.team-squad__head,
.team-squad__row {
  display: grid;
  grid-template-columns:
    40px minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.4fr)
    90px;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  min-height: 50px;
  font-size: 14px;
  line-height: 1.3;
}

.team-squad__head {
  background: #f4f4f4;
  border-radius: 10px;
  color: #7d7d7d;
  font-weight: 400;
}

.team-squad__row {
  color: #232323;
  text-decoration: none;
  border-top: 1px solid #f4f4f4;
  transition: background-color 0.15s ease;
}

a.team-squad__row {
  cursor: pointer;
}

a.team-squad__row:hover {
  background-color: #fafafa;
  color: #232323;
}

a.team-squad__row:focus-visible {
  outline: none;
  background-color: #f5f3ff;
  box-shadow: inset 0 0 0 2px #9345d8;
}

.team-squad__cell {
  min-width: 0;
  text-align: center;
}

.team-squad__cell--player {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.team-squad__cell--nationality {
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-squad__player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-squad__player-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef0f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-squad__player-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-squad__player-placeholder {
  display: inline-flex;
  width: 100%;
  height: 100%;
}

.team-squad__player-placeholder svg {
  width: 100%;
  height: 100%;
}

.team-squad__player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-squad__nationality {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-squad__flag {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.team-squad__country-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-squad__description {
  padding: 24px 28px;
  border-radius: 14px;
  background: #fff;
  color: #3d3d3d;
  font-size: 15px;
  line-height: 1.7;
}

.team-squad__description > :first-child {
  margin-top: 0;
}

.team-squad__description > :last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .team-squad__table {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .team-squad__head {
    display: none;
  }

  .team-squad__row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
      "avatar name"
      "avatar number"
      "avatar age"
      "avatar nationality"
      "avatar stat";
    column-gap: 16px;
    row-gap: 4px;
    padding: 14px;
    min-height: 0;
    background: #fff;
    border-radius: 14px;
    border-top: none;
  }

  a.team-squad__row:hover {
    background-color: #fff;
  }

  .team-squad__cell--player,
  .team-squad__player {
    display: contents;
  }

  .team-squad__player-avatar {
    grid-area: avatar;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    align-self: start;
  }

  .team-squad__player-name {
    grid-area: name;
    font-size: 14px;
    color: #232323;
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-bottom: 4px;
  }

  .team-squad__cell {
    text-align: left;
    justify-content: flex-start;
    color: #232323;
    font-size: 14px;
    line-height: 1.3;
  }

  .team-squad__cell--number {
    grid-area: number;
  }

  .team-squad__cell--age {
    grid-area: age;
  }

  .team-squad__cell--nationality {
    grid-area: nationality;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .team-squad__cell--stat {
    grid-area: stat;
    font-weight: 400;
  }

  .team-squad__cell--number::before {
    content: "№";
    color: #7d7d7d;
    margin-right: 4px;
  }

  .team-squad__cell--age::before {
    content: "Возраст";
    color: #7d7d7d;
    margin-right: 4px;
  }

  .team-squad__cell--nationality::before {
    content: "Национальность";
    color: #7d7d7d;
  }

  .team-squad__cell--stat::before {
    content: "Статистика";
    color: #7d7d7d;
    margin-right: 4px;
  }

  .team-squad__nationality {
    gap: 4px;
  }

  .team-squad__description {
    padding: 18px 16px;
    font-size: 14px;
  }
}
