/* DFB Krydsreferencer - Widget v1.4 */
.dfb-krydsref-container {
    font-size: 0.95em;
}

.dfb-krydsref-loading {
    color: #888;
    font-style: italic;
    padding: 6px 0;
}

.dfb-krydsref-tom {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
    padding: 4px 0;
}

.dfb-krydsref-sektion {
    margin-bottom: 14px;
}

.dfb-krydsref-sektion:last-child {
    margin-bottom: 0;
}

.dfb-sek-titel {
    font-size: 0.78em !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2271b1;
    margin: 0 0 6px 0 !important;
    padding-bottom: 3px;
    border-bottom: 1px solid #2271b1;
}

.dfb-krydsref-liste {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dfb-krydsref-item {
    padding: 6px 0;
    border-bottom: 1px dotted #ddd;
    list-style: none;
}

.dfb-krydsref-item:last-child {
    border-bottom: none;
}

.dfb-krydsref-titel-line {
    margin-bottom: 2px;
}

.dfb-krydsref-link {
    font-weight: 600;
    color: #2271b1;
    text-decoration: none;
}

.dfb-krydsref-link:hover {
    text-decoration: underline;
}

.dfb-krydsref-tekst {
    font-weight: 600;
    color: #1a1a1a;
}

.dfb-krydsref-details {
    font-size: 0.88em;
    color: #555;
}

.dfb-rel {
    font-size: 0.85em;
    font-style: italic;
    margin-left: 2px;
    font-weight: normal;
}

.dfb-rel-citat    { color: #d63638; }
.dfb-rel-allusion { color: #b8860b; }
.dfb-rel-parallel { color: #00a32a; }
.dfb-rel-baggrund { color: #888; }

/* Markering af vers når man klikker på krydsreference */
.dfb-vers-item.dfb-krydsref-highlight {
    background-color: #fff3cd !important;
    box-shadow: 0 0 0 2px #f59e0b !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    animation: dfbKrydsrefPulse 1.2s ease-in-out;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 4px 0;
}

@keyframes dfbKrydsrefPulse {
    0%   { background-color: #fff3cd; box-shadow: 0 0 0 2px #f59e0b; }
    50%  { background-color: #ffd966; box-shadow: 0 0 0 4px #d97706; }
    100% { background-color: #fff3cd; box-shadow: 0 0 0 2px #f59e0b; }
}

/* Lokal-link styling - en tand stærkere visuel cue */
.dfb-krydsref-lokal {
    cursor: pointer;
}

.dfb-krydsref-lokal::after {
    content: ' ↗';
    font-size: 0.75em;
    opacity: 0.6;
}

/* ─── Vers-grupper (v1.4) ───────────────────────────────────── */

/* Wrapper for hver vers-gruppe */
.dfb-krydsref-gruppe {
    padding: 0;
    border-bottom: 1px solid #e5e5e5;
    list-style: none;
}

.dfb-krydsref-gruppe:last-child {
    border-bottom: none;
}

/* Header som knap, fylder hele bredden */
.dfb-krydsref-gruppe-header {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
    color: inherit;
    transition: background-color 0.15s ease;
}

.dfb-krydsref-gruppe-header:hover {
    background-color: #f4f6f9;
}

.dfb-krydsref-gruppe-header:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

/* +/− ikonet */
.dfb-krydsref-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    font-size: 1.05em;
    line-height: 1;
    font-weight: 700;
    color: #2271b1;
    background-color: #eef3f8;
    border-radius: 3px;
    flex-shrink: 0;
    user-select: none;
}

.dfb-krydsref-gruppe.is-open .dfb-krydsref-toggle {
    color: #fff;
    background-color: #2271b1;
}

/* Vers-label, fx "v1" eller "v3-4" */
.dfb-krydsref-gruppe-label {
    font-weight: 600;
    color: #1a1a1a;
    flex-grow: 1;
}

/* Antal-badge */
.dfb-krydsref-gruppe-antal {
    font-size: 0.82em;
    color: #666;
    background-color: #eef3f8;
    padding: 1px 7px;
    border-radius: 9px;
    font-weight: 500;
    min-width: 22px;
    text-align: center;
}

.dfb-krydsref-gruppe.is-open .dfb-krydsref-gruppe-antal {
    color: #2271b1;
    background-color: #dbe7f2;
}

/* Indhold (skjult som default) */
.dfb-krydsref-gruppe-indhold {
    list-style: none !important;
    margin: 0 0 6px 0 !important;
    padding: 4px 0 4px 26px !important;
    border-left: 2px solid #dbe7f2;
    margin-left: 9px !important;
}

.dfb-krydsref-gruppe-indhold .dfb-krydsref-item {
    padding: 3px 0;
    border-bottom: 1px dotted #eee;
}

.dfb-krydsref-gruppe-indhold .dfb-krydsref-item:last-child {
    border-bottom: none;
}

/* "Fold alle ud/ind"-kontrol */
.dfb-krydsref-foldalle {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.dfb-krydsref-foldknap {
    background: transparent;
    border: 1px solid #ccd5dc;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 0.78em;
    color: #555;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dfb-krydsref-foldknap:hover {
    background-color: #eef3f8;
    border-color: #2271b1;
    color: #2271b1;
}
