/* ---------------------------------------------------------------------------
   WM custom cursor — shared by the public site and the admin console.

   Moved out of style.css so the system side can load the cursor without
   pulling in the entire marketing stylesheet. style.css no longer defines
   these classes; this file is the single source of truth for them.

   Behaviour: a precise dot at the pointer plus a ring that eases in behind it.
   The ring is the state indicator — it swells over anything actionable,
   contracts on press, and collapses into a caret bar over text so you can
   still see where the insertion point will land.

   The native arrow is only hidden once wm-cursor.js has confirmed a fine
   pointer and appended the elements (it adds .wm-has-cursor). If the script
   fails or never runs, the browser cursor is left completely alone.
--------------------------------------------------------------------------- */

html.wm-has-cursor, html.wm-has-cursor * { cursor: none !important; }

/* The pointer must sit above every other layer, including modal dialogs.
   The native arrow is hidden while this is active, so anything painted over
   the dot and ring leaves the user with no cursor at all — which is exactly
   what happened when the confirm dialog was given a higher z-index. */
.wm-cursor-dot {
  position: fixed; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: #f3d27d; box-shadow: 0 0 10px rgba(242,200,107,.85);
  pointer-events: none; z-index: 2147483600; will-change: transform;
  transition: width .18s ease, height .18s ease, opacity .25s ease;
}
.wm-cursor-ring {
  position: fixed; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1.6px solid rgba(242,200,107,.6);
  pointer-events: none; z-index: 2147483599; will-change: transform;
  transition: width .22s ease, height .22s ease, background .22s ease, border-color .22s ease, border-radius .22s ease, opacity .28s ease;
}
.wm-cursor-ring.is-hot  { width: 54px; height: 54px; background: rgba(242,200,107,.12); border-color: rgba(243,210,125,.9); }
.wm-cursor-ring.is-down { width: 26px; height: 26px; border-color: rgba(243,210,125,1); }
.wm-cursor-dot.is-down  { width: 12px; height: 12px; }
.wm-cursor-ring.is-text { width: 3px; height: 26px; border-radius: 2px; background: rgba(243,210,125,.85); border-color: transparent; }
.wm-cursor-hidden { opacity: 0 !important; }

/* Console-only tuning. The admin shell is denser than the marketing pages, so
   a 54px hot ring would swallow a toolbar button whole; it is pulled in, and
   the honeycomb cells get a wider ring because the targets there are large. */
.wm-admin .wm-cursor-ring.is-hot { width: 44px; height: 44px; }
.wm-admin .wm-cursor-ring.is-hex { width: 68px; height: 68px; border-color: rgba(243,210,125,.75); background: rgba(242,200,107,.08); }

@media (prefers-reduced-motion: reduce) {
  .wm-cursor-dot, .wm-cursor-ring { display: none !important; }
  html.wm-has-cursor, html.wm-has-cursor * { cursor: auto !important; }
}

/* Touch devices never get it. The script already guards this, but a cached
   stylesheet must not leave a touch user staring at a hidden cursor. */
@media (pointer: coarse) {
  .wm-cursor-dot, .wm-cursor-ring { display: none !important; }
  html.wm-has-cursor, html.wm-has-cursor * { cursor: auto !important; }
}
