/* Captain's Draftboard (desk.html only). Layout of the board; components come from styles.css. */

/* ---------- Squad and roster ---------- */

.squad__head { min-height: 76px; }
.squadid { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.squadid__seal { display: inline-flex; }
.squadid__name { font-size: var(--t-d3); line-height: 0.9; }
.squadid__sub { margin-top: 4px; font-size: var(--t-small); color: var(--muted); }
.squadid__sub b { color: var(--ink); font-weight: 600; }

.tally { display: flex; gap: var(--s-6); }
.tally > div { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tally dt { font-size: var(--t-micro); color: var(--muted); white-space: nowrap; }
.tally dd { font-family: var(--f-display); font-weight: 800; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }

.roster > .skeleton, .roster > .state { grid-column: 1 / -1; }
.seat { min-width: 0; }
.seat__name { max-width: 100%; overflow-wrap: anywhere; }
.seat__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px dashed currentColor;
}
.seat__icon svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
button.seat {
  font: inherit;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease-out), border-color var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out);
}
button.seat:active { transform: translateY(1px); }
button.seat--open:hover { background: var(--cobalt-a16); }
button.seat--open[aria-pressed="true"] { border-style: solid; background: #eef0f6; box-shadow: inset 0 0 0 1px var(--cobalt); }
button.seat--free { background: transparent; }
button.seat--free:hover { border-color: var(--cobalt); color: var(--cobalt); background: var(--cobalt-a16); }
button.seat--free:hover .seat__sub { color: var(--cobalt); }

/* ---------- Section heads ---------- */

.deskhead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); margin-bottom: var(--s-4); }
.deskhead h2 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-d3); }
.deskhead p { max-width: 52ch; color: var(--muted); font-size: var(--t-small); text-align: right; }

/* ---------- Slots bar ---------- */

.slots-bar__chips { display: contents; }
.slots-bar > .slotchip, .slots-bar__chips > .slotchip { flex: none; }
.slots-bar__chips > .skeleton, .slots-bar__chips > .state { flex: 1; min-width: 0; }
.slots-bar .skeleton__row { padding: var(--s-4); border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--sheet); }
.slots-empty { padding: var(--s-4); align-items: flex-start; text-align: left; border: 1px dashed var(--rule); border-radius: var(--r-panel); }
.slotchip { min-width: 220px; }
.slotchip__meta b { color: var(--ink); font-weight: 700; }

/* ---------- Filters ---------- */

.filters__body { display: flex; flex-direction: column; gap: var(--s-5); }
.filters__top { display: flex; align-items: flex-end; gap: var(--s-5); flex-wrap: wrap; }
.filters__sort { width: 210px; }
.filters__nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); align-items: start; }
.filters__state { display: inline-flex; align-items: center; gap: 6px; max-width: 46ch; font-size: var(--t-micro); color: var(--muted); line-height: 1.35; }
.filters__state svg { flex: none; }
.filters__state--changed { color: var(--cobalt); font-weight: 600; }
.seg__opt .swatch { width: 14px; height: 14px; }

.slotfacts { display: flex; gap: var(--s-5); margin-left: auto; padding-bottom: 2px; }
.slotfacts > div { display: flex; flex-direction: column; gap: 4px; padding-left: var(--s-4); border-left: 1px solid var(--ink-a14); }
.slotfacts dt { font-size: var(--t-micro); color: var(--muted); white-space: nowrap; }
.slotfacts dd { font-family: var(--f-display); font-weight: 800; font-size: 1.375rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Ranked applicants ---------- */

.applicants { margin-top: var(--s-4); }
.applicants .panel__sub { margin-top: 4px; max-width: 96ch; }
.applicants .panel__sub b { color: var(--ink); font-weight: 600; }
.applicants .rank-head { border-radius: 0; }
.rank-head__actions { text-align: right; }
.rank-divider {
  padding: 7px var(--s-4);
  background: var(--paper);
  color: var(--muted);
  font-size: var(--t-micro);
  font-weight: 600;
  border-bottom: 1px solid var(--ink-a14);
}
.rank-notice { margin: var(--s-3) var(--s-4); }
.appcard__rank:empty::before { content: ''; display: block; width: 12px; height: 2px; background: var(--rule); }
.appcard__sub { min-width: 0; }
.appcard__note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--t-micro); font-weight: 600; white-space: nowrap; }
.appcard__note svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appcard__note .spinner { width: 12px; height: 12px; color: var(--berry); }
.appcard__actions .btn--icon { width: 30px; padding: 0; }
.appcard__actions .btn[aria-pressed="true"] { background: var(--cobalt-a16); color: var(--cobalt); border-color: var(--cobalt); }
.appcard.is-compared { box-shadow: inset 0 0 0 2px var(--cobalt); }
.appcard.is-compared .appcard__rank { color: var(--ink); }

/* ---------- Compare tray ---------- */

.compare__cards > .skeleton, .compare__cards > .state { grid-column: 1 / -1; }
.compare__cards > .skeleton { display: grid; }
.compare__cards:not(:has(.tcard)) .compare__empty { min-height: 200px; }
.compare__empty .state__icon { margin-bottom: var(--s-1); }
.compare__empty p { max-width: 26ch; }
.compare .tcard__foot { flex-wrap: wrap; padding-top: var(--s-2); }
.cmpfoot__meta { display: flex; align-items: center; gap: var(--s-2); flex-basis: 100%; min-width: 0; font-size: var(--t-micro); color: var(--muted); }
.cmpfoot__meta .legend__key { flex: none; width: 18px; height: 6px; }
.cmpfoot__slot { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard--dark .cmpfoot__meta { color: var(--blush); }
.tcard--dark .stamp:not(.stamp--joined) { color: var(--sheet); background: transparent; }
.tcard--dark .legend__key.tone-cobalt { box-shadow: 0 0 0 1.5px var(--sheet); }
.compare__chart { padding-top: var(--s-6); border-top: 1px solid var(--ink-a14); }
.compare__figs { gap: var(--s-7); align-items: start; }

@media (max-width: 1179px) {
  .tally { gap: var(--s-5); }
  .slotfacts { margin-left: 0; }
  .compare__figs { gap: var(--s-5); }
}
