/* Sidebar rail/pane tooltip, drawn by js/navTooltip.js and appended to <body>
   (position: fixed escapes the pane's scroll clipping). Styled after InfoTooltip:
   a dark card, bold label, muted one-line description. Dark in both themes; in the
   dark theme it lifts to a lighter slate with a hairline border so it still separates
   from the near-black page behind it. Transitions use the --transition-* tokens,
   which tokens.css zeroes for prefers-reduced-motion. */

.ht-nav-tip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-nav-dropdown);
    max-width: 280px;
    width: max-content;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.ht-nav-tip.is-visible {
    opacity: 1;
    visibility: visible;
}

.ht-nav-tip-label {
    display: block;
    font-weight: 600;
}

.ht-nav-tip-desc {
    display: block;
    margin-top: 0.125rem;
    color: rgba(226, 232, 240, 0.8);
}

.ht-nav-tip-arrow {
    position: absolute;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    background: inherit;
    border: inherit;
    transform: rotate(45deg);
}

.ht-nav-tip[data-side="right"] .ht-nav-tip-arrow {
    left: -5px;
    border-top-color: transparent;
    border-right-color: transparent;
}

.ht-nav-tip[data-side="left"] .ht-nav-tip-arrow {
    right: -5px;
    border-bottom-color: transparent;
    border-left-color: transparent;
}

[data-theme="dark"] .ht-nav-tip {
    background: #232b38;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* Touch-only devices and phone widths never get it (navTooltip.js bails too). */
@media (hover: none) and (any-hover: none), (max-width: 640px) {
    .ht-nav-tip {
        display: none !important;
    }
}
