/* Lobby form, lobby page, squad pages, applicants (PRD sections 10 and 11). */

.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page--squad { padding-bottom: 0; }
.page--wide, .page--lobby, .page--form { padding-bottom: 96px; }
@media (min-width: 768px) {
  .page--wide, .page--lobby { max-width: 960px; margin: 0 auto; }
}

/* Steps in the form headings */
.step {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  margin-right: 4px; border: 1px solid var(--ink); border-radius: 50%; font-size: 13px; font-weight: 700;
}
.lobby-form .section:first-of-type { margin-top: 16px; }

/* Segmented control */
.seg { display: flex; border: 1px solid var(--ink); border-radius: 0; overflow: hidden; }
.seg__item { position: relative; flex: 1; }
.seg__input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg__item span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px;
  font-size: 14px; font-weight: 600; text-align: center; cursor: pointer;
}
.seg__item + .seg__item span { border-left: 1px solid var(--ink); }
.seg__input:checked + span { background: var(--ink); color: var(--bg); }
.seg__input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -3px; }

/* Seats */
.seats { display: flex; flex-direction: column; margin: 16px 0 12px; border-top: 1px solid var(--rule); }
.seat { padding: 12px 0 16px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; }
.seat__head { display: flex; align-items: center; justify-content: space-between; }
.seat__label { font-size: 15px; font-weight: 600; }
.seat [hidden] { display: none; }

/* Sticky bottom bar (form actions) sits above the mobile navigation */
.stickybar {
  position: sticky; bottom: calc(48px + env(safe-area-inset-bottom)); z-index: 6; display: flex; gap: 12px;
  padding: 12px 0; margin-top: 24px; background: var(--bg); border-top: 1px solid var(--rule);
}
.stickybar .btn { flex: 1; }
@media (min-width: 768px) { .stickybar { bottom: 0; } }

/* Lobby page */
.lobby-grid { display: block; }
.lobby-grid__side { margin-top: 8px; }
@media (min-width: 1024px) {
  .lobby-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .lobby-grid__side { position: sticky; top: calc(var(--header-h) + 16px); margin-top: 0; }
}
.terms-text { white-space: pre-line; }
.overlap-line { margin-top: 8px; }
.report-slot:empty { display: none; }
.manage { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 16px; }
.manage form { margin: 0; }

/* Slot rows */
.slots { border-top: 1px solid var(--rule); margin-top: 8px; }
.slot { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.slot__open { flex: none; width: 22px; height: 22px; border: 1px dashed var(--ink); border-radius: 50%; margin: 3px; }
.slot__open--filled { border-style: solid; border-color: var(--strip-off); background: var(--strip-off); }
.slot__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.slot__role { font-size: 15px; font-weight: 600; }
.slot__status { font-size: 13px; line-height: 1.4; color: var(--ink-secondary); }
.slot__status a { color: inherit; }

/* Members */
.members { border-top: 1px solid var(--rule); margin-top: 8px; }
.member { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.member__main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.member__main small { font-size: 13px; line-height: 1.4; }
.members--list { margin: 0 var(--gutter); }

/* Action bar: fixed above the bottom nav on mobile, in flow on desktop */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: calc(48px + env(safe-area-inset-bottom)); z-index: 15;
  padding: 12px var(--gutter); background: var(--bg); border-top: 1px solid var(--rule);
}
.actionbar form { margin: 0; }
@media (min-width: 768px) {
  .actionbar { position: sticky; bottom: 0; padding-left: 0; padding-right: 0; max-width: 480px; }
}
@media (min-width: 1024px) {
  .actionbar { position: static; margin-top: 0; }
}

/* Squad lists */
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 0 var(--gutter) 12px; border-bottom: 1px solid var(--rule); }
.row-actions form { margin: 0; }
.fixture--status .fixture__link { border-bottom: 0; }
.fixture--status:not(:has(.row-actions)) .fixture__link { border-bottom: 1px solid var(--rule); }
.status-text--accepted { color: var(--accent); font-weight: 600; }
.daytabs--static { top: var(--header-h); }
.daytabs--static a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }

/* Applicants */
.applicant-list { padding-bottom: 96px; }
.status-message { min-height: 0; padding: 0 var(--gutter); font-size: 13px; }
.status-message:not(:empty) { padding-top: 12px; padding-bottom: 4px; }
.status-message--error { color: var(--danger); }
.applicants { }
.applicant { display: flex; flex-direction: column; gap: 6px; padding: 14px var(--gutter); border-bottom: 1px solid var(--rule); }
.applicant__head { display: flex; align-items: center; gap: 12px; }
.applicant__name { font-size: 15px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.applicant__name:hover { text-decoration: underline; }
.applicant__line { font-size: 13px; line-height: 1.4; color: var(--ink-secondary); }
.applicant__strip { grid-column: auto; }
.applicant__note { font-size: 14px; line-height: 1.5; white-space: pre-line; border-left: 1px solid var(--rule); padding-left: 12px; }
.applicant__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.state--quiet { padding: 12px var(--gutter); font-size: 13px; color: var(--ink-secondary); }

/* Notices */
.row--unread .notice-link span { font-weight: 600; }
.notice-link { display: flex; flex-direction: column; padding: 12px 0; min-height: 44px; text-decoration: none; }
.notice-link:hover span { text-decoration: underline; }
.notices-link { font-weight: 600; }
.fixtures--preview { border-top: 1px solid var(--rule); margin: 12px 0 16px; }

/* Links inside dense rows still get a 44px target. */
.fact dd a, .slot__status a, .member__main a {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
}
.member__main small:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.fact dd { display: flex; flex-direction: column; align-items: flex-end; }

/* Record and player pages */
.identity--page { margin-top: 8px; }
.identity--page .page__title { margin: 0; }
.hours-block { margin: 20px 0 8px; }
.hours-block__num { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.4px; }
.hours-block__label { font-size: 13px; color: var(--ink-secondary); margin-top: 4px; }
.hours-block__updated { font-size: 12px; line-height: 1.4; color: var(--ink-secondary); }
.flag-line { margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--danger); }
.row--wipe { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.row--wipe .row__side { text-align: right; max-width: 45%; }
.actions--footer { margin-top: 32px; }
.fact dd small { display: block; }

/* Vouch page */
.teammate { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.teammate__head { display: flex; align-items: center; gap: 12px; }
.teammate__name { font-size: 15px; font-weight: 600; }
.teammate__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 4px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.toggle { position: relative; }
.toggle__input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.toggle__face {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 0; font-size: 15px; font-weight: 600; background: var(--bg);
}
.toggle__tick { width: 0; height: 12px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.toggle__input:checked + .toggle__face { background: var(--ink); color: var(--bg); }
.toggle__input:checked + .toggle__face .toggle__tick { width: 6px; }
.toggle__input:focus-visible + .toggle__face { outline: 2px solid var(--focus); outline-offset: 2px; }
.toggle__input:disabled + .toggle__face { background: var(--rule); color: var(--ink-secondary); border-color: transparent; }
.toggle--text .toggle__face { border-color: transparent; text-decoration: underline; font-size: 14px; padding: 0 4px; min-width: 44px; justify-content: center; }
.toggle--text .toggle__input:checked + .toggle__face { background: var(--surface-alt); color: var(--ink); }
.crew-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.crew-row__name { font-weight: 600; }
.seg--small { min-width: 140px; }

/* Admin tables: plain rules, scroll inside their own box */
.table-scroll { overflow-x: auto; border-top: 1px solid var(--rule); margin-top: 12px; }
.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.table th, .table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; font-weight: 400; }
.table thead th { font-size: 12px; color: var(--ink-secondary); font-weight: 600; }
.table tbody th { font-weight: 600; }
.table a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.table small { display: block; font-size: 12px; }
.danger-text { color: var(--danger); }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.page--wide .page__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.row--decision { padding: 12px 0; }

/* Duo application (LOB-5) */
.actionbar__split { display: flex; flex-direction: column; gap: 8px; }
.duo { margin-top: 16px; }
.duo > .secondary { font-size: 13px; line-height: 1.4; margin: 4px 0 12px; }
.duo .field { margin-bottom: 12px; }

/* Inline links in admin text keep a 44px target without changing the line height */
.page--wide :is(p, dd, .section__title) a:not(.btn, .textbtn, .textlink) {
  display: inline-block; min-width: 44px; padding: 14px 6px; margin: -14px -6px; text-align: center;
}
