/* Sitewide in-text internal links and hover preview card (inc/bd-link-preview.php).
   The script adds .bd-lp to in-text links only (not buttons, nav, cards, breadcrumbs, pills, header, footer). */

/* Owner 12 Oct: every in-text internal link uses the glossary chip look
   (soft coral wash, bold ink text, solid coral underline), coral fill on hover. */
html body a.bd-lp.bd-lp {
    color: inherit !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 1px 5px 2px !important;
    border: 0 !important;
    border-radius: 4px 4px 0 0 !important;
    background: rgba(255, 82, 71, .1) !important;
    box-shadow: inset 0 -2px 0 #ff5247 !important;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-color .15s ease, color .15s ease;
}

html body a.bd-lp.bd-lp:hover,
html body a.bd-lp.bd-lp:focus-visible {
    color: #fff !important;
    background: #ff5247 !important;
}

html body a.bd-lp.bd-lp:focus-visible {
    outline: 2px solid #ff5247;
    outline-offset: 2px;
}

/* Dark sections: same chip, a little stronger wash so it reads on navy */
html body a.bd-lp.bd-lp--dark {
    color: #fff !important;
    background: rgba(255, 82, 71, .2) !important;
}

html body a.bd-lp.bd-lp--dark:hover,
html body a.bd-lp.bd-lp--dark:focus-visible {
    background: #ff5247 !important;
}

/* Preview card: fixed, so it never moves the page */
.bd-lpc {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;
    width: 320px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    color: #030925;
    border: 1px solid rgba(3, 9, 37, .1);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(3, 9, 37, .2);
    text-align: left;
    font-family: var(--bd-font-body, 'Urbanist', system-ui, sans-serif);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
    pointer-events: none;
}

.bd-lpc.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

.bd-lpc__img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #131c4a;
}

.bd-lpc__body {
    padding: 14px 16px 16px;
}

.bd-lpc__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #030925;
}

.bd-lpc__text {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(3, 9, 37, .74);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .bd-lpc {
        transform: none;
        transition: opacity .01s linear, visibility 0s linear .01s;
    }
    html body a.bd-lp.bd-lp {
        transition: none;
    }
}

@media print {
    .bd-lpc { display: none; }
}
