/* ── Hide native cursor when custom cursor is active ─────────────────────── */
.glidy-cursor-active,
.glidy-cursor-active * {
  cursor: none !important;
}

/* ── Show pointer on links/buttons and ALL their descendants ─────────────── */
.glidy-cursor-active .cursor-pointer,
.glidy-cursor-active .cursor-pointer *,
.glidy-cursor-active a,
.glidy-cursor-active a *,
.glidy-cursor-active button,
.glidy-cursor-active button *,
.glidy-cursor-active [role="button"],
.glidy-cursor-active [role="button"] *,
.glidy-cursor-active [data-cursor-hover],
.glidy-cursor-active [data-cursor-hover] * {
  cursor: pointer !important;
}

/* ── Dot — snaps instantly to pointer position ───────────────────────────── */
.glidy-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background-color: #000;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000001;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
  opacity: 0;
}

/* ── Ring — lags behind the dot ─────────────────────────────────────────── */
.glidy-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #000;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000000;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, border-radius 0.25s ease;
  opacity: 0;
}

/* ── Shape variants ──────────────────────────────────────────────────────── */
.glidy-cursor-shape-square .glidy-cursor-dot,
.glidy-cursor-shape-square .glidy-cursor-ring {
  border-radius: 2px;
}

.glidy-cursor-shape-diamond .glidy-cursor-dot,
.glidy-cursor-shape-diamond .glidy-cursor-ring {
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ── Hover state — ring expands, dot shrinks ─────────────────────────────── */
.glidy-cursor-active.glidy-cursor-hovering .glidy-cursor-ring {
  width: calc(var(--glidy-cursor-ring-size, 36px) * 1.6);
  height: calc(var(--glidy-cursor-ring-size, 36px) * 1.6);
  opacity: 0.5;
}

.glidy-cursor-active.glidy-cursor-hovering .glidy-cursor-dot {
  width: calc(var(--glidy-cursor-dot-size, 10px) * 0.4);
  height: calc(var(--glidy-cursor-dot-size, 10px) * 0.4);
}

/* ── Click state ─────────────────────────────────────────────────────────── */
.glidy-cursor-active.glidy-cursor-clicking .glidy-cursor-dot {
  transform: translate(-50%, -50%) scale(0.6);
}

.glidy-cursor-active.glidy-cursor-clicking .glidy-cursor-ring {
  transform: translate(-50%, -50%) scale(0.85);
}

.glidy-cursor-shape-diamond.glidy-cursor-active.glidy-cursor-clicking .glidy-cursor-dot,
.glidy-cursor-shape-diamond.glidy-cursor-active.glidy-cursor-clicking .glidy-cursor-ring {
  transform: translate(-50%, -50%) rotate(45deg) scale(0.85);
}