/* PCM cursor spinner — "Fox in ring" variant.
   Engine in /scripts/core/pcm-cursor-spinner.js exposes window.PCMSpinner.
   Use PCMSpinner.during(promise) around long-running ops, or
   PCMSpinner.show() / .hide() for explicit control.

   Tan / sepia tint matches the brand fox glyph; tweak the
   --pcm-spinner-* vars if a future palette change wants different colors.
*/
:root {
    --pcm-spinner-ring:        #b29766;
    --pcm-spinner-ring-track:  rgba(178, 151, 102, 0.25);
}

.pcm-cursor-spin {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(14px, 14px);   /* offset from cursor tip */
    width: 32px;
    height: 32px;
    opacity: 0;
    transition: opacity 120ms ease-out;
    will-change: transform;
}

.pcm-cursor-spin.is-on { opacity: 1; }

.pcm-cursor-spin .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--pcm-spinner-ring-track);
    border-top-color: var(--pcm-spinner-ring);
    animation: pcm-spin 0.85s linear infinite;
}

.pcm-cursor-spin img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(72%) sepia(28%) saturate(420%)
            hue-rotate(2deg) brightness(92%) contrast(86%);
    animation: pcm-pulse 1.4s ease-in-out infinite;
}

@keyframes pcm-spin  { to { transform: rotate(360deg); } }
@keyframes pcm-pulse {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}

/* Native cursor turns into "wait" (pure hourglass — matches VB6 vbHourglass)
   while a spinner is active. `progress` would render an arrow + spinning
   donut on Windows; `wait` is the pure hourglass / spinning circle. */
body.is-busy,
body.is-busy * { cursor: wait !important; }
