/* Pay by Job and Pay by Industry (the hubs) and the pay pages' sortable
   tables; the job and industry pages otherwise use prices.css */

/* Sortable headings: the whole heading is a button */
.pay-sort thead th button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.pay-sort thead th button::after { content: '↕'; opacity: 0.45; font-size: 10px; }
.pay-sort thead th[aria-sort="ascending"] button::after { content: '▲'; opacity: 1; }
.pay-sort thead th[aria-sort="descending"] button::after { content: '▼'; opacity: 1; }
.pay-sort thead th button:focus-visible { outline: 2px solid var(--color-2); outline-offset: 3px; }
.pay-sort thead th.num { text-align: right; }
.pay-sort tbody th a, .pay-sort tbody td a { color: var(--ink); text-underline-offset: 3px; }
.pay-sort tr.pay-here th, .pay-sort tr.pay-here td { background: var(--color-2-tint); font-weight: 700; }
.pay-sort tbody th { font-family: var(--sans); font-weight: 500; white-space: normal; }
.pay-sort td.txt { text-align: left; font-family: var(--sans); color: var(--ink-2); }
.pay-tall { max-height: 640px; }

/* The hubs */
.pay-hub { max-width: 1040px; margin: 0 auto; padding: 40px 24px 64px; }
.pay-hub-head h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: -0.02em; color: var(--ink); }
.pay-hub-head p { margin: 0 0 26px; max-width: 680px; font-size: 16px; line-height: 1.6; color: var(--muted); }
/* The page scrolls, not the table, so its heading row sticks under the bar */
.pay-hub .pp-table-wrap { max-height: none; overflow: visible; }
.pay-hub .pp-table thead th { position: sticky; top: 60px; }
.pay-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-bottom: 14px; }
.pay-tools label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pay-tools input, .pay-tools select {
  min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font: 500 15px var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0;
}
.pay-search input { width: 300px; max-width: 100%; }
.pay-count { margin-left: auto; padding-bottom: 10px; font: 500 13px var(--mono); color: var(--muted); }
.pay-foot { margin-top: 14px !important; }

@media (max-width: 720px) {
  .pay-hub { padding: 24px 16px 48px; }
  .pay-hub-head h1 { font-size: 28px; }
  .pay-search { flex: 1 1 100%; }
  .pay-search input { width: 100%; }
  /* On a phone: the job, its pay and the change after inflation */
  #pay-jobs th:nth-child(2), #pay-jobs td:nth-child(2), #pay-jobs th:nth-child(4), #pay-jobs td:nth-child(4), #pay-jobs th:nth-child(6), #pay-jobs td:nth-child(6) { display: none; }
  .pay-hub .pp-table thead th, .pay-hub .pp-table tbody th, .pay-hub .pp-table td { padding-left: 8px; padding-right: 8px; }
  .pay-hub .pp-table thead th { white-space: normal; height: auto; padding-top: 8px; padding-bottom: 8px; line-height: 1.3; }
  .pay-hub #pay-industries th:nth-child(3), .pay-hub #pay-industries td:nth-child(3), .pay-hub #pay-industries th:nth-child(4), .pay-hub #pay-industries td:nth-child(4) { display: none; }
  .pay-sort tbody th { min-width: 120px; }
  /* A state's workers don't fit beside its pay on a phone */
  #pay-states th:nth-child(4), #pay-states td:nth-child(4) { display: none; }
}
