/* 
   --- CURSOR UTILITY --- 
   Only active on devices with a mouse (pointer: fine).
   Touch devices will ignore this entirely.
*/

@media (pointer: fine) {
  /* Hide Default Cursor ONLY when custom cursor is ready */
  body.custom-cursor-active,
  body.custom-cursor-active a,
  body.custom-cursor-active button,
  body.custom-cursor-active input {
    cursor: none !important;
  }

  /* --- CUSTOM CURSOR ELEMENT --- */
  #sticky-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none; /* Allows clicking through it */
    z-index: 99999;

    /* Hardware Acceleration Hints */
    will-change: transform, width, height, border-radius;
    transform: translate3d(0, 0, 0);

    /* Default Appearance */
    background-color: #fff;
    mix-blend-mode: exclusion; /* Cool effect over white backgrounds */
    transition:
      opacity 0.2s ease,
      background-color 0.2s ease,
      border-color 0.2s ease;
  }

  /* --- LOCKED STATE (Hovering Links) --- */
  #sticky-cursor.is-locked {
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    mix-blend-mode: normal;
  }

  /* --- THEME SPECIFIC OVERRIDES --- */

  /* Light Theme Adjustments */
  body.light-theme #sticky-cursor {
    background-color: #000;
    mix-blend-mode: normal;
  }

  body.light-theme #sticky-cursor.is-locked {
    border-color: #000;
    box-shadow: none;
  }
}
