/* Old-school pixel cursors (drawn in scripts/icons.py). Loaded last on every page.
   Cursor images ignore CSS zoom, so js/scale.js's data-scale picks a matching size. */

:root {
    --cur-arrow: url("../img/cursors/arrow-32.svg") 0 0, default;
    --cur-hand: url("../img/cursors/hand-32.svg") 6 0, pointer;
    --cur-text: url("../img/cursors/text-32.svg") 3 9, text;
    --cur-busy: url("../img/cursors/busy-32.svg") 7 9, progress;
}
:root[data-scale="1.5"], :root[data-scale="1.75"] {
    --cur-arrow: url("../img/cursors/arrow-48.svg") 0 0, default;
    --cur-hand: url("../img/cursors/hand-48.svg") 9 0, pointer;
    --cur-text: url("../img/cursors/text-48.svg") 5 13, text;
    --cur-busy: url("../img/cursors/busy-48.svg") 10 13, progress;
}
:root[data-scale="2"], :root[data-scale="2.25"], :root[data-scale="2.5"], :root[data-scale="2.75"], :root[data-scale="3"] {
    --cur-arrow: url("../img/cursors/arrow-64.svg") 0 0, default;
    --cur-hand: url("../img/cursors/hand-64.svg") 12 0, pointer;
    --cur-text: url("../img/cursors/text-64.svg") 6 18, text;
    --cur-busy: url("../img/cursors/busy-64.svg") 14 18, progress;
}

/* Like Windows 95: the arrow almost everywhere, including buttons, icons and menus. */
*, *::before, *::after { cursor: var(--cur-arrow) !important; }

/* A hand only for real hyperlinks that leave the desktop. */
a[href^="http"], a[href^="/"]:not(.button), .wallpaper-credit a, .welcome a { cursor: var(--cur-hand) !important; }

/* The I-beam over editable or selectable text. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]),
textarea, .notepad-page, .review-detail p { cursor: var(--cur-text) !important; }
input:disabled, textarea:disabled { cursor: var(--cur-arrow) !important; }

/* The hourglass while something loads. */
html.is-busy, html.is-busy * { cursor: var(--cur-busy) !important; }
