/*
 * Curseurs holographiques communs à tous les écrans Draconia.
 *
 * Les règles sont volontairement `!important` : plusieurs vues 3D changent
 * encore `canvas.style.cursor` pendant un glissement ou le survol d'un slot.
 * Sans cette priorité, elles réintroduiraient ponctuellement les curseurs du
 * système et casseraient l'illusion de projection.
 */
:root {
  --cursor-holo-default: url("../../assets/ui/cursors/holo-default.svg") 4 3, crosshair;
  --cursor-holo-action: url("../../assets/ui/cursors/holo-action.svg") 16 16, pointer;
  --cursor-holo-text: url("../../assets/ui/cursors/holo-text.svg") 16 16, text;
  --cursor-holo-grab: url("../../assets/ui/cursors/holo-grab.svg") 16 16, grab;
  --cursor-holo-blocked: url("../../assets/ui/cursors/holo-blocked.svg") 16 16, not-allowed;
}

html,
body,
body *,
body *::before,
body *::after {
  cursor: var(--cursor-holo-default) !important;
}

:is(
  a, button, summary, select, option,
  input[type="button"], input[type="submit"], input[type="reset"],
  input[type="checkbox"], input[type="radio"], input[type="range"], input[type="color"],
  label[for], label:has(input[type="checkbox"]), label:has(input[type="radio"]),
  label:has(input[type="file"]), label:has(input[type="range"]), label:has(input[type="color"]),
  [role="button"], [role="link"], [data-action], [data-cosmetic],
  .card, .service-item, .primary-action, .pvp-quick, .back-link,
  .import-button, .radar-card, #hub-radar,
  [tabindex]:not([tabindex="-1"])
):not(:disabled):not([aria-disabled="true"]) {
  cursor: var(--cursor-holo-action) !important;
}

:is(
  input:not([type]), input[type="text"], input[type="search"], input[type="email"],
  input[type="number"], input[type="password"], input[type="url"], input[type="tel"],
  textarea, [contenteditable="true"]
) {
  cursor: var(--cursor-holo-text) !important;
}

:is(#cabin-preview, .weapon-preview, [data-cursor="grab"], [style*="cursor: grab"]) {
  cursor: var(--cursor-holo-grab) !important;
}

:is(
  canvas[style*="cursor: pointer"],
  [style*="cursor: pointer"]
) {
  cursor: var(--cursor-holo-action) !important;
}

:is(
  canvas[style*="cursor: grabbing"],
  [style*="cursor: grabbing"],
  .dragging, .is-dragging
) {
  cursor: var(--cursor-holo-grab) !important;
}

:is(:disabled, [aria-disabled="true"], [disabled]) {
  cursor: var(--cursor-holo-blocked) !important;
}
