/* Vattenkrig – the touch controls (touch.js): the floating stick on the left, the fire and jump buttons on the right,
   and the weapon switch moved up beside them. They keep their size in fullscreen (a thumb doesn't grow). */

.vk-stage canvas {
  touch-action: none;
}

.vk-touch {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;           /* the fingers reach the picture; only the buttons take them */
}

.vk-touch[hidden] {
  display: none;
}

/* the stick: rests faintly bottom left (so the thumb knows where), and is born where the thumb comes down */
.vk-stick {
  position: absolute;
  left: calc(1.2rem + 56px + var(--safe-left));
  top: calc(100% - 2.8rem - 56px - var(--safe-bottom));
  width: 112px;
  height: 112px;
  border: 2px solid rgba(94, 240, 255, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 240, 255, 0.04) 40%, rgba(94, 240, 255, 0.14));
  transform: translate(-50%, -50%);
  opacity: 0.4;
  transition: opacity 0.15s;
}

.vk-stick.is-held {
  opacity: 0.95;
  transition: none;
}

.vk-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(94, 240, 255, 0.35);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(94, 240, 255, 0.6);
  transform: translate(-50%, -50%);
}

/* the buttons (owner, 2026-10-16: swapped): the fire button big and low, inward where the right thumb rests; jump
   up to its right, by the edge; neither covers the sound button in the corner */
.vk-touch-fire,
.vk-touch-jump,
.vk-touch-crouch {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: rgba(94, 240, 255, 0.16);
  color: var(--cyan);
  font: inherit;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  opacity: 0.8;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.vk-touch-fire {
  right: calc(6.8rem + var(--safe-right));
  bottom: calc(2.4rem + var(--safe-bottom));     /* over the battery and shield (a narrow phone puts them side by side) */
  width: 5.6rem;
  height: 5.6rem;
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255, 233, 77, 0.16);
  font-size: 1rem;
}

/* a dashed inner ring: the button is also a place to look from (hold and drag) */
.vk-touch-fire::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px dashed rgba(255, 233, 77, 0.45);
  border-radius: 50%;
}

.vk-touch-fire::before {
  content: "Kasta";
}

.is-pistol .vk-touch-fire::before {
  content: "Spruta";
}

.vk-touch-jump {
  right: calc(2.1rem + var(--safe-right));
  bottom: calc(4.7rem + var(--safe-bottom));
  width: 3.8rem;
  height: 3.8rem;
  font-size: 0.8rem;
}

.vk-touch-jump::before {
  content: "Hoppa";
}

/* DUCKA (owner, 2026-10-21): a switch, low beside the fire button towards the middle; lit while ducking */
.vk-touch-crouch {
  right: calc(12.9rem + var(--safe-right));
  bottom: calc(1.2rem + var(--safe-bottom));
  width: 3.4rem;
  height: 3.4rem;
  font-size: 0.72rem;
}

.vk-touch-crouch::before {
  content: "Ducka";
}

.vk-crouching .vk-touch-crouch {
  opacity: 1;
  background: rgba(94, 240, 255, 0.36);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.55);
}

.vk-touch-fire.is-held,
.vk-touch-jump.is-held {
  opacity: 1;
  transform: scale(0.94);
}

.vk-touch-fire.is-held {
  background: rgba(255, 233, 77, 0.32);
  box-shadow: 0 0 18px rgba(255, 233, 77, 0.5);
}

/* the weapon switch goes up over the jump button, where the right thumb is anyway (bottom middle is out of reach) */
.vk-touch-on .vk-weapons {
  left: auto;
  right: calc(1.4rem + var(--safe-right));
  bottom: calc(9.4rem + var(--safe-bottom));
  transform: none;
}

.vk-touch-on .vk-weapon {
  width: 3.2rem;
  height: 3.2rem;
  padding: 0.45rem;
}

/* the battery and the shield are narrower on a touch screen, so they never reach the fire button (a 390 px phone) */
.vk-touch-on .vk-bar {
  width: 3.4rem;
}

.vk-touch-on .vk-battery {
  font-size: 0.95rem;
}

.vk-touch-on .vk-number {
  min-width: 1.9em;
}
