/* Heartbeat Cursor Trail - CSP Compliant */
/* Unique ECG-themed mouse cursor for Health Monitor */

.vital-cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999;
    overflow: hidden;
}

.vital-cursor-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Custom heartbeat cursor */
.vital-cursor {
    position: fixed;
    display: block !important;
    width: 48px;
    height: 48px;
    pointer-events: none;
    z-index: 9999999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
    will-change: left, top;
}

.vital-cursor.active {
    opacity: 1 !important;
}

/* Cursor core - pulse dot */
.vital-cursor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #00e5ff 0%, #00e676 60%, #00bfa5 100%);
    border-radius: 50%;
    box-shadow:
        0 0 8px rgba(0, 229, 255, 1),
        0 0 20px rgba(0, 230, 118, 0.7),
        0 0 35px rgba(0, 229, 255, 0.4);
    animation: vitalPulse 1.2s ease-in-out infinite;
}

@keyframes vitalPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 8px rgba(0, 229, 255, 1),
            0 0 20px rgba(0, 230, 118, 0.7);
    }
    25% {
        transform: translate(-50%, -50%) scale(1.6);
        box-shadow:
            0 0 12px rgba(0, 229, 255, 1),
            0 0 30px rgba(0, 230, 118, 1),
            0 0 45px rgba(0, 229, 255, 0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.8);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow:
            0 0 10px rgba(0, 229, 255, 0.8),
            0 0 25px rgba(0, 230, 118, 0.5);
    }
}

/* Crosshair ring */
.vital-cursor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(0, 229, 255, 0.6);
    border-radius: 50%;
    animation: vitalRingSpin 6s linear infinite;
    box-shadow:
        0 0 6px rgba(0, 229, 255, 0.4),
        inset 0 0 6px rgba(0, 230, 118, 0.15);
}

/* Crosshair ticks on the ring */
.vital-cursor-ring::before,
.vital-cursor-ring::after {
    content: '';
    position: absolute;
    background: #00e5ff;
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.8);
}

.vital-cursor-ring::before {
    top: -2px;
    left: 50%;
    width: 1.5px;
    height: 8px;
    transform: translateX(-50%);
}

.vital-cursor-ring::after {
    bottom: -2px;
    left: 50%;
    width: 1.5px;
    height: 8px;
    transform: translateX(-50%);
}

@keyframes vitalRingSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Heartbeat pulse wave */
.vital-cursor-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 50%;
    animation: vitalWavePulse 1.2s ease-out infinite;
}

@keyframes vitalWavePulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

/* Hide default cursor */
body.vital-cursor-active {
    cursor: none !important;
}

body.vital-cursor-active * {
    cursor: none !important;
}

body.vital-cursor-active a,
body.vital-cursor-active button,
body.vital-cursor-active input,
body.vital-cursor-active textarea,
body.vital-cursor-active select,
body.vital-cursor-active [role="button"],
body.vital-cursor-active .hm-section-header,
body.vital-cursor-active .hm-btn,
body.vital-cursor-active .footer-link,
body.vital-cursor-active .logo-link {
    cursor: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .vital-cursor-core,
    .vital-cursor-ring,
    .vital-cursor-wave {
        animation: none;
    }

    body.vital-cursor-active {
        cursor: auto;
    }

    body.vital-cursor-active * {
        cursor: auto;
    }

    .vital-cursor {
        display: none;
    }
}

/* Mobile - disable custom cursor */
@media (max-width: 768px), (pointer: coarse) {
    .vital-cursor-container {
        display: none;
    }

    .vital-cursor {
        display: none;
    }

    body.vital-cursor-active,
    body.vital-cursor-active * {
        cursor: auto;
    }
}
