/* analyzer69000 custom tooltip system
   ──────────────────────────────────────────────────────────────────────
   Replaces the browser-native title popup with a styled card. Drop the
   stylesheet on any page (already loaded site-wide via /js/tooltip.js
   bootstrap) and every `[title]` element gets the upgraded look —
   no markup changes required.

   Behavior:
     · Title is intercepted on hover/focus, then the native title is
       moved to data-_a69-tip-text so the browser's own popup doesn't
       fire concurrently.
     · The tooltip floats above the target, follows the cursor only on
       initial show (avoids jitter on movement).
     · Auto-flips above/below based on viewport space.
     · Works for keyboard focus too (Tab → tooltip shows on focus).
*/
.a69-tip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  max-width: 320px;
  padding: 7px 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: #e2e8f0;
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.5),
    0 8px 24px -8px rgba(0,0,0,0.85),
    0 2px 6px -2px rgba(0,0,0,0.55);
  opacity: 0;
  transform: translateY(2px) scale(0.98);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
  white-space: pre-line;
  text-align: left;
  word-wrap: break-word;
}
.a69-tip.shown {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Subtle accent rail on the left edge — pulls in the analyzer69000 brand
   without adding visual noise. */
.a69-tip::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, #ef4444 0%, #f97316 50%, #3b82f6 100%);
  border-radius: 1px 0 0 1px;
}
.a69-tip strong {
  color: #fff;
  font-weight: 800;
}
.a69-tip code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  color: #fbbf24;
}
/* Arrow pointing at the target. Hidden when the tooltip flips above/below
   so it never points the wrong direction. */
.a69-tip-arrow {
  position: absolute;
  width: 8px; height: 8px;
  background: #0b1220;
  border-left: 1px solid rgba(255,255,255,0.10);
  border-top: 1px solid rgba(255,255,255,0.10);
  transform: rotate(45deg);
}
.a69-tip[data-pos="top"] .a69-tip-arrow {
  bottom: -5px; left: 50%; margin-left: -4px;
  transform: rotate(225deg);
  border-left: 1px solid rgba(255,255,255,0.10);
  border-top: 1px solid rgba(255,255,255,0.10);
}
.a69-tip[data-pos="bottom"] .a69-tip-arrow {
  top: -5px; left: 50%; margin-left: -4px;
}
/* Reduced motion — respect users who've opted out. */
@media (prefers-reduced-motion: reduce) {
  .a69-tip { transition: opacity 0ms; }
}
