/* =============================================================
   CR#4 – Document Description Tooltip
   Target: /documents/ page
   Behavior: Description text is hidden; shown as hover tooltip
             on the document heading link.
   ============================================================= */

/* Visual hint on the link that a tooltip is available */
.cbpr-doc-has-tooltip {
    cursor: help;
    text-decoration-style: dotted !important;
}

/* ── Tooltip bubble (injected into <body> once via JS) ──────── */
.cbpr-tooltip-bubble {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    background-color: #23395e;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    word-wrap: break-word;
}

.cbpr-tooltip-bubble.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Arrow – pointing DOWN when bubble is ABOVE the link */
.cbpr-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;       /* below the bubble */
    left: 16px;
    border: 7px solid transparent;
    border-top-color: #23395e;
}

/* Arrow – pointing UP when bubble is BELOW the link */
.cbpr-tooltip-bubble.is-below::after {
    top: auto;
    bottom: 100%;    /* above the bubble */
    border-top-color: transparent;
    border-bottom-color: #23395e;
}
