@media (hover: hover) and (pointer: fine) {
  body {
    cursor: url("assets/cursors/cursor-seta-rustica.png") 1 1, auto;
  }

  body :is(
    button:not(:disabled),
    a[href],
    [role="button"]:not([aria-disabled="true"]),
    summary,
    input[type="checkbox"]:not(:disabled),
    input[type="radio"]:not(:disabled)
  ) {
    cursor: url("assets/cursors/cursor-seta-rustica.png") 1 1, pointer;
  }

  body.custom-cursor-active.custom-cursor-image-ready,
  body.custom-cursor-active.custom-cursor-image-ready * {
    cursor: none !important;
  }

  body.custom-cursor-active :is(
    input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select,
    [contenteditable="true"]
  ) {
    cursor: text !important;
  }

  #site-custom-cursor[popover] {
    position: fixed;
    inset: 0 auto auto 0;
    display: none;
    width: 32px;
    height: 32px;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    pointer-events: none;
    transform-origin: 1px 1px;
    will-change: transform;
  }

  #site-custom-cursor[popover]:popover-open {
    display: block;
  }

  #site-custom-cursor img {
    display: block;
    width: 32px;
    height: 32px;
    max-width: none;
    max-height: none;
    pointer-events: none;
    user-select: none;
  }

  #site-custom-cursor.is-pulsing img {
    animation: site-cursor-pulse .85s ease-in-out infinite alternate;
    transform-origin: 1px 1px;
  }
}

@keyframes site-cursor-pulse {
  from { transform: scale(.92); }
  to { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  #site-custom-cursor.is-pulsing img {
    animation: none;
  }
}
