/* Static top-down minimap (D key), pinned to the top-left of the screen. */
#minimap {
  position: fixed;
  top: 10px;
  left: 10px;
  display: block;
  pointer-events: none;
}

#minimap[hidden] {
  display: none;
}

/* Outer Menu */
.outerMenu {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: stretch;
  height: auto;
  width: 70px;
  gap: 2px;
  padding: 1px;
  box-sizing: border-box;
  pointer-events: auto;
  background: transparent;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  z-index: 2000;
  flex: 0 0 auto;
  margin-left: auto;
  position: relative;
}

.menuButton {
  width: 100%;
  height: 68px;
  border-radius: 6px;
  border-width: 3px;

  /* The frame is ours, not the UA's. outset lit the top and left from the one
     author colour at 45 degrees, and at several times the contrast of the
     plate below it, so the bevel read as bolted on. Each side now takes a stop
     from the same ramp, and the light falls straight down as it does on the
     face. */
  border-style: solid;
  border-color: var(--steel-rim) var(--steel-face) var(--steel-shade)
    var(--steel-face);
  background-color: var(--steel-face);
  background-image: linear-gradient(
    180deg,
    var(--steel-lit) 0%,
    var(--steel-face) 45%,
    var(--steel-shade) 100%
  );
  padding: 0;
  font-size: 16px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 0 rgb(0 0 0 / 40%);
}

.menuButton svg {
  width: 45%;
  height: auto;
}

.menuDropdown {
  position: relative;
  width: 100%;
}

.menuDropdown > summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  box-sizing: border-box;
}

.menuDropdown > summary::-webkit-details-marker {
  display: none;
}

.menuDropdown > summary::marker {
  content: "";
}

.menuItems {
  position: absolute;
  right: 0;
  bottom: calc(100% + 1px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
  z-index: 3000;
}

.menuItems .menuButton {
  flex: 0 0 35px;
}

.menuButton[hidden] {
  display: none;
}

.menuItems .menuButton[hidden] {
  display: none;
}

.menuDropdown:not([open]) .menuItems {
  display: none;
}

.menuButton:active {
  transform: scale(0.97);
}

/* Same subtle lightening the hit button gets from .timeout-btn:hover, so the
   menu items and the view button answer the pointer before a press. Fill only:
   the rim and the press scale stay as they are. */
.menuButton:not(:disabled):hover {
  background-image: linear-gradient(
    180deg,
    var(--steel-lit-hover) 0%,
    var(--steel-lit) 45%,
    var(--steel-shade) 100%
  );
}

.menuDropdown > summary:focus-visible,
.menuItems .menuButton:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.menuButton.half-height {
  height: 35px;
}
