/* SpectrumB shared cursor.
   The native cursor remains active until cursor.js adds .sb-cursor-ready. */
@media (hover: hover) and (pointer: fine) {
  html.sb-cursor-ready,
  html.sb-cursor-ready body,
  html.sb-cursor-ready body * {
    cursor: none !important;
  }
}

#cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease;
  pointer-events: none;
  z-index: 10010;
  opacity: 0;
}

#cursor.cursor-visible { opacity: 1; }

.cursor-ring,
.cursor-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  pointer-events: none;
}

.cursor-ring {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,213,185,.58);
  background: rgba(22,18,15,.1);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 18px rgba(224,90,1,.14);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
  transition:
    width 180ms ease,
    height 180ms ease,
    transform 140ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    border-radius 180ms ease;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--accent, #E05A01);
  box-shadow: 0 0 13px rgba(224,90,1,.9);
  transform: translate(-50%, -50%);
  transition:
    width 140ms ease,
    height 140ms ease,
    transform 120ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    border-radius 140ms ease;
}

#cursor::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(224,90,1,.8);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.55);
}

#cursor::after {
  content: attr(data-label);
  position: absolute;
  left: 37px;
  top: 50%;
  padding: 4px 7px;
  border-radius: 7px;
  color: #fff;
  background: rgba(16,12,10,.88);
  border: 1px solid rgba(255,213,185,.15);
  box-shadow: 0 8px 22px rgba(0,0,0,.32);
  font: 900 8px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .12em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(5px, -50%);
  transition: opacity 150ms ease, transform 180ms ease;
}

.cursor-hide { opacity: 0 !important; }

#cursor.cursor-interactive .cursor-ring {
  width: 34px;
  height: 34px;
  border-color: rgba(224,90,1,.78);
  background: rgba(224,90,1,.1);
  box-shadow: 0 0 26px rgba(224,90,1,.32);
}

#cursor.cursor-interactive .cursor-dot {
  transform: translate(-50%, -50%) scale(.62);
  background: #fff;
  box-shadow: 0 0 12px rgba(255,213,185,.9);
}

#cursor.cursor-interactive::after {
  opacity: 1;
  transform: translate(0, -50%);
}

#cursor.cursor-label-left::after {
  left: auto;
  right: 37px;
  transform: translate(-5px, -50%);
}

#cursor.cursor-label-left.cursor-interactive::after {
  transform: translate(0, -50%);
}

#cursor.cursor-drag .cursor-ring {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(224,90,1,.16);
}

#cursor.cursor-drag .cursor-dot {
  transform: translate(-50%, -50%) scale(1.2);
}

#cursor.cursor-text .cursor-ring {
  width: 14px;
  height: 28px;
  border-radius: 7px;
}

#cursor.cursor-text .cursor-dot {
  width: 2px;
  height: 14px;
  border-radius: 2px;
  transform: translate(-50%, -50%);
}

#cursor.cursor-pressed .cursor-ring {
  width: 22px;
  height: 22px;
  background: rgba(224,90,1,.34);
  border-color: #FFD5B9;
  box-shadow: 0 0 30px rgba(224,90,1,.65);
}

#cursor.cursor-pressed .cursor-dot {
  transform: translate(-50%, -50%) scale(1.45);
  background: #fff;
}

#cursor.cursor-click::before {
  animation: cursorClickPulse 440ms ease-out;
}

@keyframes cursorClickPulse {
  0% { opacity: .95; transform: translate(-50%, -50%) scale(.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.75); }
}

@media (hover: none) and (pointer: coarse) {
  #cursor { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #cursor,
  #cursor *,
  #cursor::before,
  #cursor::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
