/* The data-table system and its two pagers. */
/* Modular data-table system — single source of truth for paginated tables; per-screen rules below. */
.data-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* Shared table chrome; widths/sorting/hover stay per table. */
.data-table,
.rules-table,
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
/* max-content only inside .data-table-wrap (it can scroll-x); unwrapped tables wrap to fit. */
.data-table-wrap table { min-width: max-content; }
/* fixed only for tables with explicit <col> widths — auto layout would override them. */
.data-table,
.rules-table {
  table-layout: fixed;
}
.data-table thead,
.rules-table thead,
.legal-table thead {
  background: var(--bg-2);
  position: sticky; top: 0; z-index: 1;
}
/* THE header fill + rule + ink, shared by every table family; size/spacing/padding stay
   per family below. Five screens once restated these as no-ops — join this list instead. */
.data-table thead th,
.rules-table thead th,
.legal-table thead th,
.bf-table thead th,
.fb-table thead th,
.dash-map-table thead th,
.sub-table thead th {
  color: var(--ink-3);
  text-transform: uppercase;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.data-table thead th,
.rules-table thead th,
.legal-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  background: var(--bg-2);
}
.data-table tbody td,
.rules-table tbody td,
.legal-table tbody td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  line-height: 1.5;
}
.data-table tbody tr:last-child td,
.rules-table tbody tr:last-child td,
.legal-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--bg-hover); }

/* Full-width row so the centred pill aligns with the table above (align-self:center alone fails in some wrap-mode combos). */
.data-pagination-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}
.data-pagination {
  display: inline-flex; align-items: center; gap: 8px;
  justify-content: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
}
.data-page-btn { min-width: 38px; }
.data-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* THE one pagination style (DataCard.paginationHtml) — every table renders this; do NOT add another pager. */
.sk-pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--divider);
  background: var(--bg-2);
  border-radius: var(--radius-m);
}
.sk-pagination-info { font-size: 0.82rem; }
.sk-pagination-info b { color: var(--ink); font-weight: 600; }
.sk-pagination-ctrls { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; min-width: 0; }
.sk-pagination-ctrls .btn { min-width: 34px; }
.sk-pg-edge { flex: none; display: inline-flex; align-items: center; gap: 0.375rem; }
.sk-pagination-nums { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; justify-content: center; }
.sk-pagination-nums .btn { flex: none; min-width: 34px; padding-left: 10px; padding-right: 10px; }
.sk-pagination-gap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; color: var(--ink-3); font-size: 0.9rem; user-select: none;
}
/* One strip per width tier, exactly one shown. The gap positions differ per tier, so the strips
   are whole alternatives rather than one strip with numbers hidden. */
.sk-pg-md { display: none; }
/* Active page is bronze (green is reserved for the landing "Play" CTA). */
.sk-pagination .btn-primary {
  background: var(--bronze-gradient);
  color: var(--on-bronze);
  border-color: var(--bronze-deep);
}
.sk-pagination .btn-primary:hover:not(:disabled) {
  background: var(--bronze-gradient-hover);
  border-color: var(--bronze-deep);
}
@media (max-width: 640px) {
  .sk-pagination { padding: 0.625rem 0.75rem; gap: 0.625rem; }
  .sk-pagination-info { order: 2; flex-basis: 100%; text-align: center; }
  .sk-pagination-ctrls { order: 1; width: 100%; justify-content: center; gap: 0.375rem; }
  /* The number row must WRAP inside the panel — nowrap spills the buttons outside the grey card. */
  .sk-pagination-nums { flex-wrap: wrap; row-gap: 0.375rem; min-width: 0; gap: 0.375rem; }
  .sk-pagination-gap { width: 16px; }
  .sk-pg-lg { display: none; }
  .sk-pg-md { display: flex; }
  /* Edges go icon-only so Prev/Next stop eating the strip's width and it stays on ONE row.
     aria-label on the button carries the name the hidden span was providing. */
  .sk-pg-lbl { display: none; }
  .sk-pg-edge { gap: 0; }
  .sk-pagination-ctrls .btn { min-width: 2.375rem; min-height: 2.375rem; padding-left: 0.5rem; padding-right: 0.5rem; }
}
@media (max-width: 640px) {
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
