/* Vista Selecciones (grid) + Ficha de selección. Mobile-first.
   Tokens en base.css; clases compartidas en components.css. */

/* ===== Grid de selecciones ===== */
.teams-view { padding-bottom: 24px; }

.teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.teams-grid__sk { border-radius: var(--r-md); }

@media (min-width: 540px) {
  .teams-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 820px) {
  .teams-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1080px) {
  .teams-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px 16px;
  text-align: center;
  min-height: 108px;
  background: var(--surface);
}
.team-card__crest { width: 56px; height: 56px; }
.team-card__name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.team-card__sub {
  font-size: .68rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ===== Ficha de selección ===== */
.team-profile { padding-bottom: 24px; }

.team-profile__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px;
  margin-bottom: 18px;
}
.team-profile__crest { width: 72px; height: 72px; flex: none; }
.team-profile__info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.team-profile__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.team-profile__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.team-profile__chip {
  font-size: .68rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 2px 9px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.team-profile__coach { display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; }
.team-profile__coach-label {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
  background: var(--grad-brand);
  border-radius: var(--r-pill);
  padding: 2px 7px;
}
.team-profile__coach-name { font-size: .85rem; font-weight: 600; color: var(--ink-2); }

/* Layout cuerpo: una columna en móvil, dos en escritorio. */
.team-profile__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 880px) {
  .team-profile__body { grid-template-columns: 1.1fr .9fr; align-items: start; }
}

.team-profile__panel { padding: 6px 16px; }

/* Grupos de plantilla por posición */
.squad-group { padding: 8px 0; }
.squad-group + .squad-group { border-top: 1px solid var(--hairline); }
.squad-group__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
  margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
}

/* Stack de partidos */
.team-profile__match-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 18px;
}
.team-profile__matches-holder .section-title { font-size: 1rem; margin-top: 6px; }

/* Animación de entrada (respeta reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .team-card.fade-in,
  .team-profile.fade-in { animation: tp-fade-in var(--t) var(--ease) both; }
  @keyframes tp-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}
