/* DFB Kommentarer — Kirkefædrene widget
   Følger Pergament & Oxblod-designretning */

.dfb-komm-container {
    max-height: 70vh;
    overflow-y: auto;
    font-size: .9em;
    line-height: 1.5;
}

/* ── Kapitelhoved ─────────────────────────────── */

.dfb-komm-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: .6em;
    padding-bottom: .4em;
    border-bottom: 2px solid var(--bb-oxblod, #8b1a1a);
}

.dfb-komm-header h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    color: var(--bb-oxblod, #8b1a1a);
    font-family: var(--bb-serif, Georgia, 'Times New Roman', serif);
}

.dfb-komm-header .dfb-komm-stat {
    font-size: .75em;
    color: #888;
}

/* ── Forfatter-filter ─────────────────────────── */

.dfb-komm-filter {
    margin-bottom: .8em;
}

.dfb-komm-filter select {
    width: 100%;
    font-size: .85em;
    padding: .25em .4em;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* ── Vers-blokke ──────────────────────────────── */

.dfb-komm-vers {
    margin-bottom: .3em;
    border-left: 3px solid transparent;
    transition: border-color .15s;
}

.dfb-komm-vers.dfb-komm-open {
    border-left-color: var(--bb-oxblod, #8b1a1a);
}

.dfb-komm-vers-header {
    display: flex;
    align-items: center;
    gap: .4em;
    padding: .35em .5em;
    cursor: pointer;
    user-select: none;
    border-radius: 3px;
    transition: background .12s;
}

.dfb-komm-vers-header:hover {
    background: rgba(139, 26, 26, .06);
}

.dfb-komm-vers-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    height: 1.6em;
    font-size: .75em;
    font-weight: 700;
    color: var(--bb-oxblod, #8b1a1a);
    background: rgba(139, 26, 26, .08);
    border-radius: 50%;
    flex-shrink: 0;
}

.dfb-komm-vers-label {
    font-size: .8em;
    color: #666;
}

.dfb-komm-chevron {
    margin-left: auto;
    font-size: .65em;
    color: #aaa;
    transition: transform .15s;
}

.dfb-komm-open .dfb-komm-chevron {
    transform: rotate(90deg);
}

/* ── Kommentarindhold ─────────────────────────── */

.dfb-komm-body {
    display: none;
    padding: .2em .5em .6em 2.4em;
}

.dfb-komm-open .dfb-komm-body {
    display: block;
}

.dfb-komm-entry {
    margin-bottom: .8em;
    padding-bottom: .6em;
    border-bottom: 1px solid #eee;
}

.dfb-komm-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dfb-komm-author {
    font-weight: 600;
    font-size: .82em;
    color: var(--bb-oxblod, #8b1a1a);
    font-family: var(--bb-serif, Georgia, 'Times New Roman', serif);
}

.dfb-komm-period {
    font-size: .72em;
    color: #999;
    margin-left: .3em;
    font-style: italic;
}

.dfb-komm-text {
    margin-top: .2em;
    font-size: .85em;
    color: #333;
    line-height: 1.55;
}

/* ── Klik-fra-vers-highlight ──────────────────── */

.dfb-komm-vers.dfb-komm-pulse {
    animation: dfb-komm-pulse .4s ease;
}

@keyframes dfb-komm-pulse {
    0%   { background: rgba(139, 26, 26, .12); }
    100% { background: transparent; }
}

/* ── Begrænsnings-besked ──────────────────────── */

.dfb-komm-limited {
    font-size: .78em;
    color: #886;
    background: rgba(139, 26, 26, .05);
    border-left: 3px solid var(--bb-oxblod, #8b1a1a);
    padding: .35em .6em;
    margin-bottom: .6em;
    border-radius: 0 3px 3px 0;
}

/* ── Loading / tom tilstand ───────────────────── */

.dfb-komm-loading {
    text-align: center;
    padding: 1.5em 0;
    color: #999;
    font-size: .85em;
}

.dfb-komm-empty {
    font-size: .85em;
    color: #999;
    padding: .5em 0;
}

/* ── Scrollbar ────────────────────────────────── */

.dfb-komm-container::-webkit-scrollbar {
    width: 5px;
}

.dfb-komm-container::-webkit-scrollbar-thumb {
    background: rgba(139, 26, 26, .25);
    border-radius: 3px;
}
