/* ==========================================================================
   Previously Sports — Stats Hub · FIBA section · stats-fiba.css
   Styles for the national-team (FIBA) views rendered by stats-fiba.js.
   Uses the hub's --st-* design tokens; underline-tab switches (no pills)
   match the hub's group-switcher language.
   ========================================================================== */

.st-fiba{ max-width: var(--st-max); margin: 0 auto; padding: 26px 24px 8px; }
.st-fiba[hidden]{ display: none; }

.st-fiba-head{ margin-bottom: 6px; }
.st-fiba-kicker{
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--st-muted); margin: 0 0 6px;
}
.st-fiba-title{
  font-family: var(--st-serif, Georgia, serif);
  font-size: 30px; line-height: 1.15; margin: 0 0 8px; color: var(--st-text);
}
.st-fiba-sub{ color: var(--st-muted); font-size: 15px; line-height: 1.55; margin: 0; max-width: 68ch; }

/* gender switch + view tabs: underline tabs, hub style */
.st-fiba-switch, .st-fiba-views{
  display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline;
  border-bottom: 1px solid var(--st-line-soft);
}
.st-fiba-switch{ margin-top: 20px; }
.st-fiba-views{ margin-top: 2px; }
.st-fiba-gbtn, .st-fiba-vbtn{
  padding: 10px 2px 12px; background: none; border: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  color: var(--st-muted); font-family: var(--st-sans);
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.st-fiba-gbtn{ font-size: 15px; }
.st-fiba-vbtn{ font-size: 13px; }
.st-fiba-gbtn:hover, .st-fiba-vbtn:hover{ color: var(--st-text); }
.st-fiba-gbtn.is-active, .st-fiba-vbtn.is-active{
  color: var(--st-text); border-bottom-color: var(--st-accent);
}
.st-fiba-gbtn:focus-visible, .st-fiba-vbtn:focus-visible{
  outline: 2px solid var(--st-accent); outline-offset: -2px;
}

.st-fiba-body{ padding: 20px 0 10px; }
.st-fiba-h{
  font-family: var(--st-serif, Georgia, serif);
  font-size: 22px; margin: 6px 0 4px; color: var(--st-text);
}
.st-fiba-h4{ font-size: 16px; margin: 22px 0 8px; color: var(--st-text); }
.st-fiba-asof{ color: var(--st-muted); font-size: 13px; margin: 0 0 14px; }
.st-fiba-note, .st-fiba-p{ font-size: 15px; line-height: 1.6; color: var(--st-text); max-width: 72ch; }
.st-fiba-note{ color: var(--st-muted); margin-top: 14px; }
.st-fiba-next{
  font-size: 15px; line-height: 1.55; color: var(--st-text);
  border-left: 3px solid var(--st-accent); padding: 4px 0 4px 14px; margin: 0 0 16px;
}
.st-fiba-final{ font-size: 16px; line-height: 1.6; font-weight: 600; max-width: 72ch; }

.st-fiba-table{
  width: 100%; border-collapse: collapse; font-size: 15px; max-width: 640px;
}
.st-fiba-table th{
  text-align: left; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--st-muted); padding: 8px 10px; border-bottom: 2px solid var(--st-line-soft);
}
.st-fiba-table td{
  padding: 8px 10px; border-bottom: 1px solid var(--st-line-soft); color: var(--st-text);
}
.st-fiba-table .st-fiba-rk{ width: 44px; color: var(--st-muted); font-weight: 700; }
.st-fiba-table .st-fiba-pts{ text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.st-fiba-table th:last-child{ text-align: right; }
.st-fiba-table tr.st-fiba-usa td{ font-weight: 700; }
.st-fiba-table tr.st-fiba-subrow td{
  color: var(--st-muted); font-size: 13px; border-bottom: 1px solid var(--st-line-soft); padding-top: 0;
}

.st-fiba-count{
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--st-line-soft); padding: 14px 18px; margin: 4px 0 18px; max-width: 640px;
}
.st-fiba-count-n{
  font-family: var(--st-serif, Georgia, serif); font-size: 26px; color: var(--st-accent);
  text-transform: capitalize;
}
.st-fiba-count-l{ color: var(--st-muted); font-size: 14px; }

.st-fiba-groups{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin: 0 0 18px; max-width: 900px;
}
.st-fiba-group{ border: 1px solid var(--st-line-soft); padding: 12px 14px; }
.st-fiba-group h5{
  margin: 0 0 6px; font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--st-muted);
}
.st-fiba-group p{ margin: 0; font-size: 14px; line-height: 1.5; }

.st-fiba-fixtures{ display: flex; flex-direction: column; max-width: 760px; }
.st-fiba-fx{
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 0; border-bottom: 1px solid var(--st-line-soft);
}
.st-fiba-fx-d{ font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--st-muted); }
.st-fiba-fx-g{ font-size: 16px; font-weight: 600; color: var(--st-text); }
.st-fiba-fx-v{ font-size: 13px; color: var(--st-muted); }
.st-fiba-fx-usa .st-fiba-fx-g{ color: var(--st-accent); }

/* flags + photo header (2026-10-13 visuals pass): flags sit beside the
   country name in the same fixed-box spirit as .st-logo crests elsewhere
   in the hub; the hero is a real-photo band above the switches. */
.st-fiba-id{ display: inline-flex; align-items: center; gap: 9px; }
.st-fiba-flag{
  width: 30px; height: 20px; object-fit: cover; flex: 0 0 auto; display: block;
  border-radius: 3px; border: 1px solid var(--st-line-soft);
}
.st-fiba-hero{ margin: 16px 0 2px; }
.st-fiba-hero img{
  width: 100%; height: 230px; object-fit: cover; object-position: center 35%;
  display: block; border-radius: 12px; border: 1px solid var(--st-line-soft);
}
.st-fiba-hero figcaption{ font-size: 12px; color: var(--st-muted); margin-top: 6px; }
.st-fiba-group p.st-fiba-teams{ display: flex; flex-wrap: wrap; gap: 7px 14px; }
.st-fiba-tm{ display: inline-flex; align-items: center; gap: 6px; }
.st-fiba-tm .st-fiba-flag{ width: 22px; height: 15px; }
.st-fiba-vs{ color: var(--st-muted); font-weight: 400; font-size: 13px; margin: 0 7px; }

/* rosters view (2026-10-13): team selector chips + roster table */
.st-fiba-tchips{ display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 2px; }
.st-fiba-tchip{
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border: 1px solid var(--st-line-soft); border-radius: 999px; background: transparent;
  font-family: var(--st-sans); font-size: 13px; font-weight: 600; color: var(--st-muted);
  cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.st-fiba-tchip .st-fiba-flag{ width: 22px; height: 15px; }
.st-fiba-tchip:hover{ color: var(--st-text); }
.st-fiba-tchip.is-active{ background: var(--st-accent); border-color: var(--st-accent); color: #fff; }
.st-fiba-tchip:focus-visible{ outline: 2px solid var(--st-accent); outline-offset: 2px; }
.st-fiba-tchip-rk{ font-size: 11px; font-weight: 700; letter-spacing: .5px; opacity: .75; }
.st-fiba-rfin{ color: var(--st-muted); font-size: 13px; font-weight: 600; margin-left: 10px; }
.st-fiba-rtable{ max-width: 760px; }
.st-fiba-rtable th:last-child{ text-align: left; }
.st-fiba-cap{
  display: inline-block; min-width: 17px; text-align: center; padding: 1px 4px; margin-left: 6px;
  border: 1px solid var(--st-line-soft); border-radius: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--st-accent);
  vertical-align: 1px;
}
.st-fiba-note a{ color: var(--st-accent); }

/* rosters phone fit: fixed layout so long club names wrap inside the
   column instead of pushing the table past the viewport edge */
@media (max-width: 720px){
  .st-fiba-rtable{ table-layout: fixed; width: 100%; font-size: 13px; }
  .st-fiba-rtable th, .st-fiba-rtable td{ padding: 7px 5px; overflow-wrap: break-word; }
  .st-fiba-rtable th:nth-child(1), .st-fiba-rtable td:nth-child(1){ width: 30px; }
  .st-fiba-rtable th:nth-child(3), .st-fiba-rtable td:nth-child(3){ width: 62px; }
  .st-fiba-rtable th:nth-child(4), .st-fiba-rtable td:nth-child(4){ width: 70px; }
  .st-fiba-rtable th:nth-child(5), .st-fiba-rtable td:nth-child(5){ width: 88px; }
}

@media (max-width: 720px){
  .st-fiba{ padding: 20px 16px 4px; }
  .st-fiba-hero img{ height: 150px; }
  .st-fiba-title{ font-size: 25px; }
  .st-fiba-switch, .st-fiba-views{ gap: 16px; }
  .st-fiba-table{ font-size: 14px; }
  .st-fiba-count-n{ font-size: 22px; }
}
