/* hint.css — the house tooltip badge. Shared module: D:\MyProjects\SharedComponents\hint\
 * Never edit a project-local copy; edit HERE and re-sync (see README.md).
 * No dependencies. Dark bubble on both light and dark app themes (that is the house look).
 */

.hintbadge {
    position: fixed;
    z-index: 2147483000;            /* above modals, sidebars, 3D canvases */
    top: 0; left: 0;
    max-width: 320px;
    padding: 8px 11px 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: linear-gradient(180deg, #273244 0%, #161e2b 100%);
    color: #e2e8f0;
    font: 500 .78rem/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: .1px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 10px 28px rgba(2, 6, 23, .38), 0 2px 6px rgba(2, 6, 23, .28);
    pointer-events: none;           /* never steals the click it describes */
    opacity: 0;
    transform: translate3d(0, 4px, 0) scale(.97);
    transition: opacity .13s ease-out, transform .13s cubic-bezier(.2, .8, .3, 1);
    will-change: transform, opacity;
}
.hintbadge.hint-in { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }

/* ---- the accent rail: this is the "brand" part, coloured by kind ---- */
.hintbadge::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--hint-accent, #3b82f6);
    box-shadow: 0 0 10px var(--hint-glow, rgba(59, 130, 246, .55));
}

/* ---- arrow ---- */
.hintbadge .hint-arrow {
    position: absolute;
    width: 9px; height: 9px;
    background: #1b2434;
    border: 1px solid rgba(148, 163, 184, .22);
    transform: rotate(45deg);
}
.hintbadge[data-pos="top"]    .hint-arrow { bottom: -5.5px; border-top: 0;    border-left: 0;   background: #161e2b; }
.hintbadge[data-pos="bottom"] .hint-arrow { top: -5.5px;    border-bottom: 0; border-right: 0;  background: #273244; }
.hintbadge[data-pos="left"]   .hint-arrow { right: -5.5px;  border-bottom: 0; border-left: 0;   background: #1f2937; }
.hintbadge[data-pos="right"]  .hint-arrow { left: -5.5px;   border-top: 0;    border-right: 0;  background: #1f2937; }

/* ---- content ---- */
.hintbadge .hint-head {
    display: block;
    color: #f8fafc;
    font-weight: 650;
    font-size: .79rem;
    letter-spacing: .2px;
}
.hintbadge .hint-head + .hint-body { margin-top: 3px; }
.hintbadge .hint-body { display: block; color: #b7c2d0; font-weight: 450; font-size: .755rem; }
.hintbadge .hint-body + .hint-body { margin-top: 2px; }
.hintbadge code, .hintbadge kbd {
    font-family: ui-monospace, Menlo, Consolas, 'Courier New', monospace;
    font-size: .72rem;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(148, 163, 184, .16);
    border: 1px solid rgba(148, 163, 184, .18);
    color: #e8eef7;
    white-space: nowrap;
}
/* the kind chip — a tiny badge in front of the first line */
.hintbadge .hint-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 6px 0 0;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--hint-accent, #3b82f6);
    background: var(--hint-chip-bg, rgba(59, 130, 246, .14));
    border: 1px solid var(--hint-chip-bd, rgba(59, 130, 246, .32));
    vertical-align: 1px;
}

/* ---- kinds ---- */
.hintbadge[data-kind="info"]   { --hint-accent: #38bdf8; --hint-glow: rgba(56,189,248,.5);  --hint-chip-bg: rgba(56,189,248,.14);  --hint-chip-bd: rgba(56,189,248,.34); }
.hintbadge[data-kind="brand"]  { --hint-accent: #3b82f6; --hint-glow: rgba(59,130,246,.5);  --hint-chip-bg: rgba(59,130,246,.14);  --hint-chip-bd: rgba(59,130,246,.34); }
.hintbadge[data-kind="ok"]     { --hint-accent: #22c55e; --hint-glow: rgba(34,197,94,.45);  --hint-chip-bg: rgba(34,197,94,.14);   --hint-chip-bd: rgba(34,197,94,.34); }
.hintbadge[data-kind="warn"]   { --hint-accent: #f59e0b; --hint-glow: rgba(245,158,11,.45); --hint-chip-bg: rgba(245,158,11,.14);  --hint-chip-bd: rgba(245,158,11,.34); }
.hintbadge[data-kind="danger"] { --hint-accent: #ef4444; --hint-glow: rgba(239,68,68,.45);  --hint-chip-bg: rgba(239,68,68,.15);   --hint-chip-bd: rgba(239,68,68,.36); }
.hintbadge[data-kind="muted"]  { --hint-accent: #64748b; --hint-glow: rgba(100,116,139,.35);--hint-chip-bg: rgba(100,116,139,.16); --hint-chip-bd: rgba(100,116,139,.32); }

/* the element that owns the hint keeps a house cursor + a soft ring while shown */
[data-hint-active] { cursor: help; }
button[data-hint-active], a[data-hint-active], [role="button"][data-hint-active] { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    .hintbadge { transition: opacity .01s linear; transform: none; }
    .hintbadge.hint-in { transform: none; }
}

/* narrow phones: bubble spans the useful width, never the full screen */
@media (max-width: 480px) {
    .hintbadge { max-width: calc(100vw - 24px); font-size: .8rem; }
}
