/*
 * Bastigames cursor kit — the same sticker-style cursor in the launcher and every game.
 * Canonical copy: /var/www/html/home/kit/cursor/ (copy the whole folder into a game).
 * Mouse only: phones/touch never see any of this.
 * Burst colour: set --cursor-accent (defaults to Tankies pink).
 */
@media (pointer: fine) {
  /* :root selectors outrank the plain `html, body { cursor: default }` app-feel rule */
  :root, :root > body { cursor: url(arrow.svg) 6 4, default; }

  a[href], button:not(:disabled), [role="button"], [role="option"], [role="tab"], [role="link"],
  label[for], select, summary, input[type="checkbox"], input[type="radio"], input[type="range"],
  input[type="button"], input[type="submit"], [data-cursor="hand"] {
    cursor: url(hand.svg) 14 5, pointer;
  }

  input:not([readonly]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]),
  textarea, [contenteditable="true"] {
    cursor: text;
  }

  :disabled, [aria-disabled="true"] { cursor: url(arrow.svg) 6 4, not-allowed; }

  /* set by cursor.js: anything a game gave the native `cursor: pointer`, and the pressed glove */
  .bg-cur-hand { cursor: url(hand.svg) 14 5, pointer !important; }
  .bg-cur-press, .bg-cur-press * { cursor: url(hand-press.svg) 14 5, pointer !important; }
}

/* click pop (spawned by cursor.js at the pointer) */
.bg-cursor-pop {
  position: fixed; left: 0; top: 0; width: 0; height: 0;
  pointer-events: none; z-index: 2147483647;
}
.bg-cursor-pop::before, .bg-cursor-pop::after {
  content: ""; position: absolute; left: 0; top: 0; border-radius: 50%;
  transform: translate(-50%, -50%) scale(.2);
}
.bg-cursor-pop::before { /* ring */
  width: 34px; height: 34px;
  border: 3px solid var(--cursor-accent, #ff4f8b);
  animation: bg-cursor-ring .42s cubic-bezier(.2, .8, .2, 1) forwards;
}
.bg-cursor-pop::after { /* four sparkle ticks */
  width: 6px; height: 6px;
  background: var(--cursor-accent, #ff4f8b);
  box-shadow: 0 -17px 0 -1px #fff4e0, 17px 0 0 -1px #fff4e0, 0 17px 0 -1px #fff4e0, -17px 0 0 -1px #fff4e0;
  animation: bg-cursor-ticks .42s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes bg-cursor-ring {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@keyframes bg-cursor-ticks {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) { .bg-cursor-pop { display: none; } }
