/* Officer hub: Hackathon (public/js/hub/hackathon.js). The count pills are the hub's (.hub-stat in hub.css);
   the table scrolls sideways inside its own box on a phone, so the page itself never does, with the name
   column pinned. Tokens come from app.css, so light and dark both follow the device. */

.hk-hub-stats { margin: 0 0 12px; }
/* The fade at the right edge says the table goes on that way; a cover the size of the fade scrolls with
   the table (local) and hides it at the end. Cells have no background but the pinned ones, so it shows. */
.hk-hub-box {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background:
    linear-gradient(to left, transparent, var(--surface) 70%) local right / 28px 100% no-repeat,
    linear-gradient(to left, color-mix(in srgb, var(--text) 16%, transparent), transparent) scroll right / 16px 100% no-repeat,
    var(--surface);
}
.hk-hub-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hk-hub-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hk-hub-table th, .hk-hub-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.hk-hub-table thead th { font-size: 12px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.hk-hub-table tbody tr:last-child > * { border-bottom: 0; }
.hk-hub-table tbody th { font-weight: 650; overflow-wrap: break-word; min-width: 7em; position: sticky; left: 0; background: var(--surface); }
.hk-hub-table thead th:first-child { position: sticky; left: 0; z-index: 1; }
/* A cell is never narrower than its longest word ("Administration", "Undeclared"): break-word only
   splits a word longer than the whole column. Emails wrap after the @ and the dots (<wbr>, hackathon.js). */
.hk-hub-table td { min-width: 72px; overflow-wrap: break-word; }
.hk-hub-table td:nth-child(7) { min-width: 180px; }
.hk-hub-none { color: var(--muted); font-style: italic; }
.hk-hub-remove { white-space: nowrap; }
/* From 600 wide the Remove column is pinned at the right edge, like the name column at the left, so it is
   always in view (measured in WebKit: with one short sign-up the table was 1198 px in a box of at most
   1146, and Remove sat outside it at every width). On a phone two pinned columns would leave the answers
   about 65 px at 320, so there the table scrolls. */
@media (min-width: 600px) {
  .hk-hub-table tr > :last-child { position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: inset 1px 0 0 var(--line); }
  .hk-hub-table thead th:last-child { background: var(--surface-2); }
}
/* On a phone the pinned name column wraps at a fixed width, so one long name never covers the other
   answers (measured in WebKit: a 44 character name made it 353 px, wider than the 286 px box at 320).
   width, not max-width: browsers ignore max-width on table cells. */
@media (max-width: 599px) {
  .hk-hub-table tbody th { white-space: normal; overflow-wrap: anywhere; width: 9em; min-width: 9em; }
  /* An edge line on the pinned name column, so a sliver of the scrolled email beside it reads as behind it. */
  .hk-hub-table tbody th, .hk-hub-table thead th:first-child { box-shadow: inset -1px 0 0 var(--line-strong); }
  .btn.hk-hub-remove { min-height: 44px; }
}
