/* ==========================================================================
   Price info tooltip ("i" next to prices in pricing cards).
   Markup comes from partials/info-tip.html (rendered by scripts/build-info-tips.mjs).
   Without JS the tooltip shows on :hover / :focus-visible. /assets/js/info-tip.js
   adds .rn-info-ready to <html> and then controls it via .is-open (tap, hover,
   keyboard, Esc, outside tap, edge clamping).
   ========================================================================== */

.rn-info {
  /* 18px icon, 44 x 44px hit area; negative margins keep the layout at icon size */
  position: relative; flex-shrink: 0; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -13px; padding: 0; /* visible gap to the price = the row's 6px gap */
  background: none; border: 0; border-radius: 50%; cursor: pointer;
  color: #475467; font: inherit; line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.rn-info svg { width: 18px; height: 18px; display: block; pointer-events: none; }
.rn-info:hover, .rn-info:focus-visible, .rn-info.is-open { color: #0A789F; }
.rn-info:focus { outline: none; }
.rn-info:focus-visible svg { outline: 3px solid #1ABEF5; outline-offset: 2px; border-radius: 50%; }

.rn-info-tip {
  --rn-info-shift: 0px;
  position: absolute; z-index: 50; left: 50%; bottom: calc(100% - 4px);
  width: max-content; max-width: min(260px, calc(100vw - 16px));
  padding: 10px 12px; border-radius: 10px;
  background: #0B1220; color: #fff;
  font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: 0; text-align: left; text-transform: none; white-space: normal;
  box-shadow: 0 8px 24px rgba(11,18,32,0.18);
  pointer-events: none; opacity: 0; visibility: hidden;
  transform: translate(calc(-50% + var(--rn-info-shift)), 4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}
/* small arrow pointing at the icon (stays on the icon when the box is shifted) */
.rn-info-tip::after {
  content: ''; position: absolute; top: 100%; left: calc(50% - var(--rn-info-shift));
  margin-left: -6px; border: 6px solid transparent; border-top-color: #0B1220;
}
.rn-info-tip.is-below { bottom: auto; top: calc(100% - 4px); transform: translate(calc(-50% + var(--rn-info-shift)), -4px); }
.rn-info-tip.is-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #0B1220; }

/* No JS: CSS-only hover / keyboard focus */
html:not(.rn-info-ready) .rn-info:hover .rn-info-tip,
html:not(.rn-info-ready) .rn-info:focus-visible .rn-info-tip,
/* With JS: only the open one */
.rn-info.is-open .rn-info-tip {
  opacity: 1; visibility: visible;
  transform: translate(calc(-50% + var(--rn-info-shift)), 0);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s;
}

/* Reduced motion: fade only, no movement */
@media (prefers-reduced-motion: reduce) {
  .rn-info-tip { transform: translate(calc(-50% + var(--rn-info-shift)), 0); transition: opacity 150ms ease, visibility 0s linear 150ms; }
  .rn-info-tip.is-below { transform: translate(calc(-50% + var(--rn-info-shift)), 0); }
  html:not(.rn-info-ready) .rn-info:hover .rn-info-tip,
  html:not(.rn-info-ready) .rn-info:focus-visible .rn-info-tip,
  .rn-info.is-open .rn-info-tip { transition: opacity 150ms ease, visibility 0s; }
}

/* Stacked price layouts: keeps the icon on the amount line */
.rn-info-inline { display: inline-flex; align-items: center; gap: 6px; }
