/*
 * Glossary cards of the English site (inc/en-glossary-tooltip.php, js/facelift/components/en-gloss.js).
 * A term reads as a term (dotted underline in the colour of the text around it, on light and dark
 * sections alike); hovering, focusing or tapping it opens a small dictionary card.
 */

/* ---------------------------------------------------------------- Term in the text */
wen-term, wen-gt { display: inline; }
.wen-term,
a.wen-term,
a.wen-term:link,
a.wen-term:visited {
    color: inherit !important;
    font-weight: inherit;
    text-decoration-line: underline !important;
    text-decoration-style: dotted !important;
    text-decoration-thickness: 1.5px !important;
    text-decoration-color: currentColor !important;
    text-underline-offset: 0.24em;
    border-radius: 3px;
    cursor: help;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}
@supports (color: color-mix(in srgb, red 50%, transparent)) {
    .wen-term, a.wen-term, a.wen-term:link, a.wen-term:visited { text-decoration-color: color-mix(in srgb, currentColor 62%, transparent) !important; }
}
.wen-term:hover,
.wen-term[aria-expanded="true"] { background-color: rgba(127, 140, 134, 0.16); text-decoration-color: currentColor !important; }
@supports (color: color-mix(in srgb, red 50%, transparent)) {
    .wen-term:hover, .wen-term[aria-expanded="true"] { background-color: color-mix(in srgb, currentColor 13%, transparent); }
}
.wen-term:focus { outline: none; }
.wen-term:focus-visible { outline: 2px solid var(--wm-green-500, #0E9984); outline-offset: 2px; }

/* ---------------------------------------------------------------- Card */
.wen-gl {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483000;
    box-sizing: border-box;
    width: min(352px, calc(100vw - 24px));
    margin: 0;
    padding: 16px 18px 12px;
    border: 1px solid var(--wm-ink-100, #E8EDEA);
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 22px 48px rgba(10, 41, 33, 0.16), 0 6px 14px rgba(10, 41, 33, 0.08);
    color: var(--wm-ink-700, #343D39);
    font-family: var(--wm-font-body, 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    transform: translateY(var(--wen-gl-shift, 4px));
    transition: opacity 0.14s ease, transform 0.14s ease;
    pointer-events: none;
}
.wen-gl[hidden] { display: none; }
.wen-gl.is-open { opacity: 1; transform: none; pointer-events: auto; }
.wen-gl.is-above { --wen-gl-shift: -4px; }
.wen-gl::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 18px;
    right: 18px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--wm-green-700, #00695A), var(--wm-green-400, #2CB39C));
}
.wen-gl-arrow {
    position: absolute;
    top: -7px;
    left: var(--wen-gl-arrow, 50%);
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-top: 1px solid var(--wm-ink-100, #E8EDEA);
    border-left: 1px solid var(--wm-ink-100, #E8EDEA);
    background: #FFFFFF;
    transform: rotate(45deg);
}
.wen-gl.is-above .wen-gl-arrow { top: auto; bottom: -7px; transform: rotate(225deg); }

.wen-gl-cat {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 2px 0 9px;
    color: var(--wm-green-700, #00695A);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.wen-gl-cat svg { flex: none; }
.wen-gl-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 4px; }
.wen-gl-t {
    margin: 0;
    color: var(--wm-ink-900, #0A110E);
    font-family: var(--wm-font-display, 'Borna', 'Inter', ui-sans-serif, system-ui, sans-serif);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.wen-gl-en {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--wm-green-50, #EBF7F3);
    color: var(--wm-green-800, #003D33);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
}
.wen-gl-pt { margin: 0 0 10px; color: var(--wm-ink-500, #687370); font-size: 13px; font-style: italic; line-height: 1.45; }
.wen-gl-d { margin: 0 0 12px; color: var(--wm-ink-700, #343D39); }
.wen-gl-more,
.wen-gl-more:link,
.wen-gl-more:visited {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -18px;
    padding: 10px 18px 0;
    border-top: 1px solid var(--wm-ink-100, #E8EDEA);
    color: var(--wm-green-700, #00695A);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.wen-gl-more:hover { color: var(--wm-green-600, #008070); text-decoration: none; }
.wen-gl-more:hover svg { transform: translateX(3px); }
.wen-gl-more svg { flex: none; transition: transform 0.15s ease; }
.wen-gl-more:focus-visible { outline: 2px solid var(--wm-green-500, #0E9984); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 480px) {
    .wen-gl { padding: 14px 16px 11px; font-size: 14px; }
    .wen-gl-t { font-size: 19px; }
    .wen-gl-more, .wen-gl-more:link, .wen-gl-more:visited { margin: 0 -16px; padding: 10px 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .wen-gl, .wen-term, .wen-gl-more svg { transition: none; }
}
@media print {
    .wen-gl { display: none !important; }
    .wen-term { text-decoration: none !important; }
}
