/* Preview v9: sortable player stats + minimum sample controls. */
#l1psSampleFilters{
  display:none;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:max-content;
  max-width:100%;
  margin:0 auto 7px;
  padding:4px 6px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:7px;
  background:rgba(255,255,255,.025);
  color:#dfe2ec;
  font-size:10px;
  line-height:1;
}
#l1psSampleFilters .l1ps-filter-title{font-weight:700;opacity:.82;white-space:nowrap}
#l1psSampleFilters label{display:flex;align-items:center;gap:4px;white-space:nowrap}
#l1psSampleFilters input{
  width:54px;
  height:24px;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.11);
  border-radius:5px;
  background:rgba(16,16,28,.72);
  color:#fff;
  padding:2px 5px;
  text-align:center;
  font:inherit;
  font-variant-numeric:tabular-nums;
}
#l1psSampleFilters button{
  height:24px;
  border:0;
  border-radius:5px;
  padding:0 7px;
  background:var(--pill-dark);
  color:#e5e7ef;
  font-size:9.5px;
  cursor:pointer;
}
#l1psSampleFilters button:hover{background:rgba(255,255,255,.12)}

/*
  One sorter rule for every League One player-stat table.

  The live DataTables stylesheet uses its own before/after pseudo-elements and
  absolute positioning for sort arrows. Merely replacing the glyph left some
  of those inherited position/right/top rules active, which is why a few narrow
  headings still showed doubled or overlapping markers. Neutralise both native
  pseudo-elements completely, then draw exactly one experimental marker inline
  after the heading text. The same geometry now applies to every player table.
*/
#handicapTable.l1pc-table th.sorting,
#handicapTable.l1pc-table th.sorting_asc,
#handicapTable.l1pc-table th.sorting_desc,
#handicapTable.l1ps-sortable-player-stats th.sorting,
#handicapTable.l1ps-sortable-player-stats th.sorting_asc,
#handicapTable.l1ps-sortable-player-stats th.sorting_desc{
  cursor:pointer;
  background:none!important;
}

#handicapTable.l1pc-table th.sorting::before,
#handicapTable.l1pc-table th.sorting_asc::before,
#handicapTable.l1pc-table th.sorting_desc::before,
#handicapTable.l1ps-sortable-player-stats th.sorting::before,
#handicapTable.l1ps-sortable-player-stats th.sorting_asc::before,
#handicapTable.l1ps-sortable-player-stats th.sorting_desc::before{
  content:none!important;
  display:none!important;
  position:static!important;
  inset:auto!important;
  width:0!important;
  height:0!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  background:none!important;
}

#handicapTable.l1pc-table th.sorting::after,
#handicapTable.l1pc-table th.sorting_asc::after,
#handicapTable.l1pc-table th.sorting_desc::after,
#handicapTable.l1ps-sortable-player-stats th.sorting::after,
#handicapTable.l1ps-sortable-player-stats th.sorting_asc::after,
#handicapTable.l1ps-sortable-player-stats th.sorting_desc::after{
  position:static!important;
  inset:auto!important;
  display:inline-block!important;
  float:none!important;
  box-sizing:border-box;
  width:9px!important;
  height:auto!important;
  margin:0 0 0 6px!important;
  padding:0!important;
  transform:none!important;
  background:none!important;
  text-align:center;
  vertical-align:1px;
  color:rgba(229,231,239,.62)!important;
  font-family:Arial,sans-serif!important;
  font-style:normal!important;
  font-weight:700!important;
  pointer-events:none;
}

#handicapTable.l1pc-table th.sorting::after,
#handicapTable.l1ps-sortable-player-stats th.sorting::after{
  content:'⇅'!important;
  white-space:normal!important;
  font-size:9px!important;
  line-height:1!important;
  opacity:.58!important;
}
#handicapTable.l1pc-table th.sorting_asc::after,
#handicapTable.l1ps-sortable-player-stats th.sorting_asc::after{
  content:'▲'!important;
  font-size:7px!important;
  line-height:1!important;
  opacity:.95!important;
}
#handicapTable.l1pc-table th.sorting_desc::after,
#handicapTable.l1ps-sortable-player-stats th.sorting_desc::after{
  content:'▼'!important;
  font-size:7px!important;
  line-height:1!important;
  opacity:.95!important;
}

@media(min-width:701px){
  #handicapTable.l1pc-table{width:min(100%,1120px)!important}

  #handicapTable.l1pc-table th:nth-child(1),
  #handicapTable.l1pc-table td:nth-child(1){width:17%!important}
  #handicapTable.l1pc-table th:nth-child(2),
  #handicapTable.l1pc-table td:nth-child(2){width:14%!important}
  #handicapTable.l1pc-table th:nth-child(3),
  #handicapTable.l1pc-table td:nth-child(3){width:5.5%!important}
  #handicapTable.l1pc-table th:nth-child(4),
  #handicapTable.l1pc-table td:nth-child(4){width:6.5%!important}
  #handicapTable.l1pc-table th:nth-child(5),
  #handicapTable.l1pc-table td:nth-child(5),
  #handicapTable.l1pc-table th:nth-child(6),
  #handicapTable.l1pc-table td:nth-child(6){width:4.5%!important}
  #handicapTable.l1pc-table th:nth-child(7),
  #handicapTable.l1pc-table td:nth-child(7),
  #handicapTable.l1pc-table th:nth-child(8),
  #handicapTable.l1pc-table td:nth-child(8){width:7%!important}
  #handicapTable.l1pc-table th:nth-child(9),
  #handicapTable.l1pc-table td:nth-child(9),
  #handicapTable.l1pc-table th:nth-child(10),
  #handicapTable.l1pc-table td:nth-child(10),
  #handicapTable.l1pc-table th:nth-child(11),
  #handicapTable.l1pc-table td:nth-child(11),
  #handicapTable.l1pc-table th:nth-child(12),
  #handicapTable.l1pc-table td:nth-child(12){width:8.5%!important}

  #handicapTable.l1pc-table thead th:nth-child(n+3){
    padding-left:5px!important;
    padding-right:5px!important;
    text-align:center!important;
  }

  #tableContainer.top-scorer-mode:has(#handicapTable.l1ps-sortable-player-stats){max-width:1080px}
  #handicapTable.l1ps-sortable-player-stats thead th.top-scorer-num{
    padding-left:5px!important;
    padding-right:5px!important;
    font-size:11.5px;
    text-align:center!important;
  }
  #handicapTable.l1ps-sortable-player-stats thead th.top-scorer-player,
  #handicapTable.l1ps-sortable-player-stats thead th.top-scorer-team{
    padding-right:6px!important;
  }
}

@media(max-width:700px){
  #l1psSampleFilters{
    width:calc(100% - 12px);
    box-sizing:border-box;
    justify-content:center;
    gap:5px;
    margin-bottom:6px;
    padding:4px 5px;
    font-size:9px;
  }
  #l1psSampleFilters .l1ps-filter-title{display:none}
  #l1psSampleFilters input{width:48px;height:23px}
  #l1psSampleFilters button{height:23px;padding:0 6px;font-size:9px}

  #handicapTable.l1pc-table th.sorting::after,
  #handicapTable.l1pc-table th.sorting_asc::after,
  #handicapTable.l1pc-table th.sorting_desc::after,
  #handicapTable.l1ps-sortable-player-stats th.sorting::after,
  #handicapTable.l1ps-sortable-player-stats th.sorting_asc::after,
  #handicapTable.l1ps-sortable-player-stats th.sorting_desc::after{
    width:8px!important;
    margin-left:4px!important;
  }
}
