/* drone-kit.css — touch controls of the drone game (js/drone/kit/controls.js).
   The root sits between the sniper HUD and the menus in the page; it is in the DOM only while a
   drone mission is playing with touch on. Sticks are physical: nothing here mirrors for RTL. */
.dk-root {
  position: fixed; inset: 0; pointer-events: none; touch-action: none; direction: ltr;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  --dk-r: 56px; --dk-btn: clamp(56px, 15vmin, 68px); --dk-ink: rgba(242, 239, 227, 0.9);
  font-family: var(--f-body, system-ui, sans-serif);
}
.dk-root * { -webkit-tap-highlight-color: transparent; }

/* Halves of the screen where a thumb may start a stick (or the look drag). */
.dk-zone { position: absolute; top: 0; bottom: 0; pointer-events: auto; touch-action: none; }
.dk-zone[data-zone="l"] { left: 0; right: 50%; }
.dk-zone[data-zone="r"] { left: 50%; right: 0; }

/* A stick: ring with the thumb knob; moved by transform only. */
.dk-stick { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; will-change: transform; }
.dk-ring {
  position: absolute; left: calc(var(--dk-r) * -1); top: calc(var(--dk-r) * -1); width: calc(var(--dk-r) * 2); height: calc(var(--dk-r) * 2);
  border-radius: 50%; border: 2px solid rgba(242, 239, 227, 0.72); background: rgba(10, 14, 8, 0.2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.dk-knob {
  position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; will-change: transform;
  background: rgba(242, 239, 227, 0.42); border: 2px solid rgba(242, 239, 227, 0.9); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.dk-stick.idle .dk-ring { border-style: dashed; border-color: rgba(242, 239, 227, 0.36); background: transparent; box-shadow: none; }
.dk-stick.idle .dk-knob { opacity: 0; }
.dk-cap {
  position: absolute; left: -110px; top: calc(var(--dk-r) + 6px); width: 220px; text-align: center; opacity: 0; transition: opacity 0.3s;
  font: 600 11px/1.2 var(--f-body, sans-serif); color: var(--dk-ink); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.6); unicode-bidi: plaintext;
}
.dk-hints .dk-stick.idle .dk-cap { opacity: 0.85; }
/* Walking: only the left stick exists; the right half is a look pad with a single hint. */
.dk-foot .dk-stick[data-side="r"] .dk-ring, .dk-foot .dk-stick[data-side="r"] .dk-knob { display: none; }
.dk-foot .dk-stick[data-side="r"] .dk-cap { top: -8px; }

/* Button columns along the screen edges, filled from the bottom up. */
.dk-lane {
  position: absolute; bottom: max(14px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; pointer-events: none;
}
.dk-lane-l { left: max(14px, env(safe-area-inset-left, 0px)); }
.dk-lane-r { right: max(14px, env(safe-area-inset-right, 0px)); }
.dk-btn {
  pointer-events: auto; touch-action: none; -webkit-appearance: none; appearance: none; margin: 0; padding: 0;
  width: var(--dk-btn); height: var(--dk-btn); border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 1px;
  color: var(--dk-ink); background: rgba(14, 18, 10, 0.54); border: 2px solid rgba(242, 239, 227, 0.64); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  font: 600 11px/1.05 var(--f-body, sans-serif); cursor: pointer; outline: none;
}
.dk-btn.big { width: calc(var(--dk-btn) * 1.3); height: calc(var(--dk-btn) * 1.3); border-color: rgba(242, 179, 61, 0.85); }
.dk-btn.on { background: rgba(242, 179, 61, 0.58); border-color: #f2b33d; transform: scale(0.94); }
.dk-ico { display: block; line-height: 0; }
.dk-ico svg { display: block; }
.dk-lbl { max-width: calc(var(--dk-btn) - 8px); text-align: center; white-space: nowrap; overflow: hidden; unicode-bidi: plaintext; }
.dk-btn.big .dk-lbl { max-width: calc(var(--dk-btn) * 1.3 - 8px); }
.dk-btn.no-ico .dk-lbl { font-size: 13px; }

.dk-pause {
  position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); width: 46px; height: 46px; pointer-events: auto; touch-action: none;
  display: grid; place-items: center; padding: 0; border-radius: 50%; color: var(--dk-ink); background: rgba(14, 18, 10, 0.5); border: 2px solid rgba(242, 239, 227, 0.55); outline: none;
}
.dk-pause svg { width: 18px; height: 18px; }
