/*
 * Where a custom cursor must not apply.
 *
 * The cursor image itself is set by CursorManager from the preset library, so
 * there is one registry rather than two. This file only carves out the places
 * where an animal actively gets in the way — a decorative pointer over a text
 * field hides the caret, and one that never changes over a button removes the
 * only signal that it is clickable.
 *
 * Scoped to [data-eip-cursor] so nothing here fires when the cursor is set to
 * System Default.
 */

body[data-eip-cursor] input,
body[data-eip-cursor] textarea,
body[data-eip-cursor] select,
body[data-eip-cursor] [contenteditable='true'] {
  cursor: text;
}

body[data-eip-cursor] select {
  cursor: pointer;
}

body[data-eip-cursor] a,
body[data-eip-cursor] button,
body[data-eip-cursor] label,
body[data-eip-cursor] [role='button'],
body[data-eip-cursor] [role='tab'],
body[data-eip-cursor] summary {
  cursor: pointer;
}

body[data-eip-cursor] button:disabled,
body[data-eip-cursor] [aria-disabled='true'] {
  cursor: not-allowed;
}

/*
 * The certificate builder needs its real grab and resize cursors — those are
 * how you know an object can be moved or a handle dragged.
 */
body[data-eip-cursor] canvas,
body[data-eip-cursor] .upper-canvas,
body[data-eip-cursor] .canvas-container,
body[data-eip-cursor] .eip-no-custom-cursor,
body[data-eip-cursor] .eip-no-custom-cursor * {
  cursor: auto;
}

/* Nothing to decorate without a pointing device. */
@media (pointer: coarse) {
  body[data-eip-cursor] {
    cursor: auto !important;
  }
}

/*
 * The animated cat replaces the pointer, so the system arrow is hidden while it
 * is on. Text fields keep their I-beam regardless: the cat cannot show a caret
 * position, and typing without one is miserable.
 */
body.eip-oneko-active {
  cursor: none;
}

body.eip-oneko-active input,
body.eip-oneko-active textarea,
body.eip-oneko-active [contenteditable='true'] {
  cursor: text;
}

body.eip-oneko-active canvas,
body.eip-oneko-active .upper-canvas,
body.eip-oneko-active .canvas-container,
body.eip-oneko-active .eip-no-custom-cursor,
body.eip-oneko-active .eip-no-custom-cursor * {
  cursor: auto;
}
