/* RDash's own mouse pointer, on every page of the website and the app, with one drawing for each thing the mouse can do:
   a plain arrow, the arrow with a ring around its tip over something that can be clicked, a white one with a tight ring while the button is held, over a text field, and over something
   that cannot be used. The drawings are made by WebSiteApp/build/make-cursors.js; the numbers after each are where it
   clicks. The second set gives sharp screens the larger drawings. :where() keeps these rules weak, so a page can still
   ask for another pointer (grab, resize...). Rules of the pages that say "pointer", "default", "text" or "not-allowed"
   are switched to RDash's by scripts/site-cursor.js. */
:root {
    --rd-cursor: url("/images/cursor/rdash.png?v=8") 2 2, default;
    --rd-cursor-link: url("/images/cursor/rdash-link.png?v=8") 10 10, pointer;
    --rd-cursor-press: url("/images/cursor/rdash-press.png?v=8") 10 10, pointer;
    --rd-cursor-text: url("/images/cursor/rdash-text.png?v=8") 16 16, text;
    --rd-cursor-no: url("/images/cursor/rdash-no.png?v=8") 16 16, not-allowed;
    --rd-cursor-grab: url("/images/cursor/rdash-grab.png?v=8") 16 16, grab;
    --rd-cursor-grabbing: url("/images/cursor/rdash-grabbing.png?v=8") 16 16, grabbing;
}
@supports (cursor: -webkit-image-set(url("a.png") 1x) 2 2, auto) {
    :root {
        --rd-cursor: -webkit-image-set(url("/images/cursor/rdash.png?v=8") 1x, url("/images/cursor/rdash@2x.png?v=8") 2x) 2 2, default;
        --rd-cursor-link: -webkit-image-set(url("/images/cursor/rdash-link.png?v=8") 1x, url("/images/cursor/rdash-link@2x.png?v=8") 2x) 10 10, pointer;
        --rd-cursor-press: -webkit-image-set(url("/images/cursor/rdash-press.png?v=8") 1x, url("/images/cursor/rdash-press@2x.png?v=8") 2x) 10 10, pointer;
        --rd-cursor-text: -webkit-image-set(url("/images/cursor/rdash-text.png?v=8") 1x, url("/images/cursor/rdash-text@2x.png?v=8") 2x) 16 16, text;
        --rd-cursor-no: -webkit-image-set(url("/images/cursor/rdash-no.png?v=8") 1x, url("/images/cursor/rdash-no@2x.png?v=8") 2x) 16 16, not-allowed;
        --rd-cursor-grab: -webkit-image-set(url("/images/cursor/rdash-grab.png?v=8") 1x, url("/images/cursor/rdash-grab@2x.png?v=8") 2x) 16 16, grab;
        --rd-cursor-grabbing: -webkit-image-set(url("/images/cursor/rdash-grabbing.png?v=8") 1x, url("/images/cursor/rdash-grabbing@2x.png?v=8") 2x) 16 16, grabbing;
    }
}
html { cursor: var(--rd-cursor); }
:where(label) { cursor: var(--rd-cursor); }          /* the browser gives labels the system's arrow by itself */
:where(a[href], area[href], summary, label[for], button:not(:disabled), select:not(:disabled),
    input:is([type="button"], [type="submit"], [type="reset"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="image"]):not(:disabled),
    [role="button"], [role="tab"], [role="menuitem"], [role="radio"], [role="switch"], [role="option"]) { cursor: var(--rd-cursor-link); }
:where(textarea, [contenteditable="true"], [contenteditable=""], input:not([type]),
    input:is([type="text"], [type="search"], [type="email"], [type="password"], [type="url"], [type="tel"], [type="number"])) { cursor: var(--rd-cursor-text); }
:where(button:disabled, select:disabled, input:disabled, textarea:disabled, [aria-disabled="true"]) { cursor: var(--rd-cursor-no); }
input[type="file"]::file-selector-button { cursor: var(--rd-cursor-link); }
/* written straight into an element (by a page or its script) */
[style*="cursor: pointer"], [style*="cursor:pointer"] { cursor: var(--rd-cursor-link) !important; }
[style*="cursor: default"], [style*="cursor:default"] { cursor: var(--rd-cursor) !important; }
[style*="cursor: text"], [style*="cursor:text"] { cursor: var(--rd-cursor-text) !important; }
[style*="cursor: not-allowed"], [style*="cursor:not-allowed"] { cursor: var(--rd-cursor-no) !important; }
[style*="cursor: grab;"], [style*="cursor:grab;"] { cursor: var(--rd-cursor-grab) !important; }
[style*="cursor: grabbing"], [style*="cursor:grabbing"] { cursor: var(--rd-cursor-grabbing) !important; }
/* while the button is held down (set by scripts/site-cursor.js on what was pressed) */
[data-rd-press], [data-rd-press] * { cursor: var(--rd-cursor-press) !important; }
