/* Lineup Hawk dense, sortable tables — Clean Pro Light. Preview batch 3. */
:root {
  --lh-subnav-h: 0px;
  --lh-pos-w: 2.6rem;
  --lh-rail-w: 3px;
}

.lh-stand-extra { display: none; }

.lh-table-wrap,
.table-wrap.lh-table-wrap,
.st-table-wrap.lh-table-wrap {
  position: relative;
}

/* Density */
.lh-table {
  font-size: 0.82rem;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.lh-table thead th {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.42rem 0.5rem;
  white-space: nowrap;
  color: #fff;
  background: var(--navy, #132033);
  border-bottom: 0;
  vertical-align: middle;
}
.lh-table td {
  padding: 0.36rem 0.5rem;
  line-height: 1.3;
  vertical-align: middle;
  border-bottom: 1px solid var(--line, #e7e0d4);
  background: var(--paper, #fff);
}
.lh-table tbody tr:nth-child(even) td {
  background: var(--row, #fbf8f2);
}
.lh-table tbody tr:hover td {
  background: var(--gold-soft, #f8edd3);
}
.lh-table .num, .lh-table .st-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

/* Sortable headers — native button for keyboard access */
.lh-sort-btn {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
}
.lh-sort-btn:focus-visible {
  outline: 2px solid var(--gold, #e8a01a);
  outline-offset: 2px;
  border-radius: 2px;
}
.lh-sort-ind {
  display: inline-block;
  width: 0.7em;
  font-size: 0.85em;
  line-height: 1;
  opacity: 0.4;
  font-weight: 700;
}
.lh-sort-ind::before { content: "↕"; }
th[aria-sort="ascending"] .lh-sort-ind { opacity: 1; color: var(--gold, #e8a01a); }
th[aria-sort="descending"] .lh-sort-ind { opacity: 1; color: var(--gold, #e8a01a); }
th[aria-sort="ascending"] .lh-sort-ind::before { content: "▲"; }
th[aria-sort="descending"] .lh-sort-ind::before { content: "▼"; }

/* Sticky header (inside the scrolling wrap) + sticky player/team column */
@media (min-width: 900px) {
  .lh-table-wrap {
    max-height: calc(100vh - var(--header-h, 4rem) - var(--lh-subnav-h, 0px) - 1.25rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
.lh-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}
.lh-table th.lh-sticky,
.lh-table td.lh-sticky,
.lh-table th.player-cell,
.lh-table td.player-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 var(--line, #e7e0d4), 6px 0 10px -8px rgba(19, 32, 51, 0.28);
}
.lh-table thead th.lh-sticky,
.lh-table thead th.player-cell {
  z-index: 5;
  background: var(--navy, #132033);
  box-shadow: 1px 0 0 rgba(255,255,255,0.15), 6px 0 10px -8px rgba(19, 32, 51, 0.4);
}
/* Pos + Player both stick on DFS tables */
.lh-table th.pos,
.lh-table td.pos {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: var(--lh-pos-w);
  width: var(--lh-pos-w);
  box-shadow: none;
}
.lh-table thead th.pos { z-index: 5; background: var(--navy, #132033); }
.lh-table.has-pos th.player-cell,
.lh-table.has-pos td.player-cell {
  left: var(--lh-pos-w);
}
.lh-table.has-pos thead th.player-cell { z-index: 5; }

/* Team color rail (left edge of the sticky cell) */
.lh-table td.lh-sticky,
.lh-table td.player-cell {
  padding-left: calc(0.5rem + var(--lh-rail-w));
}
.lh-table td.lh-sticky::before,
.lh-table td.player-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--lh-rail-w);
  background: var(--lh-rail, var(--navy, #132033));
}
/* Two-team rows (odds): split rail */
.lh-table tr.lh-two-tone td.lh-sticky::before,
.lh-table tr.lh-two-tone td.player-cell::before {
  background: linear-gradient(to bottom, var(--lh-rail, var(--navy)) 50%, var(--lh-rail-2, var(--navy-2, #1c2c40)) 50%);
}

/* Team color chip (used on odds/standings game or team cell) */
.lh-chip {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: 0.05rem;
  background: var(--lh-rail, var(--navy));
  box-shadow: 0 0 0 1px rgba(19, 32, 51, 0.12);
}
.lh-chip-pair { display: inline-flex; gap: 2px; margin-right: 0.4rem; vertical-align: 0.1rem; }
.lh-chip-pair .lh-chip { margin-right: 0; }

/* Filters */
.lh-table-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0.15rem 0 0.55rem;
}
.lh-table-filters[hidden] { display: none; }
.lh-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.lh-filter-group .lh-filter-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin-right: 0.15rem;
}
.lh-filter-group button {
  appearance: none;
  border: 1px solid var(--line, #e7e0d4);
  background: var(--paper, #fff);
  color: var(--ink, #132033);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
}
.lh-filter-group button:hover { border-color: var(--navy, #132033); }
.lh-filter-group button[aria-pressed="true"] {
  background: var(--navy, #132033);
  color: #fff;
  border-color: var(--navy, #132033);
}
.lh-filter-group button:focus-visible,
.lh-filter-group select:focus-visible {
  outline: 2px solid var(--gold, #e8a01a);
  outline-offset: 2px;
}
.lh-filter-group select {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink, #132033);
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e7e0d4);
  border-radius: 8px;
  padding: 0.28rem 0.5rem;
  max-width: 14rem;
}
.lh-filter-hide { display: none !important; }

.lh-filter-group.lh-filter-player {
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: 24rem;
}
.lh-filter-group.lh-filter-player input[type="search"] {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink, #132033);
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e7e0d4);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  width: 100%;
  min-width: 12rem;
  box-sizing: border-box;
}
.filters.sport-props-filters {
  display: block;
  visibility: visible;
  margin: 0.75rem 0 0.9rem;
  padding: 0.75rem 0.85rem;
  background: var(--paper, #fff);
}
.filters.sport-props-filters .filter-bar {
  display: grid;
  grid-template-columns: minmax(12rem, 24rem);
  width: 100%;
}
.filters.sport-props-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.filters.sport-props-filters input[type="search"] {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink, #132033);
  border: 1px solid var(--line, #e7e0d4);
  border-radius: 0.45rem;
  padding: 0.4rem 0.5rem;
  background: #fff;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 639px) {
  .lh-filter-group.lh-filter-player,
  .filters.sport-props-filters .filter-bar {
    max-width: none;
    width: 100%;
    flex-basis: 100%;
    grid-template-columns: 1fr;
  }
  .filters.sport-props-filters { padding: 0.7rem 0.75rem; }
}


/* Keep label colors and locked rows intact */
.lh-table .conf-badge, .lh-table .lean, .lh-table .team-badge { position: relative; }
.lh-table tr.row-locked td { opacity: 1; }

/* --------- Phone: Odds + Standings, no sideways swipe for key cols --------- */
@media (max-width: 639px) {
  /* Hide the desktop sort header visually, but keep it from blowing out
     the page width. overflow:visible on the wrap let the nowrap sort
     buttons stick out ~10px on /cfb/odds at 390px. */
  .st-table-wrap:has(.lh-odds),
  .st-table-wrap:has(.lh-stand),
  .lh-table-wrap:has(.lh-odds),
  .lh-table-wrap:has(.lh-stand) {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-height: none;
    max-width: 100%;
  }
  .lh-odds thead,
  .lh-stand thead {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 1px !important;
    height: 1px !important;
    max-width: 1px;
    max-height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
  }
  .lh-odds thead .lh-sort-btn,
  .lh-stand thead .lh-sort-btn,
  .lh-odds thead th,
  .lh-stand thead th {
    max-width: 1px;
    overflow: hidden;
    white-space: nowrap;
  }
  .lh-odds,
  .lh-stand,
  .lh-odds tbody,
  .lh-stand tbody {
    display: block;
    width: 100%;
  }
  .lh-odds tbody tr,
  .lh-stand tbody tr {
    display: grid;
    gap: 0.35rem 0.75rem;
    padding: 0.7rem 0.75rem 0.7rem 0.9rem;
    margin: 0 0 0.5rem;
    border: 1px solid var(--line, #e7e0d4);
    border-radius: 10px;
    background: var(--paper, #fff);
    position: relative;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
  }
  .lh-odds tbody tr { grid-template-columns: 1fr 1fr; }
  .lh-stand tbody tr { grid-template-columns: minmax(0, 1fr) 2.4rem 2.4rem 3.4rem; align-items: start; }

  .lh-odds td,
  .lh-stand td,
  .lh-odds td.lh-sticky,
  .lh-odds td.player-cell,
  .lh-stand td.lh-sticky,
  .lh-stand td.player-cell,
  .lh-odds tbody tr:nth-child(even) td,
  .lh-stand tbody tr:nth-child(even) td,
  .lh-odds tbody tr:hover td,
  .lh-stand tbody tr:hover td {
    background: transparent !important;
    border: 0;
    padding: 0;
    box-shadow: none !important;
    position: static !important;
    left: auto !important;
    min-width: 0;
  }
  .lh-odds td.lh-sticky::before,
  .lh-odds td.player-cell::before,
  .lh-stand td.lh-sticky::before,
  .lh-stand td.player-cell::before { content: none !important; }

  .lh-odds tbody tr::before,
  .lh-stand tbody tr::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--lh-rail-w);
    border-radius: 10px 0 0 10px;
    background: var(--lh-rail, var(--navy, #132033));
  }
  .lh-odds tbody tr.lh-two-tone::before {
    background: linear-gradient(to bottom, var(--lh-rail, var(--navy)) 50%, var(--lh-rail-2, var(--navy-2, #1c2c40)) 50%);
  }

  /* Odds: game on its own row, then Spread/Total and the two moneylines. */
  .lh-odds td:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
  .lh-odds td:nth-child(2) { grid-column: 1; grid-row: 2; } /* away ML */
  .lh-odds td:nth-child(3) { grid-column: 2; grid-row: 2; } /* home ML */
  .lh-odds td:nth-child(4) { grid-column: 1; grid-row: 3; } /* spread */
  .lh-odds td:nth-child(5) { grid-column: 2; grid-row: 3; } /* total */
  .lh-odds td:nth-child(6),
  .lh-odds td:nth-child(7) { display: none !important; }
  .lh-odds td:nth-child(n+2) {
    font-size: 0.84rem;
    text-align: left;
    font-variant-numeric: tabular-nums;
  }
  .lh-odds td:nth-child(n+2)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted, #6b7280);
    margin-bottom: 0.1rem;
  }
  .lh-odds .st-move { font-size: 0.72rem; color: var(--muted, #6b7280); margin-top: 0.15rem; }

  /* Standings: Team + W L Pct (or W L Pts for NHL). Extra line holds the rest. */
  .lh-stand td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; min-width: 0; }
  .lh-stand:not(.lh-nhl-stand) td:nth-child(2) { grid-column: 2; grid-row: 1; } /* W */
  .lh-stand:not(.lh-nhl-stand) td:nth-child(3) { grid-column: 3; grid-row: 1; } /* L */
  .lh-stand:not(.lh-nhl-stand) td:nth-child(5) { grid-column: 4; grid-row: 1; } /* Pct */
  .lh-stand:not(.lh-nhl-stand) td:nth-child(4),
  .lh-stand:not(.lh-nhl-stand) td:nth-child(n+6) { display: none !important; }

  .lh-stand.lh-nhl-stand td:nth-child(3) { grid-column: 2; grid-row: 1; } /* W */
  .lh-stand.lh-nhl-stand td:nth-child(4) { grid-column: 3; grid-row: 1; } /* L */
  .lh-stand.lh-nhl-stand td:nth-child(6) { grid-column: 4; grid-row: 1; } /* Pts */
  .lh-stand.lh-nhl-stand td:nth-child(2),
  .lh-stand.lh-nhl-stand td:nth-child(5),
  .lh-stand.lh-nhl-stand td:nth-child(n+7) { display: none !important; }

  .lh-stand td:nth-child(2),
  .lh-stand td:nth-child(3),
  .lh-stand:not(.lh-nhl-stand) td:nth-child(5),
  .lh-stand.lh-nhl-stand td:nth-child(6) {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
  }
  .lh-stand td:nth-child(2)::before,
  .lh-stand td:nth-child(3)::before,
  .lh-stand:not(.lh-nhl-stand) td:nth-child(5)::before,
  .lh-stand.lh-nhl-stand td:nth-child(6)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted, #6b7280);
  }
  .lh-stand-extra {
    display: none;
  }
  .lh-stand td:nth-child(1) .lh-stand-extra {
    display: block;
    grid-column: 1 / -1;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted, #6b7280);
    margin-top: 0.28rem;
    white-space: normal;
    line-height: 1.35;
  }
  /* Let the extra line stay under the team name so W / L / Pct stay clean. */

  /* Undo the global "hide 3rd column on phones" rule (it hid L and Home ML). */
  table.data.lh-odds td:nth-child(3),
  table.data.lh-odds th:nth-child(3),
  table.data.lh-stand td:nth-child(3),
  table.data.lh-stand th:nth-child(3),
  .lh-odds td:nth-child(3),
  .lh-stand td:nth-child(3) {
    display: block !important;
  }
}

/* Injuries: keep a real table on phone but don't force a wide min-width */
@media (max-width: 639px) {
  .lh-inj .st-move, .lh-inj th:nth-child(6), .lh-inj td:nth-child(6) {
    /* Est. return can wrap */
  }
  .st-table-wrap:has(.lh-inj) { overflow-x: auto; }
  .lh-inj td:nth-child(5) { /* note */ max-width: 9rem; white-space: normal; }
}

/* Don't let earlier "position: static" on st-table thead win */
.st-table.data.lh-table thead th { position: sticky; color: #fff; background: var(--navy, #132033); }
