/* Generic hover/focus tooltip — ported from ~/rcs. Pair with tooltip.js (loaded globally in
   base.html — no per-page opt-in needed). Markup: add data-tip="text" to ANY element:

     <span class="info-tip" data-tip="Explanation text">i</span>

   tooltip.js listens globally for pointerover/focusin on any [data-tip] element, shows ONE
   shared floating element positioned above (or below, if that would clip off-screen) the
   hovered element, and shows it immediately — no native browser hover delay. This is the
   site's single tooltip implementation; don't add a second one (e.g. a title attribute, a
   per-component ::after) — extend this instead. */

.tooltip {
  position: fixed;
  z-index: 300;
  max-width: 230px;
  padding: 0.4rem 0.6rem;
  border-radius: 2px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.08s ease;
}

.tooltip--visible {
  opacity: 1;
  visibility: visible;
}

/* The "i" info-badge look. The tooltip display itself comes from tooltip.css/js above —
   this is just this one caller's icon styling, driven by the same data-tip attribute. */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 0.7em;
  font-weight: 700;
  font-style: italic;
  cursor: default;
  opacity: 0.45;
  user-select: none;
  vertical-align: middle;
  flex-shrink: 0;
}

.info-tip:hover,
.info-tip:focus-visible {
  opacity: 1;
  outline: none;
}
