/* Custom pointer (Nullserie / Second Skin style), desktop fine pointer only */

html.ns-cursor-on,
html.ns-cursor-on *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
  cursor: none !important;
}

html.ns-cursor-on input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]),
html.ns-cursor-on textarea,
html.ns-cursor-on [contenteditable="true"] {
  cursor: text !important;
}

html.ns-cursor-on a[href],
html.ns-cursor-on button:not(:disabled),
html.ns-cursor-on [role="button"]:not([aria-disabled="true"]),
html.ns-cursor-on label,
html.ns-cursor-on summary,
html.ns-cursor-on select,
html.ns-cursor-on input[type="button"],
html.ns-cursor-on input[type="submit"],
html.ns-cursor-on input[type="reset"],
html.ns-cursor-on input[type="checkbox"],
html.ns-cursor-on input[type="radio"],
html.ns-cursor-on input[type="range"],
html.ns-cursor-on input[type="color"],
html.ns-cursor-on input[type="file"] {
  cursor: none !important;
}

html.ns-cursor-on .ns-cursor-dot.mode-text {
  opacity: 0 !important;
}

html.ns-cursor-on .ns-cursor-dot.mode-aim {
  position: fixed;
  width: var(--ns-cursor-size-aim, 20px);
  height: var(--ns-cursor-size-aim, 20px);
  margin-left: calc(var(--ns-cursor-size-aim, 20px) / -2);
  margin-top: calc(var(--ns-cursor-size-aim, 20px) / -2);
  background: transparent;
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--ns-cursor-color, #1a1816) 72%, transparent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--ns-cursor-color, #1a1816) 7%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--ns-cursor-color, #1a1816) 18%, transparent);
  box-sizing: border-box;
}

html.ns-cursor-on .ns-cursor-dot.mode-aim::before,
html.ns-cursor-on .ns-cursor-dot.mode-aim::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: color-mix(in srgb, var(--ns-cursor-color, #1a1816) 58%, transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

html.ns-cursor-on .ns-cursor-dot.mode-aim::before {
  width: 1px;
  height: 26px;
}

html.ns-cursor-on .ns-cursor-dot.mode-aim::after {
  width: 26px;
  height: 1px;
}

html.ns-cursor-on .ns-cursor-dot.mode-aim.shape-ring {
  border-radius: 50%;
}

html.ns-cursor-on .ns-cursor-dot.mode-aim.is-idle {
  opacity: 0;
}

.ns-cursor-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none !important;
  z-index: 2147483646;
}

.ns-cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--ns-cursor-size, 6px);
  height: var(--ns-cursor-size, 6px);
  margin-left: calc(var(--ns-cursor-size, 6px) / -2);
  margin-top: calc(var(--ns-cursor-size, 6px) / -2);
  background: var(--ns-cursor-color, #1a1816);
  border: 0 solid color-mix(in srgb, var(--ns-cursor-color, #1a1816) 42%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 transparent;
  transform: translate3d(-100px, -100px, 0);
  pointer-events: none !important;
  will-change: transform;
  opacity: 0;
  transition:
    opacity 0.18s ease,
    width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    margin 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    border-width 0.28s ease,
    box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.ns-cursor-dot.mode-pointer {
  width: var(--ns-cursor-size-pointer, 16px);
  height: var(--ns-cursor-size-pointer, 16px);
  margin-left: calc(var(--ns-cursor-size-pointer, 16px) / -2);
  margin-top: calc(var(--ns-cursor-size-pointer, 16px) / -2);
  background: rgba(26, 24, 22, 0.68);
  background: color-mix(in srgb, var(--ns-cursor-color, #1a1816) 68%, transparent);
  border-width: 0;
  box-shadow: 0 0 0 5px rgba(26, 24, 22, 0.08);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ns-cursor-color, #1a1816) 8%, transparent);
  box-sizing: border-box;
}

html.ns-cursor-on .ns-cursor-dot.is-visible {
  opacity: 1;
}

html.ns-cursor-on .ns-cursor-dot.is-idle {
  opacity: 0;
}

.ns-cursor-dot.shape-ring:not(.mode-pointer) {
  background: transparent;
  border-width: 1.5px;
  border-color: var(--ns-cursor-color, #1a1816);
  box-sizing: border-box;
}

.ns-cursor-dot.shape-ring.mode-pointer {
  background: color-mix(in srgb, var(--ns-cursor-color, #1a1816) 10%, transparent);
  border-width: 1px;
  border-color: color-mix(in srgb, var(--ns-cursor-color, #1a1816) 46%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ns-cursor-color, #1a1816) 6%, transparent);
}

.ns-cursor-dot.shape-square {
  border-radius: 2px;
}

.ns-cursor-dot.shape-diamond {
  border-radius: 1px;
}

.ns-cursor-signal {
  position: fixed;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border: 1px solid color-mix(in srgb, var(--ns-cursor-color, #1a1816) 40%, transparent);
  border-radius: 50%;
  pointer-events: none !important;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(0.35);
}

.ns-cursor-signal.is-active {
  animation: ns-cursor-signal 0.72s ease-out forwards;
}

@keyframes ns-cursor-signal {
  0% {
    opacity: 0.95;
    transform: translate3d(var(--ns-cursor-x), var(--ns-cursor-y), 0) scale(0.35);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--ns-cursor-x), var(--ns-cursor-y), 0) scale(3.2);
  }
}

@media (hover: none), (pointer: coarse) {
  html.ns-cursor-on,
  html.ns-cursor-on * {
    cursor: auto !important;
  }
  .ns-cursor-layer {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ns-cursor-dot {
    transition: none;
  }
  .ns-cursor-signal.is-active {
    animation: none;
    opacity: 0.85;
    transform: translate3d(var(--ns-cursor-x), var(--ns-cursor-y), 0) scale(1.6);
  }
}
