/* Dica do painel no lugar da dica nativa do navegador (veja js/tooltips.js). */
.npd-tip {
    position: fixed;
    inset: auto;
    top: 0;
    left: 0;
    z-index: 2147483000;
    max-width: min(300px, calc(100vw - 16px));
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 1px solid color-mix(in srgb, var(--panel-text, #f4f4f0) 18%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--panel-surface, #151515) 91%, var(--panel-text, #f4f4f0));
    color: var(--panel-text, #f4f4f0);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .22);
    font-family: var(--panel-font, Inter, ui-sans-serif, system-ui, sans-serif);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .005em;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px) scale(.97);
    transform-origin: var(--tip-arrow, 50%) 100%;
    transition: opacity .13s ease, transform .13s ease;
}

.npd-tip:not([popover]):not(.is-visible) { visibility: hidden; }

.npd-tip > span {
    position: relative;
    display: block;
    padding: 7px 11px 7px 12px;
    overflow: hidden;
    border-radius: inherit;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Filete com a cor principal do painel. */
.npd-tip > span::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--yellow, #ffc107);
    content: "";
}

/* Setinha apontando para o elemento. */
.npd-tip::after {
    position: absolute;
    top: 100%;
    left: var(--tip-arrow, 50%);
    width: 9px;
    height: 9px;
    margin: -4px 0 0 -5px;
    border: inherit;
    border-width: 0 1px 1px 0;
    background: inherit;
    transform: rotate(45deg);
    content: "";
}

.npd-tip[data-side="bottom"] { transform: translateY(-4px) scale(.97); transform-origin: var(--tip-arrow, 50%) 0; }
.npd-tip[data-side="bottom"]::after { top: auto; bottom: 100%; margin: 0 0 -4px -5px; border-width: 1px 0 0 1px; }

.npd-tip.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .npd-tip { transition: none; }
}
