/* Ponteiro customizado Noctra (home pública + app autenticado). */

.n-cursor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10050;
}

.n-cursor-pointer {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    will-change: transform;
    width: 20px;
    height: 20px;
    contain: layout style;
    transition: opacity 0.2s ease;
}

.n-cursor-icon {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.n-cursor-icon--default {
    width: 15.64px;
    height: 20px;
    transform-origin: 1.06px 0.14px;
}

.n-cursor-icon--pointer {
    width: 15.64px;
    height: 20px;
    transform-origin: 6.51px 0px;
}

.n-cursor-pointer-fill {
    fill: #121826;
}

.n-cursor-pointer-stroke {
    fill: none;
    stroke: #7C5CFF;
    stroke-width: 1.15;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.n-cursor-trace-fill {
    fill: rgba(124, 92, 255, 0);
    stroke: none;
    vector-effect: non-scaling-stroke;
}

.n-cursor-trace-ghost {
    fill: none;
    stroke: rgba(124, 92, 255, 0.22);
    stroke-width: 1;
    stroke-dasharray: 2.5 2.2;
    vector-effect: non-scaling-stroke;
}

.n-cursor-trace-active {
    fill: none;
    stroke: #9B7CFF;
    stroke-width: 1.15;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    vector-effect: non-scaling-stroke;
}

.n-cursor.is-active .n-cursor-pointer {
    opacity: 1;
}

.n-cursor[data-variant="default"] .n-cursor-icon--default,
.n-cursor[data-variant="pointer"] .n-cursor-icon--pointer {
    opacity: 1;
}

.n-cursor[data-variant="pointer"] .n-cursor-pointer-stroke {
    stroke: #9B7CFF;
}

.has-custom-cursor[data-native-cursor] .n-cursor {
    visibility: hidden;
}

/*
 * Evitar `* { cursor: none }` (recalc caro no dashboard).
 * Root + controles comuns — herança cobre o resto sem seletor universal.
 * Inclui superfícies do Analytics (tabela clicável, canvas ECharts) que definem
 * cursor:pointer fora da lista de controles nativos.
 */
.noctra-custom-cursor.has-custom-cursor:not([data-native-cursor]),
.narrative-landing.has-custom-cursor:not([data-native-cursor]),
.noctra-custom-cursor.has-custom-cursor:not([data-native-cursor]) :is(
    a, button, .button, summary, label, select, textarea, input,
    [role="button"], [data-cursor], .cursor-pointer, .menu-item, .navbar-item,
    canvas, .analytics-row-clickable, .analytics-row-clickable td,
    .kpi-secondary-meta-key, .analytics-score-help
),
.narrative-landing.has-custom-cursor:not([data-native-cursor]) :is(
    a, button, .button, summary, label, select, textarea, input,
    [role="button"], [data-cursor], .cursor-pointer, canvas
) {
    cursor: none !important;
}

.noctra-custom-cursor.has-custom-cursor[data-native-cursor],
.narrative-landing.has-custom-cursor[data-native-cursor],
.noctra-custom-cursor.has-custom-cursor[data-native-cursor] :is(
    a, button, .button, summary, label, select, textarea, input,
    [role="button"], [data-cursor], .cursor-pointer, .menu-item, .navbar-item,
    canvas, .analytics-row-clickable, .analytics-row-clickable td,
    .kpi-secondary-meta-key, .analytics-score-help
),
.narrative-landing.has-custom-cursor[data-native-cursor] :is(
    a, button, .button, summary, label, select, textarea, input,
    [role="button"], [data-cursor], .cursor-pointer, canvas
) {
    cursor: var(--n-native-cursor, pointer) !important;
}

@media (prefers-reduced-motion: reduce) {
    .noctra-custom-cursor,
    .narrative-landing--custom-cursor,
    .narrative-landing.has-custom-cursor {
        cursor: auto;
    }

    .n-cursor {
        display: none;
    }
}

@media (max-width: 768px) {
    .noctra-custom-cursor,
    .narrative-landing--custom-cursor,
    .narrative-landing.has-custom-cursor {
        cursor: auto;
    }

    .n-cursor {
        display: none;
    }
}
