/* ==========================================================================
   MINIMAL INVERTED CURSOR
   Mathematically inverts backdrop colors in real time with zero latency.
   ========================================================================== */

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background-color: #ffffff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 10000000;
  user-select: none;
  -webkit-user-select: none;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transform-origin: center center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* Hide when selecting text or in inputs */
body.cursor-text .custom-cursor,
body.cursor-selecting .custom-cursor {
  opacity: 0 !important;
}

/* Desktop Fine Pointer Override */
@media (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor *:not(input):not(textarea):not([contenteditable="true"]) {
    cursor: none !important;
  }

  body.has-custom-cursor.cursor-text,
  body.has-custom-cursor.cursor-text *:not(a):not(button):not([role="button"]):not(.interactive) {
    cursor: text !important;
  }
}

/* Touch / Coarse Pointer Fallback */
@media (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}