/* ============================================================
   Страница команды.
   ============================================================ */

.team-card {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.team-card__logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
}

.team-card__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.team-card__body { min-width: 0; }

.team-card__name {
  margin: 0 0 10px;
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.15;
}

.team-card__facts { margin: 0 0 12px; padding: 0; list-style: none; font-size: var(--fs-sm); }

.team-card__fact { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; }
.team-card__mark { display: inline-flex; color: var(--text-mute); align-self: center; }
.team-card__label { color: var(--text-mute); }
.team-card__fact a { color: var(--accent); }

/* Соцсети — знаки в общем стиле, а не чужие логотипы: те
   товарные знаки со своими правилами использования. */
.team-card__social { display: flex; gap: 10px; }

.team-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.team-social:hover { color: var(--accent); border-color: var(--accent); }

/* --- турниры по сезонам --------------------------------------
   Свежие сверху: человек приходит смотреть, что происходит
   сейчас. В ответе источника порядок обратный. */

.team-seasons,
.team-roster-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.team-seasons__title,
.team-roster__head {
  margin: 0;
  padding: 10px 12px;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.team-season { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.team-season:hover { background: var(--accent-soft); }
.team-season--current { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }

.team-season__name {
  margin-bottom: 4px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-mute);
}

.team-season__list { margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }

.team-season__item { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.team-season__logo { width: 20px; height: 20px; object-fit: contain; flex: none; }

.team-season__link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

.team-season__link:hover { color: var(--accent); text-decoration: underline; }

.team-season__place {
  margin-left: auto;
  padding: 0 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-soft);
  background: var(--surface-alt);
  border-radius: 8px;
}

/* --- состав --------------------------------------------------- */

.team-roster__group {
  padding: 7px 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-mute);
  background: var(--surface-alt);
}

.team-roster__list { margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }

.team-roster__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
}

.team-roster__item:nth-child(even) { background: var(--surface-alt); }

.team-roster__photo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 38px;
  overflow: hidden;
  color: var(--text-mute);
  background: var(--surface-sunk);
  border-radius: 3px;
}

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

.team-roster__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

.team-roster__name:hover { color: var(--accent); }
.team-roster__role { margin-left: auto; font-size: var(--fs-xs); color: var(--text-mute); }

/* --- черновик заявки -----------------------------------------
   Показывается только при 'show_drafts' => true. Обведён пунктиром
   и подписан: это нарисованный, но неработающий кусок. */

.draft {
  margin-top: 16px;
  background: var(--surface);
  border: 1px dashed var(--text-mute);
  border-radius: 10px;
  overflow: hidden;
}

.draft__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
}

.draft__title { font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; }
.draft__badge { font-size: var(--fs-xs); color: var(--text-mute); }

.draft__body { padding: 12px; }

.draft__field { display: block; margin-bottom: 10px; font-size: var(--fs-sm); }
.draft__select { display: block; width: 100%; margin-top: 4px; padding: 6px; }

.draft__from { margin: 0 0 8px; font-size: var(--fs-xs); color: var(--text-mute); }

.draft__players {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  font-size: var(--fs-sm);
}

.draft__player label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.draft__player-role { margin-left: auto; font-size: var(--fs-xs); color: var(--text-mute); }

.draft__foot { display: flex; align-items: center; gap: 10px; }

.draft__count {
  min-width: 26px;
  padding: 2px 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-align: center;
  background: var(--surface-alt);
  border-radius: 8px;
}

.draft__submit {
  padding: 7px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.draft__submit:disabled { background: var(--text-mute); cursor: default; }

@media (max-width: 575.98px) {
  .team-card { gap: 12px; padding: 12px; }
  .team-card__logo { width: 84px; height: 84px; }
  .team-card__name { font-size: var(--fs-lg); }
}
