/* ── DFB Strong Tooltip ──────────────────────────────────────────────── */

/* Markerede ord — subtil indikator at de er klikbare */
.dfb-st-word {
    cursor: help;
    border-bottom: 1px dotted rgba(140, 80, 40, 0.35);
    transition: background 0.12s, border-color 0.12s;
}

.dfb-st-word:hover {
    background: rgba(255, 240, 200, 0.55);
    border-bottom-color: rgba(140, 80, 40, 0.7);
}

/* Selve tooltipet */
#dfb-st-tooltip {
    position: absolute;
    z-index: 99999;
    display: none;
    pointer-events: none;
    background: #1f1f1f;
    color: #fff;
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
    font-family: Georgia, serif;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    min-width: 130px;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.12s;
}

#dfb-st-tooltip.dfb-st-visible {
    display: block;
    opacity: 1;
}

#dfb-st-tooltip .dfb-st-graesk {
    font-family: 'SBL Greek', 'Times New Roman', serif;
    font-size: 1.05rem;
    color: #ffe9b8;
    margin-bottom: 0.15rem;
}

#dfb-st-tooltip .dfb-st-translit {
    font-style: italic;
    color: #c8c8c8;
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
}

/* Lemma (grundform fra leksikon) */
#dfb-st-tooltip .dfb-st-lemma {
    font-family: 'SBL Greek', 'Times New Roman', serif;
    font-size: 0.95rem;
    color: #d8b878;
    margin-top: 0.2rem;
    margin-bottom: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.25rem;
}

/* Kort definition */
#dfb-st-tooltip .dfb-st-kortdef {
    color: #e8e8e8;
    font-size: 0.82rem;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

/* Dansk definition (lang forklaring) */
#dfb-st-tooltip .dfb-st-danskdef {
    color: #c0c8d0;
    font-size: 0.78rem;
    font-style: italic;
    margin-top: 0.2rem;
    margin-bottom: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.2rem;
    line-height: 1.35;
}

#dfb-st-tooltip .dfb-st-strong {
    font-family: monospace;
    font-size: 0.72rem;
    color: #88c0d0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.25rem;
    margin-top: 0.3rem;
}

/* Pil under tooltipet (peger op mod ordet) */
#dfb-st-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1f1f1f;
}

#dfb-st-tooltip.dfb-st-below::before {
    bottom: auto;
    top: -6px;
    border-top: none;
    border-bottom: 6px solid #1f1f1f;
}

/* Skjul tooltip når vis_strong er off */
body.dfb-st-disabled .dfb-st-word {
    cursor: inherit;
    border-bottom: none;
    background: none;
}
body.dfb-st-disabled .dfb-st-word:hover {
    background: none;
}

/* Multi-ord tooltip (ét dansk ord → flere græske) */
.dfb-st-multi-wrap {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.dfb-st-kort {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 80px;
}

/* I multi-mode skal hver kort have egen ramme om dens leksikon-data */
.dfb-st-multi-wrap .dfb-st-lemma,
.dfb-st-multi-wrap .dfb-st-danskdef {
    border-top: none;
    padding-top: 0.1rem;
}

.dfb-st-multi-wrap .dfb-st-strong {
    border-top: none;
    padding-top: 0.1rem;
    margin-top: 0.15rem;
}

.dfb-st-plus {
    font-size: 0.85em;
    opacity: 0.5;
    align-self: center;
}

/* Subtil understregning der antyder at ordet dækker flere grundtekst-ord */
.dfb-st-word.dfb-st-multi {
    text-decoration-style: dotted;
}
