/* Written by scripts/build-cursors.ts: Bibata Modern Classic (Bibata Cursor by ful1e5, GPL-3.0-or-later, see LICENSE).
   A var() that fails falls back to nothing, not to an earlier declaration: the 2x images replace the plain ones only where
   the browser takes image-set() in a cursor, each value ending on the browser's own cursor of that name. */
@layer theme, base, components, utilities;

:root {
  --cursor-default: url("/assets/cursors/default.png") 5 1, default;
  --cursor-pointer: url("/assets/cursors/pointer.png") 10 1, pointer;
  --cursor-text: url("/assets/cursors/text.png") 12 12, text;
  --cursor-grab: url("/assets/cursors/grab.png") 13 7, grab;
  --cursor-grabbing: url("/assets/cursors/grabbing.png") 12 6, grabbing;
  --cursor-not-allowed: url("/assets/cursors/not-allowed.png") 12 12, not-allowed;
  --cursor-progress: url("/assets/cursors/progress.png") 5 1, progress;
  --cursor-wait: url("/assets/cursors/wait.png") 12 12, wait;
  --cursor-help: url("/assets/cursors/help.png") 3 8, help;
  --cursor-move: url("/assets/cursors/move.png") 12 12, move;
  --cursor-copy: url("/assets/cursors/copy.png") 5 1, copy;
  --cursor-crosshair: url("/assets/cursors/crosshair.png") 12 12, crosshair;
  --cursor-ew-resize: url("/assets/cursors/ew-resize.png") 12 12, ew-resize;
  --cursor-ns-resize: url("/assets/cursors/ns-resize.png") 12 12, ns-resize;
  --cursor-col-resize: url("/assets/cursors/ew-resize.png") 12 12, col-resize;
  --cursor-row-resize: url("/assets/cursors/ns-resize.png") 12 12, row-resize;
  --cursor-nwse-resize: url("/assets/cursors/nwse-resize.png") 12 12, nwse-resize;
  --cursor-nesw-resize: url("/assets/cursors/nesw-resize.png") 12 12, nesw-resize;
  --cursor-e-resize: url("/assets/cursors/e-resize.png") 21 12, e-resize;
  --cursor-w-resize: url("/assets/cursors/w-resize.png") 1 12, w-resize;
  --cursor-zoom-in: url("/assets/cursors/zoom-in.png") 10 10, zoom-in;
  --cursor-zoom-out: url("/assets/cursors/zoom-out.png") 10 10, zoom-out;
}
@supports (cursor: image-set(url("/assets/cursors/default.png") 1x) 0 0, auto) {
  :root {
    --cursor-default: image-set(url("/assets/cursors/default.png") 1x, url("/assets/cursors/default@2x.png") 2x) 5 1, default;
    --cursor-pointer: image-set(url("/assets/cursors/pointer.png") 1x, url("/assets/cursors/pointer@2x.png") 2x) 10 1, pointer;
    --cursor-text: image-set(url("/assets/cursors/text.png") 1x, url("/assets/cursors/text@2x.png") 2x) 12 12, text;
    --cursor-grab: image-set(url("/assets/cursors/grab.png") 1x, url("/assets/cursors/grab@2x.png") 2x) 13 7, grab;
    --cursor-grabbing: image-set(url("/assets/cursors/grabbing.png") 1x, url("/assets/cursors/grabbing@2x.png") 2x) 12 6, grabbing;
    --cursor-not-allowed: image-set(url("/assets/cursors/not-allowed.png") 1x, url("/assets/cursors/not-allowed@2x.png") 2x) 12 12, not-allowed;
    --cursor-progress: image-set(url("/assets/cursors/progress.png") 1x, url("/assets/cursors/progress@2x.png") 2x) 5 1, progress;
    --cursor-wait: image-set(url("/assets/cursors/wait.png") 1x, url("/assets/cursors/wait@2x.png") 2x) 12 12, wait;
    --cursor-help: image-set(url("/assets/cursors/help.png") 1x, url("/assets/cursors/help@2x.png") 2x) 3 8, help;
    --cursor-move: image-set(url("/assets/cursors/move.png") 1x, url("/assets/cursors/move@2x.png") 2x) 12 12, move;
    --cursor-copy: image-set(url("/assets/cursors/copy.png") 1x, url("/assets/cursors/copy@2x.png") 2x) 5 1, copy;
    --cursor-crosshair: image-set(url("/assets/cursors/crosshair.png") 1x, url("/assets/cursors/crosshair@2x.png") 2x) 12 12, crosshair;
    --cursor-ew-resize: image-set(url("/assets/cursors/ew-resize.png") 1x, url("/assets/cursors/ew-resize@2x.png") 2x) 12 12, ew-resize;
    --cursor-ns-resize: image-set(url("/assets/cursors/ns-resize.png") 1x, url("/assets/cursors/ns-resize@2x.png") 2x) 12 12, ns-resize;
    --cursor-col-resize: image-set(url("/assets/cursors/ew-resize.png") 1x, url("/assets/cursors/ew-resize@2x.png") 2x) 12 12, col-resize;
    --cursor-row-resize: image-set(url("/assets/cursors/ns-resize.png") 1x, url("/assets/cursors/ns-resize@2x.png") 2x) 12 12, row-resize;
    --cursor-nwse-resize: image-set(url("/assets/cursors/nwse-resize.png") 1x, url("/assets/cursors/nwse-resize@2x.png") 2x) 12 12, nwse-resize;
    --cursor-nesw-resize: image-set(url("/assets/cursors/nesw-resize.png") 1x, url("/assets/cursors/nesw-resize@2x.png") 2x) 12 12, nesw-resize;
    --cursor-e-resize: image-set(url("/assets/cursors/e-resize.png") 1x, url("/assets/cursors/e-resize@2x.png") 2x) 21 12, e-resize;
    --cursor-w-resize: image-set(url("/assets/cursors/w-resize.png") 1x, url("/assets/cursors/w-resize@2x.png") 2x) 1 12, w-resize;
    --cursor-zoom-in: image-set(url("/assets/cursors/zoom-in.png") 1x, url("/assets/cursors/zoom-in@2x.png") 2x) 10 10, zoom-in;
    --cursor-zoom-out: image-set(url("/assets/cursors/zoom-out.png") 1x, url("/assets/cursors/zoom-out@2x.png") 2x) 10 10, zoom-out;
  }
}

/* Without weight (:where), in order: a disabled control's cursor wins over a control's; any utility over all (the
   desktop app's Tailwind draws its cursor utilities with these pointers too: desktop/renderer/globals.css; the phone
   app's are overridden in desktop/web.ts). */
@layer base {
  :root {
    cursor: var(--cursor-default);
  }
  :where(a[href], button, summary, select, label, [role=button], [role=tab], [role=menuitem], [role=menuitemcheckbox], [role=menuitemradio], [role=option], [role=switch], [role=checkbox], [role=radio], input:is([type=button], [type=submit], [type=reset], [type=checkbox], [type=radio], [type=file], [type=color], [type=range])) {
    cursor: var(--cursor-pointer);
  }
  :where(textarea, [contenteditable]:not([contenteditable=false]), input:not([type=button], [type=submit], [type=reset], [type=checkbox], [type=radio], [type=file], [type=color], [type=range], [type=image], [type=hidden])) {
    cursor: var(--cursor-text);
  }
  :where(:disabled, [aria-disabled=true]) {
    cursor: var(--cursor-not-allowed);
  }
}
