/* Mein Team (+ team-lineup elsewhere): dense roster list, not matchup halves. */

/* Beat .scoreboard 3-col matchup grid (typography.css). */
.team-page .scoreboard .score-teams.team-score-teams{grid-template-columns:minmax(0,1fr)}
.team-page .scoreboard .minutes-track.team-minutes-track{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  column-gap:10px;
}
.team-page .scoreboard .team-minutes-track .minutes-label{justify-self:start;text-align:left;width:auto}

.team-page .matchup-panel,
.team-page .bench-panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
}
.team-page .bench-panel{
  margin-top:12px;
}
.team-page .bench-disclosure>summary{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;font-weight:800;color:#18385e;cursor:pointer;list-style:none;
}
.team-page .bench-disclosure>summary::-webkit-details-marker{display:none}
.team-page .bench-footer{
  display:flex;justify-content:flex-end;align-items:center;gap:12px;
  padding:12px 16px;border-top:1px solid var(--line);background:#f7f8f4;
}
.team-page .bench-footer-mid,
.team-page .bench-total.opp{display:none}
.team-page .bench-total{
  display:flex;align-items:baseline;justify-content:flex-end;gap:10px;
  margin-left:auto;
}

.team-lineup-row{
  display:block;
  border-top:1px solid #e8edf4;
}
.team-lineup-row>.player-cell{
  width:100%;border:0;border-radius:0;min-width:0;
}

/*
  Packed roster row: photo | identity (+ stats under) | score
  Identity column is capped so the score sits close — no ocean of whitespace.
*/
.team-lineup .player-cell.team-player-cell{
  display:grid !important;
  /* photo | identity grows | score flush right */
  grid-template-columns:48px minmax(0,1fr) 3.6rem !important;
  grid-template-rows:auto auto auto !important;
  justify-content:stretch;
  column-gap:12px;
  row-gap:2px;
  align-items:center;
  padding:10px 14px 10px 10px !important;
  gap:2px 12px !important;
}
/* Fixed shot box — never stretch with row height (stats / multi-line). */
.team-lineup .team-player-cell .player-shot{
  grid-column:1;grid-row:1/-1;
  position:relative;
  width:48px !important;min-width:48px !important;
  height:48px !important;min-height:48px !important;
  align-self:center !important;justify-self:center;
  overflow:hidden;border-radius:4px;
}
.team-lineup .team-player-cell .player-shot .player-photo{
  position:absolute;inset:0;
  width:100% !important;height:100% !important;min-height:0 !important;
  object-fit:cover;object-position:center 18%;
}
.team-lineup .team-player-cell .player-shot.defense .player-photo,
.team-lineup .team-player-cell .player-shot .player-photo.defense{
  object-fit:contain;object-position:center;padding:5px;box-sizing:border-box;
}
.team-lineup .team-player-cell .pc-name{
  grid-column:2;grid-row:1;
  align-self:end;min-width:0;padding-top:0 !important;
}
.team-lineup .team-player-cell .pc-game{
  grid-column:2 !important;grid-row:2;
  align-self:start;padding:0 !important;min-width:0;
}
.team-lineup .team-player-cell .pc-stats.team-pc-stats{
  grid-column:2 !important;grid-row:3;
  display:block !important;
  padding:1px 0 0 !important;
  margin:0;
  background:none;border:0;
  color:#5a6d82;
  font-size:12px;line-height:1.35;
  font-variant-numeric:tabular-nums;
  white-space:normal;overflow:visible;text-overflow:clip;
  letter-spacing:-.01em;
}
.team-lineup .team-player-cell .pc-stats.no-stats{display:none !important}
.team-lineup .team-player-cell:not(:has(.team-pc-stats)){
  grid-template-rows:auto auto !important;
}
/*
  matchup-mobile.css sets .pc-side { display:contents }. Keep a real column
  so score + proj share one right edge (same as matchup’s 56px score track).
*/
.team-lineup .team-player-cell .pc-side{
  display:flex !important;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:1px;
  grid-column:3 !important;grid-row:1/-1 !important;
  align-self:center;justify-self:stretch;
  width:100%;
  min-width:0;
  max-width:none;
  padding:0;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.team-lineup .team-player-cell .pc-score,
.team-lineup .team-player-cell .pc-proj{
  display:block !important;
  grid-column:unset !important;grid-row:unset !important;
  position:static !important;
  width:100%;
  max-width:100%;
  margin:0;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.team-lineup .team-player-cell .pc-score{
  font-size:26px !important;line-height:1;
  padding-top:0 !important;
  letter-spacing:-.2px;
}
.team-lineup .team-player-cell .pc-score-row{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center;
  width:100%;
  gap:3px;
}
.team-lineup .team-player-cell .pc-score .score-value{
  display:inline-block;
  text-align:right;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.team-lineup .team-player-cell .pc-proj{
  font-size:11px;line-height:1.2;
  font-weight:600;color:#536a83;
  white-space:nowrap;
}

.standings-team-link,.ko-board-team{
  appearance:none;background:none;border:0;padding:0;margin:0;cursor:pointer;
  color:inherit;text-align:left;font:inherit;max-width:100%;
}
.standings-team-link{display:block;width:100%}
.standings-team-link:hover strong,.ko-board-team:hover strong{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.standings-team-link:focus-visible,.ko-board-team:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.ko-board-team{display:flex;align-items:center;gap:6px;min-width:0;flex:1 1 auto;max-width:100%}
.ko-board-team strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:inherit;line-height:inherit}

@media(min-width:651px){
  .team-lineup .player-cell.team-player-cell{
    grid-template-columns:56px minmax(0,1fr) 3.75rem !important;
    padding:12px 18px 12px 12px !important;
    column-gap:14px;
  }
  .team-lineup .team-player-cell .player-shot{
    width:56px !important;min-width:56px !important;
    height:56px !important;min-height:56px !important;
  }
  .team-lineup .team-player-cell .pc-stats.team-pc-stats{font-size:13px}
  .team-lineup .team-player-cell .pc-score{font-size:28px !important}
}

@media(max-width:650px){
  .team-lineup .player-cell.team-player-cell{
    grid-template-columns:32px minmax(0,1fr) 3.2rem !important;
    padding:7px 10px 7px 6px !important;
    column-gap:8px;row-gap:1px;
  }
  .team-lineup .team-player-cell .player-shot{
    width:32px !important;min-width:32px !important;
    height:32px !important;min-height:32px !important;
  }
  .team-lineup .team-player-cell .pc-stats.team-pc-stats{font-size:10px;line-height:1.25}
  .team-lineup .team-player-cell .pc-score{font-size:22px !important}
  .team-lineup .team-player-cell .pc-proj{font-size:8px}
  .team-page .bench-panel{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .team-page .bench-disclosure>summary{padding:10px 12px}
  .team-page .bench-footer{padding:10px 12px}
}
