/* ── Hard stop on page-level scroll ── */
html, body {
  max-width: 100% !important;
}

/* ── Clamp all DataTables-generated wrappers ── */
.sheet-embed,
.sheet-embed .dataTables_wrapper,
.sheet-embed .dataTables_scroll,
.sheet-embed .dataTables_scrollHead,
.sheet-embed .dataTables_scrollHeadInner,
.sheet-embed .dataTables_scrollBody {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* ── Force both tables (header + body) to fit ── */
.sheet-embed .dataTables_scrollHeadInner table,
.sheet-embed .dataTables_scrollBody table,
.sheet-embed table.sheetTable {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  box-sizing: border-box !important;
}

/* ── Two-line row layout ── */
.sheetTable thead tr,
.sheetTable tbody tr {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: baseline !important;
}

/* ── Stat cells share the first line ── */
.sheetTable th,
.sheetTable td {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
}

/* ── Writeup on its own full-width second line ── */
.sheetTable th:last-child,
.sheetTable td:last-child {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  box-sizing: border-box !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(128,128,128,0.2) !important;
  font-size: 0.9em !important;
}

/* Custom for Draft Board */
.fa-arrow-circle-up {
  font-size: 28px;
  color: green;
}

.fa-arrow-circle-down {
  font-size: 28px;
  color: red;
}

.sheetTable tr th:last-of-type {
  display: none;
}

.sheetTable tbody tr td {
  background: none !important;
  border-top: none !important;
}

.sheetTable tbody tr td:nth-of-type(1) {
  color: rgb( var(--theme-link) );
  font-size: 22px;
}

.sheetTable tbody tr td:nth-of-type(3) {
  font-size: 16px;
  font-weight: bold;
}

.sheetTable tbody tr td:last-of-type {
  background: rgb( var(--theme-link) ) !important;
  padding: 8px;
  color: white;
  border-radius: 0 0 8px 8px;
  font-size: 14px !important;
}

.sheetTable tbody tr {
  margin-bottom: 8px;
}

.sheetTable thead tr th:nth-of-type(1),  .sheetTable thead tr th:nth-of-type(4), .sheetTable thead tr th:nth-of-type(5), .sheetTable thead tr th:nth-of-type(6), .sheetTable thead tr th:nth-of-type(7) {
  width: 6% !important;
}

.sheetTable thead tr th:nth-of-type(2), .sheetTable thead tr th:nth-of-type(9) {
  width: 9% !important;
}

.sheetTable thead tr th:nth-of-type(3) {
  width: 24% !important;
}

.sheetTable thead tr th:nth-of-type(8) {
  width: 28% !important;
}

.sheetTable tbody tr td:nth-of-type(1),  .sheetTable tbody tr td:nth-of-type(4), .sheetTable tbody tr td:nth-of-type(5), .sheetTable tbody tr td:nth-of-type(6), .sheetTable tbody tr td:nth-of-type(7) {
  width: 6% !important;
}

.sheetTable tbody tr td:nth-of-type(2), .sheetTable tbody tr td:nth-of-type(9) {
  width: 9% !important;
}

.sheetTable tbody tr td:nth-of-type(3) {
  width: 24% !important;
}

.sheetTable tbody tr td:nth-of-type(8) {
  width: 28% !important;
}

.sheetTable tbody tr td:nth-of-type(9) {
  text-align: right;
}

.sheetTable tbody .draft-team-logo img {
  height: 40px;
  width: 40px;
}

.team-logo-insert {
  margin: 0 0 -14px 0;
}

@media (max-width: 600px) {
  
  .sheetTable thead tr th {
    display: none;
  }

  /* Line 1: Rank 14%, Position 20%, Name 52%, Age 14% */
  .sheetTable th:nth-child(1),
  .sheetTable td:nth-child(1) {
    flex: 0 0 14% !important;
    width: 14% !important;
  }

  .sheetTable th:nth-child(2),
  .sheetTable td:nth-child(2) {
    flex: 0 0 16% !important;
    width: 16% !important;
  }

  .sheetTable th:nth-child(3),
  .sheetTable td:nth-child(3) {
    flex: 0 0 56% !important;
    width: 56% !important;
  }

  .sheetTable th:nth-child(4),
  .sheetTable td:nth-child(4) {
    flex: 0 0 14% !important;
    width: 14% !important;
  }

  /* Line 2: Ht 14%, Wt 14%, B/T 14%, School 44%, Up/Down 14% */
  .sheetTable th:nth-child(5),
  .sheetTable td:nth-child(5) {
    flex: 0 0 14% !important;
    width: 14% !important;
  }

  .sheetTable th:nth-child(6),
  .sheetTable td:nth-child(6) {
    flex: 0 0 14% !important;
    width: 14% !important;
  }

  .sheetTable th:nth-child(7),
  .sheetTable td:nth-child(7) {
    flex: 0 0 14% !important;
    width: 14% !important;
  }

  .sheetTable th:nth-child(8),
  .sheetTable td:nth-child(8) {
    flex: 0 0 44% !important;
    width: 44% !important;
  }

  .sheetTable th:nth-child(9),
  .sheetTable td:nth-child(9) {
    flex: 0 0 14% !important;
    width: 14% !important;
  }

  /* Truncate all stat cells cleanly */
  .sheetTable th:not(:last-child),
  .sheetTable td:not(:last-child) {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
  }

}