/* The minimap player (static/minimap.js), in the page's colours (game.css's
   tokens: --page, --panel, --panel-edge, --rule, --ink, --ink-muted, --gold). */

.replay-section {
  margin-bottom: 1.5rem;
}
.minimap-player {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  padding: 0.7rem 1.1rem 0.8rem;
}

/* on top: the layers, then fullscreen at the right */
.minimap-player .mm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.6rem;
}
.minimap-player .mm-tog {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-muted);
  font: 600 0.72rem/1.3 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: help;
  user-select: none;
}
.minimap-player .mm-tog:hover { color: var(--ink); }
.minimap-player .mm-tog:has(input:checked) { color: var(--ink); }
.minimap-player .mm-tog input { accent-color: var(--gold); cursor: pointer; margin: 0; }
.minimap-player .mm-ast { color: var(--gold); margin-left: 1px; }

/* buttons, as the match stats' */
.minimap-player button {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--panel-edge);
  border-radius: 3px;
  padding: 0 0.55rem;
  height: 1.7rem;
  font: 600 0.78rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.minimap-player button:hover:not(:disabled) { color: var(--gold); }
.minimap-player button:disabled { opacity: 0.35; cursor: default; }
.minimap-player .mm-fs { margin-left: auto; font-weight: 400; font-size: 0.85rem; }
/* play and pause are one button, as wide either way */
.minimap-player .mm-play { width: 2.2rem; padding: 0; }

.minimap-player .mm-stage {
  position: relative;
  height: 62vh;
  min-height: 360px;
  background: #0a0d12;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.minimap-player .mm-cv {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.minimap-player .mm-cv.mm-drag { cursor: grabbing; }
/* over the map, for the site's HUD: the mouse goes through to the map */
.minimap-player .mm-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.minimap-player .mm-tip {
  position: absolute;
  pointer-events: none;
  display: none;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 5;
}

/* under the map: play/pause, speed, the time and the progress bar */
.minimap-player .mm-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.minimap-player .mm-scrub {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--gold);
  cursor: pointer;
}
/* the speed: − 8x + */
.minimap-player .mm-speed { display: inline-flex; align-items: center; }
.minimap-player .mm-slower,
.minimap-player .mm-faster { width: 1.7rem; padding: 0; font-size: 0.95rem; }
.minimap-player .mm-speed-val {
  min-width: 2.6rem;
  text-align: center;
  color: var(--ink);
  font: 600 0.78rem/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.minimap-player .mm-time {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Replay / Estimated tabs, as the match stats' */
.mm-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--panel-edge); }
.mm-tab {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding: 0.45rem 1rem;
  margin-bottom: -1px;
  font: 600 0.8rem/1.3 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.mm-tab:hover { color: var(--ink); }
.mm-tab.active {
  color: var(--gold);
  background: var(--panel);
  border-color: var(--panel-edge);
  box-shadow: inset 0 2px 0 var(--gold);
}
.mm-panes .minimap-player { border-top: 0; border-radius: 0 0 4px 4px; }

/* Fullscreen: the stage grows to fill the screen, the controls stay */
.minimap-player:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 1rem 1.25rem;
  background: var(--page);
  border: 0;
  border-radius: 0;
}
.minimap-player:fullscreen .mm-stage { flex: 1 1 auto; height: auto; }

/* A highlight's clip (initMinimapClip): the map alone, square, no layers or
   controls, nothing to click. */
.minimap-player.mm-clip { padding: 0; border: 0; background: none; }
.minimap-player.mm-clip .mm-bar,
.minimap-player.mm-clip .mm-controls,
.minimap-player.mm-clip .mm-tip { display: none; }
.minimap-player.mm-clip .mm-stage { height: auto; min-height: 0; aspect-ratio: 1; }
.minimap-player.mm-clip .mm-cv { cursor: default; pointer-events: none; }
