/* ═══════════════════════════════════════════════════════════════════════
   The AMX tooltip

   One chip, on <body>, moved into place by js/tools/amxTip.js. Anything with
   data-amx-tip="..." gets it on hover and on keyboard focus.

   It lives here rather than in a component's scoped CSS because the element is
   appended to the body and so carries none of the scoping attributes.

   Deliberately theme-independent, the same way the drag handle's chip is: a
   tooltip is a system affordance rather than part of the page, and a native
   one is dark in both themes. Keeping the two identical means the app has one
   tooltip, not two that nearly match.
   ═══════════════════════════════════════════════════════════════════════ */

#amx-tip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 20000;
    max-width: 280px;
    padding: 6px 9px;
    border-radius: 6px;
    background: #18181b;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);

    /* The chip never takes the pointer: it sits next to what it describes, so passing clicks and
       hover straight through it keeps it from getting between the user and the control. */
    pointer-events: none;

    /* Hidden by default and revealed by the script, so it is never seen at its 0,0 origin before
       it is placed - the same reason .amx-anchored-panel exists in app.css. */
    visibility: hidden;
    opacity: 0;
    transition: opacity 100ms ease;
}

#amx-tip.is-visible {
    visibility: visible;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #amx-tip {
        transition: none;
    }
}
