/* ── DFB Strong Tooltip (pergament-stil, v1.4) ── */

/* Markerede ord */
.dfb-st-word {
    cursor: help;
    border-bottom: 1px dotted rgba(139, 26, 26, 0.35);
    transition: background 0.12s, border-color 0.12s;
}
.dfb-st-word:hover {
    background: rgba(244, 236, 221, 0.9);
    border-bottom-color: rgba(139, 26, 26, 0.75);
}

/* Selve tooltipet */
#dfb-st-tooltip {
    position: absolute;
    z-index: 99999;
    display: none;
    pointer-events: auto;
    background: #fffdf8;
    color: #211c17;
    border: 1px solid #ded3c0;
    border-top: 3px solid #8b1a1a;
    border-radius: 6px;
    padding: 0.65rem 0.9rem 0.55rem;
    font-family: var(--bb-serif, Georgia, serif);
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(33, 28, 23, 0.18), 0 2px 6px rgba(33, 28, 23, 0.08);
    min-width: 190px;
    max-width: 360px;
    opacity: 0;
    transition: opacity 0.12s;
    text-align: left;
}
#dfb-st-tooltip.dfb-st-visible {
    display: block;
    opacity: 1;
}
#dfb-st-tooltip:has(.dfb-st-multi-wrap) {
    max-width: 560px;
}

#dfb-st-tooltip .dfb-st-graesk {
    font-family: 'SBL Greek', 'Gentium Plus', 'Times New Roman', serif;
    font-size: 1.4rem;
    line-height: 1.2;
    color: #8b1a1a;
}
#dfb-st-tooltip .dfb-st-translit {
    font-style: italic;
    color: #6b6154;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}
#dfb-st-tooltip .dfb-st-morf {
    display: inline-block;
    font-family: var(--bb-sans, system-ui, sans-serif);
    font-size: 0.75rem;
    color: #4a4136;
    background: #f4ecdd;
    border-radius: 3px;
    padding: 0.15rem 0.45rem;
    margin-bottom: 0.45rem;
}
#dfb-st-tooltip .dfb-st-lemma {
    font-size: 0.9rem;
    margin: 0.05rem 0 0.25rem;
}
#dfb-st-tooltip .dfb-st-lemma [lang="grc"] {
    font-family: 'SBL Greek', 'Gentium Plus', 'Times New Roman', serif;
    font-size: 1.05rem;
}
#dfb-st-tooltip .dfb-st-label {
    font-family: var(--bb-sans, system-ui, sans-serif);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b6154;
    margin-right: 0.2rem;
}
#dfb-st-tooltip .dfb-st-kortdef {
    font-size: 1rem;
    color: #211c17;
    margin: 0.15rem 0 0.25rem;
}
#dfb-st-tooltip .dfb-st-danskdef {
    font-size: 0.85rem;
    font-style: italic;
    color: #6b6154;
    margin: 0.2rem 0;
    padding-top: 0.3rem;
    border-top: 1px solid #ece4d6;
}
#dfb-st-tooltip .dfb-st-fod {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid #ece4d6;
    font-family: var(--bb-sans, system-ui, sans-serif);
    font-size: 0.75rem;
}
#dfb-st-tooltip .dfb-st-strong {
    color: #6b6154;
}
#dfb-st-tooltip .dfb-st-sog {
    color: #8b1a1a;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
#dfb-st-tooltip .dfb-st-sog:hover,
#dfb-st-tooltip .dfb-st-sog:focus {
    color: #6b1212;
    text-decoration: underline;
}

/* Usynlig bro over mellemrummet mellem ord og boks */
#dfb-st-tooltip .dfb-st-bro {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -18px;
    height: 18px;
}
#dfb-st-tooltip.dfb-st-below .dfb-st-bro {
    bottom: auto;
    top: -18px;
}
/* Låst med klik */
#dfb-st-tooltip.dfb-st-fastholdt {
    box-shadow: 0 10px 30px rgba(33, 28, 23, 0.22), 0 0 0 2px rgba(139, 26, 26, 0.25);
}

/* Pil (peger mod ordet) */
#dfb-st-tooltip::before,
#dfb-st-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}
#dfb-st-tooltip::before {
    bottom: -8px;
    border-top: 8px solid #ded3c0;
}
#dfb-st-tooltip::after {
    bottom: -7px;
    border-top: 8px solid #fffdf8;
}
#dfb-st-tooltip.dfb-st-below::before {
    bottom: auto;
    top: -10px;
    border-top: none;
    border-bottom: 8px solid #8b1a1a;
}
#dfb-st-tooltip.dfb-st-below::after {
    display: none;
}

/* Slået fra */
body.dfb-st-disabled .dfb-st-word {
    cursor: inherit;
    border-bottom: none;
    background: none;
}
body.dfb-st-disabled .dfb-st-word:hover {
    background: none;
}

/* Flere græske ord bag ét dansk ord */
.dfb-st-multi-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
}
.dfb-st-kort {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 130px;
}
.dfb-st-kort .dfb-st-fod {
    margin-top: auto;
}
.dfb-st-plus {
    align-self: center;
    color: #b8a990;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    #dfb-st-tooltip,
    #dfb-st-tooltip:has(.dfb-st-multi-wrap) {
        max-width: calc(100vw - 16px);
    }
    .dfb-st-multi-wrap {
        flex-direction: column;
    }
    .dfb-st-plus {
        align-self: flex-start;
    }
}
/* Slaaet fra af brugeren (Laeseværktøjer -> Ordopslag i grundteksten) */
body.dfb-st-bruger-fra .dfb-st-word {
    cursor: inherit;
    border-bottom: none;
    background: none;
}
body.dfb-st-bruger-fra .dfb-st-word:hover {
    background: none;
}
body.dfb-st-bruger-fra #dfb-st-tooltip {
    display: none !important;
}

/* Septuaginta-linje i GT (v1.4.6) */
#dfb-st-tooltip .dfb-st-lxx { margin-top: .45em; padding-top: .4em; border-top: 1px dashed rgba(127,127,127,.45); }
#dfb-st-tooltip .dfb-st-lxx [lang="grc"] { font-size: 1.05em; }
#dfb-st-tooltip .dfb-st-lxx-lemma { margin-top: .15em; }
#dfb-st-tooltip .dfb-st-lxx-lemma a { color: inherit; text-decoration: underline dotted; }

/* Hvad oversaetter ordet? (dfb-dansk-ord) */
#dfb-st-tooltip .dfb-st-dansk-ord { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(139,26,26,.15); text-align: right; }
#dfb-st-tooltip .dfb-st-dansk-ord a { font-size: 11px; color: #8b1a1a; text-decoration: none; font-weight: 600; }
#dfb-st-tooltip .dfb-st-dansk-ord a:hover, #dfb-st-tooltip .dfb-st-dansk-ord a:focus { text-decoration: underline; }
