/* ==========================================================================
   Library: Custom Cursor (CSS) (website-components/osmo-code).
   Code as in the library; the only change: the SVGs are self-hosted in
   assets/cursors/ (no third-party requests, see CLAUDE.md privacy).
   ========================================================================== */

/* Cursor "default" */
body,
body :is([data-cursor="default"], [data-cursor="default"] *),
body * {
  cursor: url("../assets/cursors/cursor-default.svg") 2 0, auto;
}

/* Cursor "text" */
body :is([data-cursor="text"], [data-cursor="text"] *),
body :is(p, h1, h2, h3, h4, h5, h6, input[type="text"], textarea) {
  cursor: url("../assets/cursors/cursor-text.svg") 9 19, text;
}

/* Cursor "pointer" (Hover) */
body :is([data-cursor="pointer"], [data-cursor="pointer"] *),
body :is(a, a *, a p, button, button *, select, input[type="submit"], input[type="button"], input[type="radio"], input[type="checkbox"]) {
  cursor: url("../assets/cursors/cursor-pointer.svg") 12 0, pointer;
}

/* Cursor "grab" */
body :is([data-cursor="grab"], [data-cursor="grab"] *) {
  cursor: url("../assets/cursors/cursor-grab.svg") 12 4, grab;
}

/* Cursor "grabbing" */
body :is([data-cursor="grabbing"], [data-cursor="grabbing"] *) {
  cursor: url("../assets/cursors/cursor-grabbing.svg") 12 0, grabbing;
}

/* El Taco Loco: show the grabbing hand while dragging a grab area */
body :is([data-cursor="grab"], [data-cursor="grab"] *):active {
  cursor: url("../assets/cursors/cursor-grabbing.svg") 12 0, grabbing;
}

/* El Taco Loco: text inside a draggable slider can't be selected, so it keeps the grab hand */
body [data-cursor="grab"] :is(p, h1, h2, h3, h4, h5, h6) {
  cursor: url("../assets/cursors/cursor-grab.svg") 12 4, grab;
}

body [data-cursor="grab"] :is(p, h1, h2, h3, h4, h5, h6):active,
body [data-cursor="grab"] :active {
  cursor: url("../assets/cursors/cursor-grabbing.svg") 12 0, grabbing;
}
