/* ==========================================================================
   AUTHENTIC CANVA-STYLE POINTER CURSOR
   Minimalist, high-precision arrow pointer (No floating labels)
   Exclusively active on desktop pointers (pointer: fine & hover: hover)
   ========================================================================== */

@media (pointer: fine) and (hover: hover) {
    /* Hide native cursor across the document when custom cursor is active */
    html.canva-cursor-enabled,
    html.canva-cursor-enabled body,
    html.canva-cursor-enabled a,
    html.canva-cursor-enabled button,
    html.canva-cursor-enabled input,
    html.canva-cursor-enabled select,
    html.canva-cursor-enabled textarea,
    html.canva-cursor-enabled [role="button"],
    html.canva-cursor-enabled .topic-chip,
    html.canva-cursor-enabled .work-row-item,
    html.canva-cursor-enabled .featured-card {
        cursor: none !important;
    }

    /* Top-level Cursor Container */
    .canva-cursor-root {
        position: fixed;
        top: 0;
        left: 0;
        width: 0;
        height: 0;
        pointer-events: none;
        z-index: 100000;
        overflow: visible;
        will-change: transform;
        transition: opacity 0.15s ease;
    }

    .canva-cursor-hidden {
        opacity: 0 !important;
    }

    /* Canva Arrow Pointer - Tip anchored precisely to (0,0) of client mouse */
    .canva-cursor-arrow-wrap {
        position: absolute;
        top: -3px;
        left: -5.5px;
        width: 24px;
        height: 24px;
        transform-origin: 5.5px 3.2px;
        filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
        transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .canva-cursor-arrow {
        width: 22px;
        height: 22px;
        display: block;
    }

    /* Light theme: Sleek Black arrow with crisp White outline */
    .canva-cursor-arrow path {
        fill: #000000;
        stroke: #ffffff;
        stroke-width: 1.5;
        stroke-linejoin: round;
        transition: fill 0.2s ease, stroke 0.2s ease;
    }

    /* Dark theme: Sleek White arrow with crisp Black outline */
    [data-theme="dark"] .canva-cursor-arrow path {
        fill: #ffffff;
        stroke: #000000;
        stroke-width: 1.5;
    }

    /* Interactive Hover States */
    .canva-cursor-root.is-hovering .canva-cursor-arrow-wrap {
        transform: scale(1.18);
    }

    /* Click Active State (Snappy micro-dip & bounce) */
    .canva-cursor-root.is-clicked .canva-cursor-arrow-wrap {
        transform: scale(0.9) rotate(-4deg);
    }

    /* Canva Click Pulse Ripple - Centered directly at click coordinate */
    .canva-cursor-ripple {
        position: fixed;
        width: 28px;
        height: 28px;
        margin-top: -14px;
        margin-left: -14px;
        border: 2px solid rgba(0, 0, 0, 0.7);
        border-radius: 50%;
        pointer-events: none;
        z-index: 99998;
        animation: canvaRipple 0.42s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    }

    [data-theme="dark"] .canva-cursor-ripple {
        border-color: rgba(255, 255, 255, 0.85);
    }

    @keyframes canvaRipple {
        0% {
            opacity: 0.85;
            transform: scale(0.2);
        }
        100% {
            opacity: 0;
            transform: scale(2.2);
        }
    }
}

/* Zero overhead on mobile / touch devices */
@media (pointer: coarse), (hover: none) {
    .canva-cursor-root,
    .canva-cursor-ripple {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .canva-cursor-root,
    .canva-cursor-ripple {
        display: none !important;
    }
}
