/* ================================================================
   GREENLAND VILLA ELLA — PREMIUM CUSTOM CURSOR
   Small glowing green circle that expands on hover
================================================================ */

/* Hide default cursor site-wide (re-enabled in WP Admin via body.wp-admin rule in style.css) */
*, *::before, *::after {
  cursor: none !important;
}

/* ── Cursor Root Element ── */
.gve-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor, 9999);
  mix-blend-mode: normal;
  will-change: transform;
}

/* ── Small Dot ── */
.gve-cursor__dot {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: var(--gve-green, #6E9152);
  border-radius: 50%;
  transform: translate(0, 0);
  transition: transform 0.05s linear,
              width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
}

/* ── Glowing Ring ── */
.gve-cursor__ring {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(110, 145, 82, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(110, 145, 82, 0.25);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              opacity 0.25s ease;
}

/* ── Hover States (applied via JS data attributes on body) ── */

/* Over links */
body[data-cursor="link"] .gve-cursor__ring {
  width: 56px;
  height: 56px;
  top: -28px;
  left: -28px;
  border-color: rgba(110, 145, 82, 0.8);
  box-shadow: 0 0 20px rgba(110, 145, 82, 0.3);
}
body[data-cursor="link"] .gve-cursor__dot {
  width: 6px;
  height: 6px;
  opacity: 0.6;
}

/* Over buttons — magnetic expand with green fill */
body[data-cursor="button"] .gve-cursor__ring {
  width: 64px;
  height: 64px;
  top: -32px;
  left: -32px;
  border-color: var(--gve-green, #6E9152);
  border-width: 2px;
  box-shadow: 0 0 28px rgba(110, 145, 82, 0.4),
              0 0 8px rgba(110, 145, 82, 0.2);
  background: rgba(110, 145, 82, 0.06);
}
body[data-cursor="button"] .gve-cursor__dot {
  width: 10px;
  height: 10px;
  background: var(--gve-forest, #2E4B2E);
}

/* Over images */
body[data-cursor="image"] .gve-cursor__ring {
  width: 70px;
  height: 70px;
  top: -35px;
  left: -35px;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(110, 145, 82, 0.3);
}
body[data-cursor="image"] .gve-cursor__dot {
  background: white;
}

/* Over inputs / textareas */
body[data-cursor="text"] .gve-cursor__dot {
  width: 2px;
  height: 20px;
  border-radius: 2px;
  top: -10px;
  left: -1px;
  background: var(--gve-green, #6E9152);
  animation: gve-cursor-blink 1s step-end infinite;
}
body[data-cursor="text"] .gve-cursor__ring {
  opacity: 0;
}

@keyframes gve-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Hidden when mouse leaves window */
body[data-cursor="hidden"] .gve-cursor__dot,
body[data-cursor="hidden"] .gve-cursor__ring {
  opacity: 0;
}

/* ── Touch devices — hide custom cursor ── */
@media (hover: none) or (pointer: coarse) {
  .gve-cursor { display: none; }
  *, *::before, *::after { cursor: auto !important; }
}

/* ── WP Admin — restore normal cursor ── */
body.wp-admin .gve-cursor { display: none; }
body.wp-admin *, body.wp-admin *::before, body.wp-admin *::after {
  cursor: auto !important;
}
