/* Shared Custom Cursor Styles */
:root {
  --champagne-cursor: #e6c98c;
  --gold-soft-cursor: rgba(201, 162, 39, 0.45);
  --ease-lux-cursor: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Cursor Elements - Maximum Z-Index */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483647; /* Maximum browser z-index to stay above overlays */
  pointer-events: none !important;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-lux-cursor);
  will-change: transform, left, top, opacity;
}

#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--champagne-cursor);
  box-shadow: 0 0 10px rgba(230, 201, 140, 0.9), 0 0 4px #ffffff;
  transition: opacity 0.3s var(--ease-lux-cursor), width 0.25s ease, height 0.25s ease, background-color 0.25s ease;
}

#cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--gold-soft-cursor);
  box-shadow: 0 0 15px rgba(201, 162, 39, 0.25);
  transition: opacity 0.3s var(--ease-lux-cursor), border-color 0.3s var(--ease-lux-cursor), width 0.3s var(--ease-lux-cursor), height 0.3s var(--ease-lux-cursor), background-color 0.3s ease;
}

body.cursor-hover #cursor-ring {
  width: 52px;
  height: 52px;
  border-color: var(--champagne-cursor);
  background: rgba(230, 201, 140, 0.12);
  box-shadow: 0 0 25px rgba(230, 201, 140, 0.4);
}

body.cursor-hover #cursor-dot {
  width: 4px;
  height: 4px;
  background: #ffffff;
}

body.cursor-down #cursor-ring {
  width: 24px;
  height: 24px;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

#cursor-canvas {
  position: fixed;
  inset: 0;
  z-index: 2147483646; /* Just below dot & ring */
  pointer-events: none !important;
  opacity: 0;
  transition: opacity 0.3s var(--ease-lux-cursor);
}

/* Hide default cursor when custom cursor is active on desktop fine pointer devices */
body.custom-cursor-active,
body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active select,
body.custom-cursor-active input,
body.custom-cursor-active textarea,
body.custom-cursor-active [data-hover] {
  cursor: none !important;
}

/* On pure touch screens or when custom cursor is inactive, ensure native cursor works */
@media (hover: none), (pointer: coarse) {
  #cursor-dot, #cursor-ring, #cursor-canvas {
    display: none !important;
  }
  body, a, button, select, input, textarea, [data-hover] {
    cursor: auto !important;
  }
}

