/* Team Rosters: compact player tiles. A whole team on a screen, not a page
   of bio cards. Photos crop top-center so headshots keep their faces. */

.rt-tr { margin: 0 0 24px; }
.rt-tr-search { margin-bottom: 14px; }

.rt-tr-team { margin: 0 0 26px; }
.rt-tr-heading {
  margin: 22px 0 10px;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rt-tr-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 14px;
}

.rt-tr-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px 12px;
  background: var(--rt-paper, #fff);
  border: 1px solid var(--rt-line, #e2e8f0);
  border-top: 3px solid var(--rt-primary, #1f3b73);
  border-radius: 10px;
  text-align: center;
  min-width: 0;
}

.rt-tr-photo {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--rt-cream, #f2f6fa);
}
.rt-tr-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.rt-tr-photo--logo img {
  object-fit: contain;
  padding: 16px;
  opacity: 0.45;
  filter: grayscale(35%);
}

.rt-tr-num {
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--rt-primary, #1f3b73);
  margin-top: 2px;
}
.rt-tr-name {
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.rt-tr-meta {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rt-gray, #6b6b6b);
}

.rt-tr-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--rt-primary, #1f3b73);
  color: var(--rt-on-primary, #fff);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.rt-tr-footnote {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--rt-gray, #6b6b6b);
}

@media (max-width: 520px) {
  .rt-tr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .rt-tr-photo { width: 68px; height: 68px; }
  .rt-tr-name { font-size: 0.8rem; }
}

/* Team hub tabs: Games | Practice | Roster, one panel at a time. */
.rt-team-tabbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.rt-team-tabbar { border-bottom: 3px solid var(--rt-primary, #1f3b73); gap: 6px; align-items: flex-end; margin-bottom: 22px; }
.rt-team-tab {
  padding: 14px 38px 12px;
  border: 1px solid var(--rt-line, #e2e8f0);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--rt-cream, #f2f6fa);
  color: var(--rt-ink, #1a202c);
  font: inherit;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.rt-team-tab.is-on {
  background: var(--rt-primary, #1f3b73);
  border-color: var(--rt-primary, #1f3b73);
  color: var(--rt-on-primary, #fff);
}
@media (max-width: 520px) {
  .rt-team-tab { padding: 12px 20px 10px; font-size: 0.95rem; flex: 1; }
}
.rt-team-panel { margin: 0; }
.rt-team-note {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--rt-gray, #6b6b6b);
  text-align: center;
}

/* Intelligent Roster Filtering: search + side-aware chips + field view. */
.rt-irf-chrome { margin: 0 0 16px; }
.rt-irf-top { display: flex; gap: 10px; margin: 0 0 10px; }
.rt-irf-search {
  flex: 1;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--rt-line, #cbd5e0);
  border-radius: 10px;
  min-width: 0;
}
.rt-irf-toggle {
  padding: 10px 18px;
  border: 2px solid var(--rt-primary, #1f3b73);
  border-radius: 10px;
  background: transparent;
  color: var(--rt-primary, #1f3b73);
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.rt-irf-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 0; }
.rt-irf-chip {
  padding: 6px 16px;
  border: 1.5px solid var(--rt-primary, #1f3b73);
  border-radius: 999px;
  background: transparent;
  color: var(--rt-primary, #1f3b73);
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.rt-irf-chip--side { text-transform: uppercase; font-weight: 800; }
.rt-irf-chip--class { border-color: var(--rt-gray, #6b6b6b); color: var(--rt-gray, #6b6b6b); }
.rt-irf-chip.is-active { background: var(--rt-primary, #1f3b73); color: var(--rt-on-primary, #fff); }
.rt-irf-chip--class.is-active { background: var(--rt-gray, #6b6b6b); color: #fff; }
.rt-irf-chip.is-pruned { display: none; }
.rt-irf-empty { text-align: center; font-weight: 600; color: var(--rt-gray, #6b6b6b); }

/* The field: left half offense, right half defense, chips on their marks. */
.rt-irf-field {
  position: relative;
  aspect-ratio: 12 / 5;
  margin: 10px 0 0;
  border-radius: 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 2px, transparent 2px 10%),
    linear-gradient(180deg, #3e9c4a, #2c7c38);
  border: 2px solid #256a30;
}
.rt-irf-field-mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.75);
  transform: translateX(-50%);
}
.rt-irf-fieldside {
  position: absolute;
  top: 7%;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-weight: 900;
  font-size: clamp(0.8rem, 2vw, 1.15rem);
  letter-spacing: 0.35em;
  cursor: pointer;
}
.rt-irf-fieldside--o { left: 12%; }
.rt-irf-fieldside--d { right: 9%; }
.rt-irf-fieldside.is-active { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.rt-irf-chip--spot {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.92);
  color: #1c3a22;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.rt-irf-chip--spot.is-active { background: var(--rt-primary, #1f3b73); border-color: var(--rt-primary, #1f3b73); color: var(--rt-on-primary, #fff); }
.rt-irf-chip--spot.is-pruned { display: none; }
@media (max-width: 640px) {
  .rt-irf-field { aspect-ratio: 3 / 2; }
  .rt-irf-chip--spot { font-size: 0.7rem; padding: 4px 9px; }
}

/* The filter hides via the hidden attribute; it must beat display:flex. */
.rt-tr-tile[hidden], .rt-tr-team[hidden] { display: none !important; }

/* Team tabs on a multi-roster page: the same big tab language as the team
   hub, one roster open at a time. */
.rt-tr-teamtabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  margin: 4px 0 20px;
  border-bottom: 3px solid var(--rt-primary, #1f3b73);
}
.rt-tr-teamtab {
  padding: 14px 30px 12px;
  border: 1px solid var(--rt-line, #e2e8f0);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--rt-cream, #f2f6fa);
  color: var(--rt-ink, #1a202c);
  font: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.rt-tr-teamtab.is-on {
  background: var(--rt-primary, #1f3b73);
  border-color: var(--rt-primary, #1f3b73);
  color: var(--rt-on-primary, #fff);
}
.rt-irf-bar[hidden], .rt-irf-toggle[hidden] { display: none !important; }
@media (max-width: 640px) {
  .rt-tr-teamtab { padding: 11px 14px 9px; font-size: 0.86rem; flex: 1 1 auto; }
}

/* Tabs light up under the pointer: brand text on paper with a brand top
   edge and a small lift, so hover reads as "about to pick this" while the
   open tab keeps the solid brand fill. */
.rt-team-tab, .rt-tr-teamtab {
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.rt-team-tab:not(.is-on):hover,
.rt-team-tab:not(.is-on):focus-visible,
.rt-tr-teamtab:not(.is-on):hover,
.rt-tr-teamtab:not(.is-on):focus-visible {
  background: var(--rt-paper, #fff);
  color: var(--rt-primary, #1f3b73);
  box-shadow: inset 0 3px 0 var(--rt-primary, #1f3b73);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .rt-team-tab, .rt-tr-teamtab { transition: none; }
  .rt-team-tab:not(.is-on):hover, .rt-tr-teamtab:not(.is-on):hover { transform: none; }
}
