/* --------------------------------------------------------------------------
   Snake game overlay
   -------------------------------------------------------------------------- */
.snake-overlay {
  background: #000000;
  display: none;
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.snake-overlay.is-active {
  align-items: center;
  display: flex;
  justify-content: center;
}

.snake-overlay__back-wrap {
  left: clamp(1.5rem, 5.6vw, 5.0625rem);
  position: absolute;
  top: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 2;
}

.snake-overlay__arena {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-white);
  max-height: min(70vh, 32rem);
  position: relative;
  width: min(90vw, 42rem);
}

.snake-overlay__canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.snake-overlay__instructions {
  align-items: center;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  gap: 2rem;
  inset: 0;
  justify-content: center;
  letter-spacing: -0.02em;
  pointer-events: none;
  position: absolute;
  text-align: center;
  z-index: 1;
}

.snake-overlay__instructions.is-hidden {
  display: none;
}

.snake-keys {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.snake-keys__row {
  display: flex;
  gap: 0.375rem;
}

.snake-key {
  align-items: center;
  border: 2px solid var(--color-white);
  display: flex;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.snake-key svg {
  display: block;
  height: 1rem;
  width: 1rem;
}

.snake-overlay__hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
}

.snake-overlay__exit {
  color: rgba(255, 255, 255, 0.4);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 1;
}

button.service {
  background: none;
  border: none;
  cursor: var(--cursor-normal);
  font: inherit;
  padding: 0;
}

button.service:hover .service__label {
  color: var(--color-white);
}
