/* ==========================================================================
   Mouse follower — KNUST Libraries Help Desk
   Styles for the custom cursor injected by js/cursor-follower.js.
   Public pages only.
   ========================================================================== */

/* ═══════════════════════════════════════════════════════════════
   MOUSE FOLLOWER (custom cursor)
   Markup is injected by js/cursor-follower.js; loaded on public
   pages only. The ring lags behind the pointer, the dot is exact.
   ═══════════════════════════════════════════════════════════════ */
.cursor-follower-dot,
.cursor-follower-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}

.cursor-follower-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary, #005A2B);
}

.cursor-follower-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--primary, #005A2B);
  box-shadow: 0 0 14px rgba(0, 90, 43, 0.18);
}

.cursor-follower-dot.is-visible,
.cursor-follower-ring.is-visible {
  opacity: 1;
}

/* Hide the operating-system cursor while the follower is running.
   Form fields keep their native caret so typing feels normal. */
html.cursor-follower-active,
html.cursor-follower-active body,
html.cursor-follower-active body * {
  cursor: none !important;
}

html.cursor-follower-active input[type="text"],
html.cursor-follower-active input[type="search"],
html.cursor-follower-active input[type="email"],
html.cursor-follower-active input[type="password"],
html.cursor-follower-active input[type="number"],
html.cursor-follower-active input[type="tel"],
html.cursor-follower-active input[type="url"],
html.cursor-follower-active input[type="date"],
html.cursor-follower-active input[type="time"],
html.cursor-follower-active textarea,
html.cursor-follower-active select,
html.cursor-follower-active [contenteditable="true"] {
  cursor: auto !important;
}

/* Dark theme keeps the brand gold so the follower stays visible. */
body.dark-mode .cursor-follower-dot {
  background: #FDB813;
}

body.dark-mode .cursor-follower-ring {
  border-color: #FDB813;
  box-shadow: 0 0 14px rgba(253, 184, 19, 0.25);
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-follower-dot,
  .cursor-follower-ring {
    display: none !important;
  }
}
