/* ============================================================
   tv-infotip.css — the shared "what does this mean?" info icon
   used beside plan-card bullets on /Pricing, /Get-Listed and the
   claim landing. Emitted by TownVue.Web.Helpers.InfoTip and driven
   by wwwroot/js/shared/tv-infotip.js.

   Two pieces:
     .tv-tip         the small circled "i" button, inline in the bullet
     .tv-tip-bubble  ONE floating bubble, created by the script and
                     appended to <body>

   The bubble lives on <body> on purpose. The hero snapshot card on
   /Pricing sets overflow:hidden, and the .reveal scroll animation puts
   a transform on section wrappers, either of which would clip or
   re-anchor a bubble positioned inside the card. Body-level plus
   position:fixed sidesteps both, and the script clamps the bubble
   inside the viewport so it can never push the page sideways.

   Colors are literal hex, not var(--navy) and friends: those tokens
   are scoped to .state-immersive, and the bubble sits outside it.
   ============================================================ */

/* ── The icon ──────────────────────────────────────────────── */
.tv-tip {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 16px;
    height: 16px;
    padding: 0;
    /* Left 2px: the views glue the icon to the bullet with a non-breaking space,
       which supplies most of the gap.
       Right -15px: a <button> is an atomic inline, and Chrome will break the
       line before one no matter what precedes it, which strands the icon alone
       at the start of the next line whenever the bullet text fills its column.
       Zeroing out the width it charges the line stops that: the icon rides in
       the trailing space and, at worst, sits inside the card's own padding.
       Verified against every bullet on /Pricing and /Get-Listed: nothing crosses
       a card edge and nothing scrolls sideways. */
    margin: 0 -15px 0 2px;
    vertical-align: -2px;
    background: none;
    border: 0;
    border-radius: 50%;
    line-height: 0;
    /* Quiet on purpose: clearly secondary to the feature name beside it. */
    color: rgba(11, 45, 57, .38);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
}

.tv-tip svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}

.tv-tip:hover,
.tv-tip:focus-visible,
.tv-tip.is-on {
    color: #B25C3B; /* clay-700 */
}

.tv-tip:focus-visible {
    outline: 2px solid #F4B400; /* brand yellow */
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .tv-tip {
        transition: none;
    }
}

/* ── The bubble ────────────────────────────────────────────── */
.tv-tip-bubble {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    box-sizing: border-box;
    /* Never wider than the viewport minus both gutters, so a narrow phone
       gets a readable bubble and no horizontal scroll. */
    width: max-content;
    max-width: min(300px, calc(100vw - 24px));
    padding: 10px 13px;
    background: #0B2D39; /* navy */
    color: #F5F2E7; /* beige */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(11, 45, 57, .3);
    font-family: 'Hanken Grotesk', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    /* Decorative duplicate of the button's aria-label, and never interactive:
       pointer-events:none keeps it from swallowing clicks on what is under it. */
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(3px);
    transition: opacity .13s ease, transform .13s ease, visibility .13s;
}

.tv-tip-bubble.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.tv-tip-bubble .tv-tip-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #0B2D39;
    transform: rotate(45deg);
}

.tv-tip-bubble[data-place="top"] .tv-tip-arrow {
    bottom: -4px;
}

.tv-tip-bubble[data-place="bottom"] .tv-tip-arrow {
    top: -4px;
}

@media (prefers-reduced-motion: reduce) {
    .tv-tip-bubble {
        transform: none;
        transition: none;
    }
}
