/**
 * Shared live-session standings screen (RR, ladder, etc.)
 * Screen-scoped rules mirrored from live-session.css — .ls-standings-screen only.
 */

/* MLP standings page — flush full-bleed + royal cobalt rank strip */
#live-session:has(.ls-standings-screen) {

  background: #FFFFFF;

}

#live-session .ls-body:has(.ls-standings-screen) {

  background: #FFFFFF;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;

}

.ls-content-light.ls-standings-screen {

  background: #FFFFFF;
  color: var(--ps, #1E293B);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;

}

.mlp-standings-panel--flush .standings-panel-title {
  margin: 0;
  padding: 8px 4px 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--pn, #1E3A8A);
  letter-spacing: 0.02em;
}

#live-session .ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-stage::-webkit-scrollbar {

  width: 10px;
  height: 10px;

}

#live-session .ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-stage::-webkit-scrollbar-track {

  background: var(--pgl, #EFF6FF);

}

#live-session .ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-stage::-webkit-scrollbar-thumb {

  background: var(--info-bd, #93C5FD);
  border-radius: 6px;
  border: 2px solid var(--pgl, #EFF6FF);

}

#live-session .ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-stage::-webkit-scrollbar-thumb:hover {

  background: var(--pg, #2563EB);

}

#live-session .ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-stage::-webkit-scrollbar-corner {

  background: var(--pgl, #EFF6FF);

}

.mlp-standings-panel--flush .mlp-standings-results-body
.ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-scroll {

  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  overflow: visible;

}

.ls-standings-screen .mlp-standings-panel--flush .mlp-standings-table-scroll .standings-table {

  width: 100%;
  min-width: 100%;

}

/* MLP standings — sticky column headers while table body scrolls (th only; not thead — breaks freeze corners) */
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table thead
#live-session .ls-content-light.ls-standings-screen .standings-table--modern.mlp-standings-table thead {

  position: relative;
  top: auto;
  z-index: auto;

}

#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table th {

  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--pgl, #EFF6FF);
  box-shadow: 0 1px 0 var(--info-bd, #93C5FD);

}

/* MLP standings — freeze rank + identity columns on horizontal scroll */
/* All viewports: rank (#) column frozen horizontally */
#live-session .ls-standings-screen .mlp-standings-table--freeze-cols tbody td:nth-child(1) {

  position: sticky;
  left: 0;
  z-index: 9;
  box-shadow: 4px 0 10px -6px rgba(30, 58, 138, 0.18);

}

#live-session .ls-standings-screen .mlp-standings-table--freeze-cols thead th:nth-child(1) {

  position: sticky;
  top: 0;
  left: 0;
  z-index: 15;
  background: var(--pgl, #EFF6FF);
  box-shadow: 0 1px 0 var(--info-bd, #93C5FD), 4px 0 10px -6px rgba(30, 58, 138, 0.22);

}

#live-session .ls-standings-screen .mlp-standings-table--freeze-cols thead th:nth-child(-n+3) {

  background: var(--pgl, #EFF6FF);

}

/* Metrics drawer — royal cobalt (#live-session beats events.css :is(#id…) green defaults) */
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .mlp-standings-meta
#live-session .ls-standings-screen .mlp-standings-metrics-pipeline {

  margin: 0;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline--compact {

  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 10px 14px !important;
  margin: 0;
  background: #FFFFFF !important;
  border: 1px solid var(--info-bd, #93C5FD) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08) !important;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-compact-label {

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pn, #1E3A8A) !important;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--pgl, #EFF6FF) !important;
  border: 1px solid var(--info-bd, #93C5FD) !important;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-track {

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 1 1 auto;
  min-width: 0;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip {

  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px !important;
  border-radius: 999px;
  background: #FFFFFF !important;
  border: 1px solid var(--info-bd, #93C5FD) !important;
  box-shadow: none !important;
  color: var(--pn, #1E3A8A) !important;
  font-size: 12px;
  font-weight: 700;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--primary {

  background: var(--pnl, #DBEAFE) !important;
  border: 1.5px solid var(--pg, #2563EB) !important;
  color: var(--pn, #1E3A8A) !important;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip-name {

  color: var(--pn, #1E3A8A) !important;
  font-size: 13px;
  font-weight: 800;
  max-width: min(220px, 38vw);

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip-step {

  width: 22px !important;
  height: 22px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF !important;
  background: var(--pn, #1E3A8A) !important;
  flex-shrink: 0;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--primary .er-ranking-pipeline-chip-step {

  background: var(--pg, #2563EB) !important;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--pointShare .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--pointPct .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--gameWinRate .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--winpct .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--courtPts .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--courtPointPct .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--lineDiff .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--lineWinPct .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--pointDiff .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--seasonPts .er-ranking-pipeline-chip-step
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-chip--totalPts .er-ranking-pipeline-chip-step {

  background: var(--pn, #1E3A8A) !important;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-ranking-pipeline-sep {

  color: var(--pg, #2563EB) !important;
  font-size: 13px;
  opacity: 0.75;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-metric-tip {

  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 50%;
  background: var(--pgl, #EFF6FF) !important;
  color: var(--pn, #1E3A8A) !important;
  border: 1px solid var(--info-bd, #93C5FD) !important;
  box-shadow: none !important;

}

#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-metric-tip:hover
#live-session .ls-standings-screen .mlp-standings-metrics-drawer .er-metric-tip:focus-visible {

  background: var(--pnl, #DBEAFE) !important;
  color: var(--pgd, #1D4ED8) !important;

}

/* MLP standings live tab — readable column headers (overrides 10px ls-mlp-screen defaults) */
#live-session .ls-content-light.ls-standings-screen .standings-table.mlp-standings-table th
#live-session .ls-standings-screen .standings-table.mlp-standings-table th {

  font-size: 14px;
  font-weight: 800;
  padding: 13px 12px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--pn, #1E3A8A);
  background: var(--pgl, #EFF6FF);
  border-bottom: 2px solid var(--info-bd, #93C5FD);

}

#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-rank
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-player
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-metric
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-metric--full
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-num--full
#live-session .ls-standings-screen .mlp-team-standings th
#live-session .ls-standings-screen .mlp-line-standings th {

  font-size: 14px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--pn, #1E3A8A);

}

#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-num {

  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--pn, #1E3A8A);

}

#live-session .ls-standings-screen .mlp-team-standings th.st-th-line-diff {

  font-size: 13px;
  font-weight: 800;
  white-space: normal;
  line-height: 1.3;
  min-width: 5.75rem;

}

#live-session .ls-standings-screen .mlp-standings-table .st-th-metric-inner {

  gap: 6px;
  font-size: inherit;
  line-height: 1.35;

}

#live-session .ls-standings-screen .mlp-standings-table .st-th-metric-inner .er-metric-tip {

  width: 22px;
  height: 22px;
  min-width: 22px;
  font-size: 15px;

}

/* MLP standings — min/max mascot badges in metric cells */
.ls-standings-screen .mlp-metric-cell {

  --mlp-metric-badge-size: 38px;
  display: grid;
  grid-template-columns: 1fr 4ch var(--mlp-metric-badge-size) 1fr;
  align-items: center;
  column-gap: 4px;
  width: 100%;

}

.ls-standings-screen .mlp-metric-cell-val {

  grid-column: 2;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  line-height: 1.2;

}

.ls-standings-screen .mlp-metric-cell-val .st-metric-cell {

  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  margin-left: auto;

}

.ls-standings-screen .mlp-metric-cell-val .st-metric-val
.ls-standings-screen .mlp-metric-cell-val .st-num
.ls-standings-screen .mlp-metric-cell-val .st-diff
.ls-standings-screen .mlp-metric-cell-val .st-metric-plain {

  text-align: right;

}

.ls-standings-screen .mlp-metric-cell-badge {

  grid-column: 3;
  width: var(--mlp-metric-badge-size);
  height: var(--mlp-metric-badge-size);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;

}

.ls-standings-screen .mlp-metric-cell--pct {

  grid-template-columns: 1fr 7.75ch var(--mlp-metric-badge-size) 1fr;
  column-gap: 6px;

}

.ls-standings-screen .mlp-metric-cell--pct .mlp-metric-cell-val {

  padding-right: 1px;

}

.ls-standings-screen .mlp-metric-extreme {

  display: block;
  width: var(--mlp-metric-badge-size);
  height: var(--mlp-metric-badge-size);
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;

}

.ls-standings-screen .mlp-metric-extreme--eagle-max {

  background-image: url(../assets/mlp-metric-badges/eagle.png?v=transparent);

}

.ls-standings-screen .mlp-metric-extreme--chicken-min {

  background-image: url(../assets/mlp-metric-badges/chicken.png?v=transparent);

}

.ls-standings-screen .mlp-metric-extreme--tiger-min {

  background-image: url(../assets/mlp-metric-badges/tiger.png?v=transparent);

}

.ls-standings-screen .mlp-metric-extreme--sloth-max {

  background-image: url(../assets/mlp-metric-badges/sloth.png?v=transparent);

}

/* End-season / action row below flush standings panel */
#live-session .ls-content-light.ls-standings-screen > .mlp-week-finish-row {

  flex-shrink: 0;
  margin: 0;
  padding: 12px clamp(12px, 2.5vw, 20px) max(12px, env(safe-area-inset-bottom, 0));

}

/* MLP standings — show full player / team / line names (no ellipsis) */
#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-col-player
#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-th-player
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-col-player
#live-session .ls-standings-screen .standings-table--modern.mlp-standings-table .st-th-player {

  width: auto;
  min-width: 8.5rem;
  max-width: none;

}

#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-col-squad
#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-col-line-team {

  width: auto;
  min-width: 6.5rem;
  max-width: none;
  white-space: nowrap;

}

#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-player-name
#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-line-team-name
#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-squad-name {

  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
  max-width: none;

}

#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-player
#live-session .ls-standings-screen .standings-table.mlp-standings-table .mlp-standings-player-link.st-player {

  max-width: none;
  width: 100%;
  margin-inline: 0;
  justify-content: flex-start;

}

#live-session .ls-standings-screen .standings-table.mlp-standings-table .st-squad-cell {

  max-width: none;

}

/* Players tab — keep player and team columns from overlapping */
#live-session .ls-standings-screen .mlp-individual-standings .st-col-player
#live-session .ls-standings-screen .mlp-individual-standings .st-col-squad {

  overflow: clip;
  vertical-align: middle;

}

#live-session .ls-standings-screen .mlp-individual-standings .st-col-player .st-player
#live-session .ls-standings-screen .mlp-individual-standings .st-col-player .mlp-standings-player-link.st-player {

  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  justify-content: flex-start;

}

#live-session .ls-standings-screen .mlp-individual-standings .st-col-squad .st-squad-cell {

  align-items: center;

}

/* Sections below flush standings panel (playoff race, action rows) */
#live-session .ls-content-light.ls-standings-screen > .standings-playoff-race-wrap {
  flex-shrink: 0;
  margin: 0;
  padding: 12px clamp(12px, 2.5vw, 20px) max(12px, env(safe-area-inset-bottom, 0));
  background: #FFFFFF;
  border-top: 1px solid var(--info-bd, #93C5FD);
}

#live-session .ls-content-light.ls-standings-screen > .standings-playoff-race-wrap .standings-panel-title {
  margin-bottom: 10px;
}

/* RR / doubles partnership team column */
#live-session .ls-standings-screen .standings-partnership-standings .st-partnership-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: max-content;
  max-width: none;
  margin-inline: auto;
}

#live-session .ls-standings-screen .standings-partnership-standings .st-partnership-avatars {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

#live-session .ls-standings-screen .standings-partnership-standings .st-av--pair {
  width: 28px;
  height: 28px;
  font-size: 10px;
  line-height: 28px;
  margin-left: -7px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

#live-session .ls-standings-screen .standings-partnership-standings .st-partnership-avatars .st-av--pair:first-child {
  margin-left: 0;
}

#live-session .ls-standings-screen .standings-partnership-standings .st-col-squad,
#live-session .ls-standings-screen .standings-partnership-standings .st-th-squad {
  min-width: 8.5rem;
  max-width: none;
}

#live-session .ls-standings-screen .standings-partnership-standings .st-squad-name {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
  max-width: none;
  font-weight: 600;
  color: var(--ps, #1E293B);
}
