/* /upstream-bugs/ cursor: a scope probe on the wire (js/upstream-cursor.js).
 *
 * The probe tip is the page's rose; the trace behind it is the amber of a
 * report waiting on a fix; over a link or control the probe triggers and turns
 * the teal of a fixed report.
 */

/* Nothing applies until the script sets .ub-cursor-on: if it fails to load,
 * the native pointer stays rather than vanishing with no replacement. */
.ub-cursor-on,
.ub-cursor-on a,
.ub-cursor-on button,
.ub-cursor-on summary,
.ub-cursor-on code,
.ub-cursor-on input,
.ub-cursor-on select,
.ub-cursor-on textarea {
    cursor: none;
}

.ub-cursor-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.15s ease-out;
}
.ub-cursor-visible {
    opacity: 1;
}

.ub-cursor-trace {
    fill: none;
    stroke: rgba(245, 158, 11, 0.55);
    stroke-width: 1.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.ub-cursor-ring {
    fill: rgba(7, 9, 15, 0.45);
    stroke: #fb7185;
    stroke-width: 1.6;
    transition:
        stroke 0.12s ease-out,
        fill 0.12s ease-out;
}
.ub-cursor-tick {
    stroke: #fb7185;
    stroke-width: 1.4;
    stroke-linecap: round;
    transition: stroke 0.12s ease-out;
}
.ub-cursor-core {
    fill: #fda4af;
}
.ub-cursor-head {
    filter: drop-shadow(0 0 4px rgba(251, 113, 133, 0.55));
}

/* Triggered: over something to click, the probe locks on */
.ub-cursor-triggered .ub-cursor-ring {
    fill: rgba(45, 212, 191, 0.28);
    stroke: #2dd4bf;
}
.ub-cursor-triggered .ub-cursor-tick {
    stroke: #2dd4bf;
}
.ub-cursor-triggered .ub-cursor-core {
    fill: #f1f5f9;
}
.ub-cursor-triggered {
    filter: drop-shadow(0 0 7px rgba(45, 212, 191, 0.75));
}

/* A click: a ring goes out from the probe */
.ub-cursor-capture {
    fill: none;
    stroke: #2dd4bf;
    stroke-width: 1.4;
    transform-box: fill-box;
    transform-origin: center;
    animation: ub-capture 0.5s ease-out forwards;
}
@keyframes ub-capture {
    from {
        transform: scale(1);
        opacity: 0.9;
    }
    to {
        transform: scale(3.2);
        opacity: 0;
    }
}
