
/* BMSDock UI 1.8.12 — Unified Map Controls
   State changes affect background alpha only. Icons/text remain fully opaque.
   Visibility is owned by component logic (e.g. .speed-btn.show). */

.side-tools .round-tool,
.right-tools .round-tool,
#infoBtn,
#donateBtn,
.play,
.speed-btn {
  background: var(--ui-control-bg-default) !important;
  color: var(--ui-control-fg) !important;
  border-color: var(--ui-control-border) !important;
  box-shadow: var(--ui-control-shadow) !important;
  transition:
    background var(--ui-control-transition),
    border-color var(--ui-control-transition),
    box-shadow var(--ui-control-transition),
    transform var(--ui-control-transition) !important;
}

/* 70% — hover / pressed / active / open */
.side-tools .round-tool:hover,
.right-tools .round-tool:hover,
#infoBtn:hover,
#donateBtn:hover,
.play:hover,
.speed-btn:hover,
.side-tools .round-tool:active,
.right-tools .round-tool:active,
#infoBtn:active,
#donateBtn:active,
.play:active,
.speed-btn:active,
.side-tools .round-tool.active,
.right-tools .round-tool.active,
#infoBtn.active,
#donateBtn.active,
.play.active,
.play.playing,
.speed-btn.active,
.side-tools .round-tool[aria-expanded="true"],
.right-tools .round-tool[aria-expanded="true"],
#infoBtn[aria-expanded="true"],
#donateBtn[aria-expanded="true"] {
  background: var(--ui-control-bg-interactive) !important;
}

/* 30% — disabled / explicit off */
.side-tools .round-tool:disabled,
.right-tools .round-tool:disabled,
#infoBtn:disabled,
#donateBtn:disabled,
.play:disabled,
.speed-btn:disabled,
.side-tools .round-tool.off,
.right-tools .round-tool.off,
#infoBtn.off,
#donateBtn.off,
.play.off,
.speed-btn.off {
  background: var(--ui-control-bg-off) !important;
}

/* Toggle semantics */
#rotateResetBtn.active,
#kmBtn.active {
  background: var(--ui-control-bg-interactive) !important;
}
#rotateResetBtn:not(.active),
#kmBtn:not(.active) {
  background: var(--ui-control-bg-default) !important;
}

/* Park stays a semantic exception. */
.speed-btn.park,
.speed-btn.park.active {
  background: var(--ui-control-park-bg) !important;
  color: var(--ui-control-park-fg) !important;
}

/* Focus ring */
.side-tools .round-tool:focus-visible,
.right-tools .round-tool:focus-visible,
#infoBtn:focus-visible,
#donateBtn:focus-visible,
.play:focus-visible,
.speed-btn:focus-visible {
  outline: none !important;
  box-shadow:
    var(--ui-control-shadow),
    0 0 0 3px var(--ui-control-focus) !important;
}

/* IMPORTANT: visibility for speed button is not overridden here. */

/* UI 1.9.39 — shared close button for light modal panels.
   Component-specific CSS owns positioning only. */
.ui-panel-close {
  box-sizing: border-box;
  flex: 0 0 var(--ui-panel-close-size);
  width: var(--ui-panel-close-size);
  min-width: var(--ui-panel-close-size);
  max-width: var(--ui-panel-close-size);
  height: var(--ui-panel-close-size);
  min-height: var(--ui-panel-close-size);
  max-height: var(--ui-panel-close-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 0 2px;
  border: 1px solid var(--ui-panel-close-border);
  border-radius: 50%;
  background: var(--ui-panel-close-bg);
  color: var(--ui-panel-close-fg);
  font-family: inherit;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition:
    background var(--ui-control-transition),
    border-color var(--ui-control-transition),
    transform var(--ui-control-transition);
}

.ui-panel-close:hover {
  background: var(--ui-panel-close-bg-hover);
}

.ui-panel-close:active {
  transform: scale(.97);
}

.ui-panel-close:focus-visible {
  outline: 2px solid var(--ui-panel-close-focus);
  outline-offset: 2px;
}

