/* QOS cursors, one set per era. cursors.js builds --aq-* (1996: Aqua / Aero style, the default look) and --px-* (1986:
   classic Mac OS pixel pointers, body.y1996) on :root, each a PNG image-set plus a keyword fallback. --cur-* below picks
   the era's set; if the script fails, every var() falls back to the old keyword cursor.
   Mouse and trackpad only: touch devices (pointer: coarse) are left alone.
   !important is deliberate: qos.css and media.css set keyword cursors on many selectors; this file maps each
   meaning to its pixel version (pointer -> pointing hand, grab -> open hand, grabbing -> fist, *-resize, zoom-*). */
/* the era decides the set: 1996 (default) = Aqua / Aero; 1986 (body.y1996) = pixel Mac */
:root { --cur-arrow: var(--aq-arrow); --cur-point: var(--aq-point); --cur-open: var(--aq-open); --cur-grab: var(--aq-grab); --cur-ibeam: var(--aq-ibeam); --cur-ns: var(--aq-ns); --cur-ew: var(--aq-ew); --cur-nwse: var(--aq-nwse); --cur-nesw: var(--aq-nesw); --cur-zin: var(--aq-zin); --cur-zout: var(--aq-zout); --cur-help: var(--aq-help); --cur-wait: var(--aq-wait); }
body.y1996 { --cur-arrow: var(--px-arrow); --cur-point: var(--px-point); --cur-open: var(--px-open); --cur-grab: var(--px-grab); --cur-ibeam: var(--px-ibeam); --cur-ns: var(--px-ns); --cur-ew: var(--px-ew); --cur-nwse: var(--px-nwse); --cur-nesw: var(--px-nesw); --cur-zin: var(--px-zin); --cur-zout: var(--px-zout); --cur-help: var(--px-help); --cur-wait: var(--px-wait); }

@media (hover: hover) and (pointer: fine) {

  /* default arrow */
  html, body { cursor: var(--cur-arrow, default); }

  /* clickable: pointing hand */
  a[href], button, summary, select, [role="button"], [role="tab"], [role="link"], [role="menuitem"],
  label[for], input[type="checkbox"], input[type="radio"], input[type="range"], input[type="color"],
  input[type="button"], input[type="submit"], input[type="file"],
  .rail-item, .chip, [data-go],
  .desk-bar, .tl-scrub, .reply.browsing .rl.you, .rl.replay, .rd-notes summary, .qd-always,
  .rl.load .ld-x, .rl.load .ld-y, .rl.load .ld-n, .win-media .vp-face,
  body.overview .win, body.overview .win-bar { cursor: var(--cur-point, pointer) !important; }

  /* disabled things go back to the plain arrow */
  button:disabled, [disabled], [aria-disabled="true"], .lv-row[disabled] { cursor: var(--cur-arrow, default) !important; }

  /* text: I-beam */
  input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"],
  input[type="tel"], input[type="password"], input[type="number"], textarea, [contenteditable=""],
  [contenteditable="true"], #prompt { cursor: var(--cur-ibeam, text) !important; }

  /* zoom (images that open bigger, and the lightbox) */
  .win.desk .win-media, .rd-img[data-fig], button.rv-tag, .im-stage { cursor: var(--cur-zin, zoom-in) !important; }
  .im-stage.one { cursor: var(--cur-zout, zoom-out) !important; }
  .win.max .win-media { cursor: var(--cur-arrow, default) !important; }

  /* open hand: things you can pick up (window title bars, the timeline strip, the setup panel bar, docked QBOT JR) */
  .win-bar, .set-bar, .tl, .robot.docked { cursor: var(--cur-open, grab) !important; }
  .win.app .win-bar { cursor: var(--cur-arrow, default) !important; }
  /* the controls in a title bar are still buttons */
  .win-bar button, .win-bar a[href] { cursor: var(--cur-point, pointer) !important; }

  /* horizontal slider (before/after reveal) */
  .rv { cursor: var(--cur-ew, ew-resize) !important; }

  /* window resize handles and QBOT JR's corner handles */
  .rz-n, .rz-s { cursor: var(--cur-ns, ns-resize) !important; }
  .rz-e, .rz-w { cursor: var(--cur-ew, ew-resize) !important; }
  .rz-ne, .rz-sw { cursor: var(--cur-nesw, nesw-resize) !important; }
  .rz-nw, .rz-se, .rb-tl, .rb-br { cursor: var(--cur-nwse, nwse-resize) !important; }

  /* busy: the wait cursor (the 1996 ring turns; cursors.js) */
  [aria-busy="true"], body.qos-busy, body.qos-busy * { cursor: var(--cur-wait, progress) !important; }

  /* the title-bar "what does this button do?" button */
  .win-sw { cursor: var(--cur-help, help) !important; }

  /* closed hand: while something is being dragged (wm.js and qos.js put body.grabbing on for drags AND resizes) */
  .win.dragging .win-bar, .setup.dragging .set-bar, .tl.drag, .robot.dragging,
  body.grabbing, body.grabbing * { cursor: var(--cur-grab, grabbing) !important; }
  /* ...but a resize keeps its resize arrows (pointer capture keeps the handle as the target) */
  body.grabbing .rz-n, body.grabbing .rz-s { cursor: var(--cur-ns, ns-resize) !important; }
  body.grabbing .rz-e, body.grabbing .rz-w { cursor: var(--cur-ew, ew-resize) !important; }
  body.grabbing .rz-ne, body.grabbing .rz-sw { cursor: var(--cur-nesw, nesw-resize) !important; }
  body.grabbing .rz-nw, body.grabbing .rz-se, body.grabbing .rb-tl, body.grabbing .rb-br { cursor: var(--cur-nwse, nwse-resize) !important; }
}

/* phone layout: title bars are not draggable there (qos.css makes them cursor: default) */
@media (hover: hover) and (pointer: fine) and (max-width: 699px) {
  .win-bar, .win.dragging .win-bar { cursor: var(--cur-arrow, default) !important; }
}
