/* Tether-style pointer — progressive enhancement; disabled for coarse pointer & reduced motion */

.thrPointer {
  position: fixed;
  top: 0;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  box-sizing: border-box;
  border: none;
  border-radius: 50%;
  background-color: var(--color-text-primary);
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  will-change: transform;
  transition:
    width 0.2s ease,
    height 0.2s ease,
    opacity 0.2s ease;
}

html.cursor-active .thrPointer:not(.thrPointer--outside):not(.thrPointer--hover):not(.thrPointer--clicked) {
  opacity: 0.9;
}

.thrPointer--outside {
  opacity: 0;
}

.thrPointer--hover {
  width: 2rem;
  height: 2rem;
  background: transparent;
  opacity: 1;
  border: none;
  filter: none;
  mix-blend-mode: normal;
  -webkit-backdrop-filter: invert(1);
  backdrop-filter: invert(1);
}

html.cursor-active .thrPointer.thrPointer--clicked:not(.thrPointer--outside) {
  opacity: 1;
  background-color: var(--color-text-primary);
  border: none;
  filter: none;
}

@media (pointer: fine) {
  html.cursor-active:not(.cursor--outside),
  html.cursor-active:not(.cursor--outside) * {
    cursor: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thrPointer {
    display: none !important;
  }

  html {
    cursor: auto !important;
  }
}

@media (pointer: coarse) {
  .thrPointer {
    display: none !important;
  }

  html {
    cursor: auto !important;
  }
}
