/* wheel-spin: the surface a wheel is grabbed by, and the cursor while it is held.
 * assets/js/wheel-spin-input.js lays the layer and keeps its discs in register with the
 * drawing; assets/js/wheel-spin.js marks the root `.wheel-spin` once the effect is on.
 * This file holds no colour.
 *
 * THE DISCS ARE THE ONLY THING THAT REFUSES A PAN. One transparent disc per wheel, in a
 * fixed layer inside the page column and under its text (z-index -1 inside the column's
 * own stacking context), and only the discs take `touch-action: none`, by the owner's
 * ruling: any swipe that starts on a wheel turns it, in any direction, and a finger
 * anywhere else is the page's. `pan-y` was tried and refused: on the left and right of a
 * wheel a circling finger moves mostly up or down, so the browser claimed the gesture as
 * a pan a few pixels in and cancelled the spin, and on a phone the page fits the screen,
 * so the pan it claimed scrolled nothing.
 *
 * THE HERO LETS THE POINTER THROUGH TO THEM. The hero is a full-width box over the
 * wheels, and a box takes the pointer whether or not it paints. With the effect on, the
 * hero itself takes no pointer events and its headline and subtitle take them as before,
 * so the text stays selectable and a drag never starts on it. */

.wheel-spin__layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.wheel-spin__disc {
  position: absolute;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
}

.wheel-spin .hero { pointer-events: none; }
.wheel-spin .hero__title,
.wheel-spin .hero__lede { pointer-events: auto; }

/* While a wheel is held, nothing on the page is selected and the hand stays closed. */
.wheel-spin--dragging,
.wheel-spin--dragging * {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}
