@font-face {
  font-family: "Campton-book";
  src: url("/fonts/Campton-Book.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Campton-medium";
  src: url("/fonts/Campton-Medium.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Campton-semibold";
  src: url("/fonts/Campton-SemiBold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Campton-bold";
  src: url("/fonts/Campton-Bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff;
  --card: #fff;
  --border: #e6e6e6;
  --text: #222;
  --muted: #666;
  --radius: 12px;
  --table-max-height: calc(100vh - 210px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Campton-book", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden; /* internal scroller lives in .table-body */
}

.page {
  width: 100%;
  max-width: none;
  margin: 16px 0 48px;
  padding: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#searchView {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.hidden {
  display: none !important;
}

.dash {
  color: #999;
  font-family: "Campton-book", Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-bar {
  margin: 12px 0 12px;
  flex: 0 0 auto;
  width: 50%;
  max-width: 50%;
}

.search-bar label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.search-bar input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: "Campton-book", Arial, Helvetica, sans-serif;
}

.search-bar input::placeholder {
  font-family: "Campton-book", Arial, Helvetica, sans-serif;
}

.results-bar {
  margin: 20px 0 8px;
  min-height: 22px;
  font-size: 14px;
  font-family: "Campton-semibold", Arial, Helvetica, sans-serif;
  flex: 0 0 auto;
}

.results-bar.is-hidden {
  visibility: hidden;
}

.table-wrap {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  max-height: var(--table-max-height);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.table-head {
  flex: 0 0 auto;
  overflow: hidden;
  padding-right: var(--sbw, 0px);
  background: #37827D;
  color: #fff;
  font-family: "Campton-semibold", Arial, Helvetica, sans-serif;
  border-bottom: 1px solid #e9eef3;
}

.table-head table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

.table-head thead th {
  font: inherit;
  color: inherit;
  background: transparent;
  text-align: left;
  padding: 12px 10px;
  min-width: 0;
  min-height: 44px;
  border-radius: 0;
}

.table-head thead th button.sort {
  all: unset;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-head thead th .sort-arrow::after {
  font-size: 10px;
  vertical-align: middle;
  opacity: 0.85;
  margin-left: 2px;
}

.table-head thead th[aria-sort="ascending"] .sort-arrow::after {
  content: "▲";
}

.table-head thead th[aria-sort="descending"] .sort-arrow::after {
  content: "▼";
}

.table-head thead th[aria-sort="none"] .sort-arrow::after {
  content: "";
}

.table-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
  scrollbar-gutter: stable;
  background: #fff;
  border-bottom: 1px solid #fff;
}

.table-body table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.table-body tbody td {
  padding: 10px;
  border-bottom: 1px solid #f1f1f1;
  vertical-align: top;
  min-width: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: anywhere;
  word-break: normal;
}

.table-body tbody tr:last-child td {
  border-bottom: 0 !important;
}

.term-table {
  font-size: 14px;
}

.term-table colgroup col:nth-child(1) {
  width: 30% !important;
}

.term-table colgroup col:nth-child(2) {
  width: 30% !important;
}

.term-table colgroup col:nth-child(3) {
  width: 40% !important;
}

.loading {
  margin: 10px 0;
  min-height: 20px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  width: 100%;
}

.loading.is-hidden {
  display: none;
}

#infiniteSentinel {
  height: 1px;
}

#infiniteSentinelRow td {
  padding: 0;
  border: 0;
}

.empty-row td {
  color: var(--muted);
}

@media (max-width: 768px) {
  :root {
    --table-max-height: calc(100vh - 190px);
  }

  .page {
    padding: 0 8px;
    margin: 8px 0 16px;
  }

  .search-bar {
    width: 100%;
    max-width: 100%;
  }

  .search-bar label,
  .results-bar,
  .table-head thead th,
  .table-body tbody td,
  .term-table {
    font-size: 13px;
    line-height: 1.4;
  }

  .search-bar input {
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 12px;
  }

  .table-head thead th,
  .table-body tbody td {
    padding: 8px;
  }
}