/* A team roster (static/js/roster-table.js): the team page's Roster tab and
   the game page's Rosters tab. A filter bar in the Markets style (the
   Strategies tab's .mk-filt: a search box and dropdown buttons, left-aligned,
   the count on the right), then the roster table. */

/* ---------- Filter bar ---------- */
.si-filt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; min-width: 0; }
.si-filt .spacer { flex: 1; }
.si-filt-search { flex: 0 1 300px; width: auto; height: 32px; margin: 0; background: var(--tl-card-body); }
/* Rounded like the dropdown buttons beside it (page styles were squaring it). */
.si-roster .si-filt .si-filt-search { border-radius: var(--tl-r-chip); }
.si-filt-search:focus-within { border-color: var(--tl-line-20); background: var(--tl-card-body); }
/* The box shows focus; the field draws no ring of its own (Pico's included). */
.si-filt-search input,
.si-filt-search input:focus,
.si-filt-search input:focus-visible {
  flex: 1; min-width: 0; height: 30px !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important;
  font: 400 13px var(--tl-font) !important; color: var(--tl-ink) !important;
}
.si-filt-search input::placeholder { color: var(--tl-ink-45); }
.si-filt-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.si-filt-tool { position: relative; flex: none; }
.si-filt-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; margin: 0; padding: 0 10px;
  border: 1px solid var(--tl-line-10); border-radius: var(--tl-r-chip); background: var(--tl-card-body); box-shadow: none;
  font: 500 12.5px var(--tl-font); line-height: normal; color: var(--tl-ink); white-space: nowrap; cursor: pointer;
}
.si-filt-btn:hover, .si-filt-btn[aria-expanded="true"], .si-filt-btn.is-set { border-color: var(--tl-line-20); }
.si-filt-btn svg { flex: none; color: var(--tl-ink-60); }
.si-filt-btn img { border-radius: 3px; }
.si-filt-k { color: var(--tl-ink-50); }
.si-filt-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 220px; max-height: 320px; overflow-y: auto; padding: 6px;
  border-radius: var(--tl-r-card); background: var(--tl-card);
  box-shadow: var(--tl-float-shadow), 0 20px 40px -22px rgba(16, 20, 24, 0.35);
}
.si-filt-pop[hidden] { display: none; }
.si-filt-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 32px; margin: 0; padding: 0 10px;
  border: 0; border-radius: var(--tl-r-chip); background: transparent; box-shadow: none;
  font: 500 13px var(--tl-font); line-height: normal; color: var(--tl-ink-70); text-align: left; cursor: pointer;
}
.si-filt-opt:hover, .si-filt-opt:focus-visible { background: var(--tl-fill-05); color: var(--tl-ink); }
.si-filt-opt.is-on { background: var(--tl-fill-06); color: var(--tl-ink); font-weight: 600; }
.si-filt-opt .r { font-family: var(--tl-mono); font-size: 11px; font-weight: 400; color: var(--tl-ink-50); }
.si-filt-opt img { border-radius: 3px; }
.si-filt-opt > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
@media (max-width: 720px) { .si-filt-search { flex: 1 1 100%; } }

/* ---------- Roster table (the team page's) ---------- */
.si-roster .tl-colhead { gap: 10px; }
/* the design's last column is Hometown; no hometown data yet, so it stays empty to keep the column rhythm */
.team-roster-grid { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) 60px 70px 90px minmax(0, 1.3fr); gap: 10px; align-items: center; min-width: 560px; }
.team-roster-row { padding: 9px 18px; font-size: 14px; color: var(--tl-ink); text-decoration: none; }
.team-roster-row + .team-roster-row { border-top: 1px solid var(--tl-line-05); }
a.team-roster-row:hover { background: var(--tl-fill-03); }
.team-roster-row .num { font-family: var(--tl-mono); font-size: 12.5px; color: var(--tl-ink-45); }
.team-roster-player { display: flex; align-items: center; gap: 11px; min-width: 0; }
.team-roster-player b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-roster-row .m { font-family: var(--tl-mono); font-size: 12px; }
.team-roster-row .m.dim { color: var(--tl-ink-60); }
.si-roster .team-av {
  position: relative; flex: none; overflow: hidden; border-radius: 50%; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tl-fill-07); box-shadow: 0 0 0 1px var(--tl-line-08);
  font-family: var(--tl-mono); font-size: 10px; font-weight: 500; color: var(--tl-ink-55);
}
.si-roster .team-av > img.team-av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; background: transparent; }
@media (max-width: 640px) {
  .team-roster-row { padding-left: 14px; padding-right: 14px; }
}
.si-filt-btn [data-ro-val] { display: inline-flex; align-items: center; gap: 5px; }
