/* Esc-toggled in-game menu.
 *
 * Dims the canvas and anchors a Tron-outlined panel in the top-left
 * corner. Scaffold for future entries (settings, inventory, character
 * sheet) — keep vertical stack in `.ingame-menu` with `.btn` variants.
 * Controls are disabled in Rust-land while the overlay is mounted. */

.canvas-dimmed {
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.ingame-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 16px;
  pointer-events: auto;
}

.ingame-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(8, 14, 24, 0.72);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  box-shadow:
    0 0 14px rgba(122, 170, 255, 0.22),
    inset 0 0 18px rgba(122, 170, 255, 0.06);
}

/* Audio-controls modal (opens from the Esc menu). Centered on the
 * viewport over the menu overlay; same Tron glow as the menu itself.
 * Dismiss is the × button only — no click-outside, no Esc trap. */
.audio-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 320px;
  padding: 20px 24px;
  background: rgba(8, 14, 24, 0.92);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  box-shadow:
    0 0 18px rgba(122, 170, 255, 0.28),
    inset 0 0 22px rgba(122, 170, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--color-text);
  z-index: calc(var(--z-modal) + 1);
}

.audio-modal-title {
  font-size: var(--text-md);
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--color-accent);
}

.audio-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.audio-modal-close:hover {
  color: var(--color-accent);
}

.audio-modal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-modal-label {
  min-width: 72px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.audio-modal-slider {
  flex: 1;
  height: 14px;
}

.audio-modal-value {
  min-width: 36px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: right;
}

.audio-modal-mute {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(122, 170, 255, 0.2);
  cursor: pointer;
}
