.minimap-container {
  display: flex;
  margin: 8px;
  justify-content: center;
  align-items: center;
  padding-right: 62px;
  /* Space for the compass and buttons */
}

.minimap-wrapper {
  width: 160px;
  height: 160px;
  display: block;
  position: relative;
  /* Clicking the buttons or the compass must not select the text (e.g., "Centre") */
  user-select: none;
  -webkit-user-select: none;
}

/* The square map area - plain black frame with a subtle groove, like the bars and buttons next to it */
.minimap-wrapper canvas {
  display: block;
  background-color: #0a0a0a;
  border-radius: 0;
  box-shadow:
    0 0 0 1px #000,
    0 0 0 2px rgba(255, 255, 255, 0.12);
}

.minimap-wrapper .crosshair {
  position: absolute;
  left: 76px;
  top: 72px;
  color: white;
  z-index: 5;
  text-shadow: 1px 1px 2px black;
  pointer-events: none;
}

/* Hidden while the map is panned away from the character (the character is then drawn on the canvas) */
.minimap-wrapper .crosshair.hidden {
  display: none;
}

/* Tibia-like control panel to the right of the map: compass rose, zoom/floor buttons and "Centre" */
.minimap-wrapper .button-stack {
  position: absolute;
  width: 54px;
  top: -3px;
  right: -60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 20;
}

/* Compass rose (pans the minimap) */
.minimap-wrapper .minimap-compass {
  width: 54px;
  height: 54px;
  cursor: pointer;
}

.minimap-wrapper .minimap-compass svg {
  width: 100%;
  height: 100%;
  display: block;
}

.minimap-compass .ring {
  fill: #1e1e1e;
  stroke: #000;
  stroke-width: 1;
}

.minimap-compass .inner {
  fill: #2c2c2c;
  stroke: #555;
  stroke-width: 1;
}

.minimap-compass .lite {
  fill: #d8d8d8;
}

.minimap-compass .dark {
  fill: #7a7a7a;
}

.minimap-compass .hub {
  fill: #1e1e1e;
  stroke: #d8d8d8;
  stroke-width: 1;
}

/* Hovered compass: the accent of the theme, like the hovered buttons next to it */
.minimap-compass:hover .ring {
  stroke: var(--color-accent);
}

.minimap-compass:hover .lite {
  fill: var(--color-accent-text);
}

.minimap-compass:active svg {
  transform: translate(1px, 1px);
}

/* 2x2 grid: zoom (left) | floor (right). Same look as the default buttons (Stats, Battle, ...) */
.minimap-wrapper .minimap-buttons {
  display: grid;
  grid-template-columns: 25px 25px;
  gap: 2px;
}

.minimap-wrapper .button-stack button {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimap-wrapper .minimap-buttons .symbol-button {
  width: 25px;
  height: 21px;
  min-width: 25px;
  max-width: 25px;
}

.minimap-wrapper .minimap-buttons .symbol-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: white;
  stroke-width: 1.8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 1px black);
}

.minimap-wrapper .minimap-buttons .symbol-button svg .fill {
  fill: white;
  stroke: none;
}

.minimap-wrapper .button-stack .centre-button {
  width: 52px;
  height: 24px;
  font-size: 11px;
}

.minimap-wrapper .minimap-buttons .symbol-button:active svg {
  transform: translate(1px, 1px);
}
