/* Round 2 UX: the key bindings card and the stats tab in the pause menu, the sound captions, and
   the accessibility options (options.js puts their classes on the body): large text, the HUD's
   colour-blind palettes, reduced motion. */

/* CONTROLS: the bindings (a button per key) and the gamepad's, beside the menu's and the map's */
.rk {
  display: contents;
}
.mn-keys .rk-keys h3 small,
.ss-missions h3 small {
  float: right;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #555;
}
.mn-keys h4 {
  margin: 8px 10px 2px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.mn-keys .rk-keys li {
  grid-template-columns: 92px auto;
}
.rk-key {
  min-width: 46px;
  max-width: 84px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  font: 700 12px var(--display);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  justify-self: start;
}
.rk-key:hover,
.rk-key:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}
.rk-key.moved {
  border-color: var(--gold);
  color: var(--gold);
}
.rk-key.waiting {
  color: #0d0d0d;
  background: #f2f2f2;
  animation: rk-blink 0.9s steps(2) infinite;
}
@keyframes rk-blink {
  50% {
    background: var(--gold);
  }
}
.rk-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 10px 2px;
}
.rk-reset {
  font-size: 11px;
}
.rk-note,
.rk-hint,
.ss-hint {
  margin: 6px 10px 0;
  font-weight: 400;
  font-size: 12px;
  color: var(--dim);
}
.mn-keys .rk-pad .k kbd {
  min-width: 0;
  white-space: nowrap;
}

/* STATS: the missions and the record */
.mn-stats {
  overflow-y: auto;
  padding: 16px;
}
.mn-stats > section {
  max-width: 540px;
  margin: 0 auto 12px;
  padding-bottom: 8px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 600;
  font-size: 13.5px;
}
@media (min-width: 900px) {
  .mn-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  .mn-stats > section {
    max-width: none;
    margin: 0;
  }
}
.mn-stats h3 {
  margin: 0 0 4px;
  padding: 5px 10px 4px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0d0d0d;
  background: #f2f2f2;
}
.ss-missions ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ss-missions li {
  display: grid;
  grid-template-columns: 14px 1fr auto 96px;
  gap: 8px;
  align-items: center;
  padding: 5px 10px;
}
.ss-missions li:nth-child(even),
.ss-record dt:nth-of-type(even),
.ss-record dd:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.045);
}
.ss-missions li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
}
.ss-missions li span {
  color: var(--dim);
}
.ss-missions li em {
  font-style: normal;
  text-align: right;
  color: var(--dim);
}
.ss-missions li.passed em {
  color: var(--ok);
}
.ss-missions li.running em {
  color: var(--gold);
}
.ss-record dl {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0;
}
.ss-record dt,
.ss-record dd {
  margin: 0;
  padding: 5px 10px;
}
.ss-record dd {
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
}

/* the sound captions, low in the middle, over the picture */
.captions {
  position: fixed;
  left: 50%;
  bottom: calc(var(--pad-b) + 96px);
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 3px;
  font: 600 15px var(--display);
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 6;
}
.captions.on {
  opacity: 1;
}
.paused .captions {
  display: none;
}

/* large text: the HUD's words, the hints and the menu bigger */
.big-text .helpbox,
.big-text .notices,
.big-text .place,
.big-text .prompt,
.big-text .context-hint,
.big-text .radio-tag,
.big-text .clock {
  zoom: 1.28;
}
.big-text .captions {
  font-size: 20px;
}
.big-text .mn-panel,
.big-text .mn-foot {
  zoom: 1.15;
}

/* colour-blind palettes: the HUD's reds and greens (and the GPS's purple) told apart by more
   than hue. Red-green safe: health blue-teal, danger orange, OK sky blue; blue-yellow safe:
   armour teal, gold pinkish orange. */
.pal-deutan {
  --health: #2f9fd8;
  --ok: #56b4e9;
  --red: #e69f00;
  --led: #e69f00;
  --warn: #f0e442;
}
.pal-tritan {
  --armour: #0fa89a;
  --gold: #ff8a65;
  --health: #5bae5e;
  --red: #d55e00;
  --warn: #ff8a65;
}

/* reduced motion: no blinking and no slides */
.calm *,
.calm *::before,
.calm *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

/* the map's legend in two columns (it has grown) */
.mp-legend ul {
  grid-template-columns: auto auto;
  column-gap: 14px;
}

/* the hidden tokens' counter (ui/tokens.js): over the radar's clock, up for a moment on each find */
.tokens {
  position: fixed;
  left: 108px;
  bottom: 148px;
  z-index: 6; /* under the pause menu (menu.css 8) */
  padding: 2px 9px;
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.72);
  color: #e8f4ff;
  font: 600 14px/20px var(--font, system-ui, sans-serif);
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}
.tokens.on {
  opacity: 1;
  transform: none;
}
.tokens.done {
  color: #ffd166;
}

/* v5: the pause menu's credit line (it was on the HUD), and the DEBUG tab (?debug=1: debugTab.js) */
.mn-credit {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(238, 240, 242, 0.55);
}
.mn-credit .promo {
  margin-left: 6px;
  padding: 1px 7px;
}
.dbg-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
}
.dbg-act {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink, #eef0f2);
  font: inherit;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
.dbg-act:hover,
.dbg-act:focus-visible {
  background: #fff;
  color: #111;
  outline: none;
}
.dbg-act span {
  grid-column: 1 / -1;
  font-size: 11.5px;
  opacity: 0.7;
}
.dbg-note {
  margin-top: 10px;
  font-size: 11.5px;
  opacity: 0.6;
}
