/* Touch screens (phones, tablets): gestures. Desktop rules stay in app.css. */

/* A finger is the main pointer (touch.js): one finger scrolls everywhere, also
   over clips, notes and waveforms (press and hold to drag them instead), and
   the app's own pinch zooms its timelines, never the page. Controls that take
   a finger directly (knobs, faders, pads, EQ nodes, the velocity lane, the
   piano roll's keys and ruler) keep their touch-action: none. */
@media (pointer: coarse) {
  :where(.daw-page, .daw-page *) { touch-action: pan-x pan-y; }
  :root:has(> body.daw-page), body.daw-page { overscroll-behavior: none; } /* no pull-to-refresh: it would reload the Drop */
  .clip.editable, .pr-grid { touch-action: pan-x pan-y; }
  .aq-canvas { touch-action: pan-x; }
  .aq-scroll { overscroll-behavior: contain; }

  /* Long presses pick things up: no text selection, magnifier or callout. */
  .arrange, .dock { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .arrange :is(input, textarea), .dock :is(input, textarea) { -webkit-user-select: text; user-select: text; }

  /* Clip edges to trim, for a finger: wider, and shown on the selected clip. */
  .clip-edge { width: min(20px, 25%); }
  .clip.selected .clip-edge { background: rgba(255, 255, 255, 0.12); }

  /* The loop: a taller strip; the band and its markers are handles that drag
     at once, each marker with a wide grip that doesn't show. */
  .loop-strip { height: 16px; }
  .loop-band, .loop-marker { touch-action: none; }
  .loop-marker::before { content: ""; position: absolute; top: 0; bottom: -10px; width: 36px; }
  .loop-marker[data-edge="start"]::before { left: -19px; }
  .loop-marker[data-edge="end"]::before { right: -19px; }
}
