/* Book rebalance screen. Rides on styles.css — only the pieces that don't
   exist on the planner live here. */

.knob {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.knob label { font-size: 13px; color: var(--muted); font-weight: 600; }
.knob input[type="number"] {
  width: 84px; padding: 7px 9px;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-variant-numeric: tabular-nums; text-align: right;
}
.knob input[type="number"]:focus { outline: 2px solid var(--cc-lt); outline-offset: 1px; }

.knob.slider { display: block; margin: 14px 0 6px; }
.knob.slider label { display: block; margin-bottom: 6px; }
.knob.slider label b {
  float: right; color: var(--cc-lt); font-size: 15px; font-variant-numeric: tabular-nums;
}
.knob.slider input[type="range"] { width: 100%; accent-color: var(--cc-lt); }

.route-locks {
  margin: 12px 0 14px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.route-locks-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-locks-head span { color: var(--ink); font-size: 13px; font-weight: 800; }
.route-locks-head button {
  padding: 2px 0; border: 0; background: none; color: var(--cc-lt);
  font: 700 11px/1 inherit; font-family: inherit; cursor: pointer;
}
.route-locks .side-note { margin: 5px 0 8px; }
.crew-locks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px;
  max-height: 116px; overflow-y: auto; padding-right: 2px;
}
.crew-lock {
  display: flex; align-items: center; gap: 5px; min-width: 0; padding: 5px 6px;
  border: 1px solid var(--line); border-radius: 7px; color: var(--muted);
  background: var(--panel); font-size: 11px; cursor: pointer;
}
.crew-lock:has(input:checked) { border-color: var(--amber); color: var(--ink); }
.crew-lock input { margin: 0; accent-color: var(--amber); }
.crew-lock i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.crew-lock span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn.wide { display: block; width: 100%; margin: 4px 0 8px; text-align: center; }
.side-note.tiny { font-size: 12px; line-height: 1.45; margin: 2px 0 16px; }

/* ------------------------------- verdict -------------------------------- */

.verdict {
  position: absolute; left: 18px; top: 18px; right: 18px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; z-index: 6;
}
.vcard {
  background: var(--glass);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px;
  backdrop-filter: blur(6px);
}
.vcard .k { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.vcard .v { font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.vcard .s { font-size: 12px; color: var(--muted); }
.vcard.hero { border-color: var(--cc-lt); }
.vcard.hero .v { color: var(--cc-lt); }
.vcard.bad .v { color: var(--danger); }

/* -------------------------------- moves --------------------------------- */

/* bottom clears the floating theme button in the viewport corner. */
.moves {
  position: absolute; right: 18px; bottom: 70px; width: min(430px, calc(100% - 36px));
  max-height: 52%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--glass);
  border: 1px solid var(--line); border-radius: 13px;
  padding: 14px 16px; z-index: 6;
  backdrop-filter: blur(6px);
}
.moves h3 { margin: 0 0 3px; font-size: 15px; }
.moves .sub { margin: 0 0 11px; font-size: 12px; color: var(--muted); }

.mv { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--line); }
.mv:first-of-type { border-top: 0; }
.mv .nm { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv .from, .mv .to {
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); white-space: nowrap;
}
.mv .arrow { color: var(--muted); font-size: 12px; }
.mv .save { font-size: 11px; color: var(--cc-lt); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }

.moves .none { font-size: 13px; color: var(--muted); padding: 6px 0; }

/* ------------------------------ utilisation ----------------------------- */

.util { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 11px; }
.util h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ubar { height: 7px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-bottom: 4px; display: flex; }
.ubar i { display: block; height: 100%; }

.spinner.busy { display: grid; }

/* -------------------------------- map ----------------------------------- */

#map { position: absolute; inset: 0; }
#map canvas { outline: none; }

/* MapLibre's chrome is themed once, in theme.css. Only this screen's own
   geometry lives here: the verdict cards run across the top, so the zoom
   buttons drop below them. */
.mapwrap .maplibregl-ctrl-top-right { top: 112px; right: 8px; }

/* The map fills the pane, so the overlays need to sit above its canvas. */
.verdict, .moves, .spinner, .side-toggle { z-index: 8; }
