/* Glossary term hover tooltips (RTE glossary picker)
   UI section layout lives in innerpage.css (.glossary / .glossary__*).
   Tooltip chrome is custom until the UI team provides styles. */

.glossary-picker .glossary-term,
.glossary .glossary-term,
.article .glossary-term {
    position: relative;
    display: inline-block;
    margin: 0;
    line-height: inherit !important;
    font-size: inherit !important;
    vertical-align: baseline;
}

.glossary-term .glossary-term__trigger {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #221649;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: help;
    vertical-align: baseline;
}

.glossary-term .glossary-term__trigger:hover,
.glossary-term .glossary-term__trigger:focus {
    color: #eb5534;
    outline: none;
}

.glossary-term .glossary-term__trigger:focus-visible {
    outline: 2px solid #eb5534;
    outline-offset: 2px;
}

.glossary-term .glossary-term__popup {
    position: absolute;
    z-index: 200;
    left: 0;
    top: calc(100% + 8px);
    display: none;
    width: min(420px, calc(100vw - 32px));
    box-sizing: border-box;
    pointer-events: none;
}

.glossary-term:hover .glossary-term__popup,
.glossary-term:focus-within .glossary-term__popup,
.glossary-term.is-open .glossary-term__popup {
    display: block;
}

.glossary-term .glossary-term__popup-inner {
    display: block;
    position: relative;
    background-color: #e5e3d9;
    border: 3px solid #231f20;
    box-shadow: -8px 8px 0 #eb5534;
    padding: 20px 22px;
    color: #231f20;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    text-align: left;
    white-space: normal;
}

@media screen and (max-width: 767px) {
    .glossary-term .glossary-term__popup {
        width: min(320px, calc(100vw - 32px));
        left: 50%;
        transform: translateX(-50%);
    }

    .glossary-term .glossary-term__popup-inner {
        font-size: 0.9375rem;
        padding: 16px 18px;
    }
}
