/*
Theme Name: Bootstrap Tema
Theme URI: https://example.com/bootstrap-tema
Author: Christian Maymann
Author URI: https://maymann.net
Description: Et grundlæggende WordPress-tema bygget med Bootstrap 5. Indeholder alle nødvendige template-filer, sidebar-widgets, navigation og er klar til oversættelse.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bootstrap-tema
Tags: bootstrap, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* =========================================================
   Bemærk: Hovedparten af stylingen håndteres af Bootstrap 5.
   Denne fil indeholder kun WordPress-specifikke stilarter
   samt mindre justeringer ovenpå Bootstrap.
   ========================================================= */

/* WordPress påkrævede klasser ----------------------------- */

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.alignwide {
    margin-left: -80px;
    margin-right: -80px;
    max-width: 100vw;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img {
    max-width: 100%;
    height: auto;
}

.wp-caption-text,
.gallery-caption {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    padding-top: 0.5rem;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.sticky {
    display: block;
}

.bypostauthor {
    display: block;
}

/* Galleri ------------------------------------------------ */

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    flex: 1 1 auto;
}

.gallery-columns-2 .gallery-item { flex-basis: calc(50% - 0.5rem); }
.gallery-columns-3 .gallery-item { flex-basis: calc(33.333% - 0.5rem); }
.gallery-columns-4 .gallery-item { flex-basis: calc(25% - 0.5rem); }
.gallery-columns-5 .gallery-item { flex-basis: calc(20% - 0.5rem); }

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

/* Site-layout -------------------------------------------- */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#site-content {
    flex: 1 0 auto;
    padding: 2rem 0;
}

.site-footer {
    flex-shrink: 0;
}

/* Indlægsstil -------------------------------------------- */

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: inherit;
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content blockquote {
    border-left: 4px solid #0d6efd;
    padding: 0.5rem 1.25rem;
    margin: 1.5rem 0;
    background-color: #f8f9fa;
    font-style: italic;
}

.entry-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.entry-footer {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Navigation mellem indlæg ------------------------------- */

.post-navigation {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1 1 45%;
}

.post-navigation .nav-next {
    text-align: right;
}

/* Kommentarer -------------------------------------------- */

.comment-list {
    list-style: none;
    padding-left: 0;
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
}

.comment-body {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

/* Widgets ------------------------------------------------ */

.widget {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0d6efd;
}

.widget ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.widget ul li {
    padding: 0.375rem 0;
    border-bottom: 1px solid #dee2e6;
}

.widget ul li:last-child {
    border-bottom: 0;
}

.widget a {
    text-decoration: none;
}

.widget a:hover {
    text-decoration: underline;
}

/* Søgefelt ----------------------------------------------- */

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form .search-field {
    flex: 1;
}

/* Paginering --------------------------------------------- */

.pagination-wrap {
    margin: 2rem 0;
}

.pagination-wrap .page-numbers {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #0d6efd;
}

.pagination-wrap .page-numbers.current {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.pagination-wrap .page-numbers:hover:not(.current) {
    background-color: #e9ecef;
}

/* Footer ------------------------------------------------- */

.site-footer {
    background-color: #212529;
    color: #adb5bd;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-info {
    border-top: 1px solid #495057;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

/* Responsive justeringer --------------------------------- */

@media (max-width: 768px) {
    .alignwide,
    .alignfull {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-next {
        text-align: left;
    }
}


.dfb-mine-tag-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f5eaea;
    border: 1px solid #d4a0a0;
    color: #8b1a1a;
    border-radius: 20px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

/* dfb-laesning.css */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;600&display=swap');

/* ────────────────────────────────────────────────────────────
   Multi-linje vers (poesi): tving linjeskift uanset hvad andet
   CSS måtte sige. !important fordi vi har set rapporter om at
   selv om HTML indeholder \n eller <br>, vises kun første linje
   — det betyder at noget i temaet eller andre regler overrider.
   ──────────────────────────────────────────────────────────── */
.dfb-vers-tekst {
    white-space: pre-line !important;
}

/* ── Wrap ────────────────────────────────────────────────── */
.dfb-laesning-wrap {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Source Sans 3', sans-serif;
    color: #1a1a1a;
}

/* ── Navigation ──────────────────────────────────────────── */
.dfb-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 0 1.5rem;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 2rem;
}

.dfb-nav-selects {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dfb-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dfb-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
}

.dfb-select {
    padding: 0.5rem 0.75rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    min-width: 80px;
}

.dfb-select:focus {
    outline: 2px solid #8b1a1a;
    outline-offset: 2px;
}

#dfb-bog-select { min-width: 220px; }

.dfb-btn-vis {
    padding: 0.5rem 1.5rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: #1a1a1a;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-end;
}

.dfb-btn-vis:hover { background: #333; }

/* ── Pager ───────────────────────────────────────────────── */
.dfb-nav-pager {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dfb-pager-btn {
    padding: 0.35rem 0.85rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8b1a1a;
    background: #fff;
    border: 1px solid #8b1a1a;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.dfb-pager-btn:hover:not(:disabled) {
    background: #8b1a1a;
    color: #fff;
}

.dfb-pager-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dfb-pager-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #555;
}

/* ── Kapitel-titel ───────────────────────────────────────── */
.dfb-kapitel-titel {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

/* ── Vers-liste ──────────────────────────────────────────── */
.dfb-vers-liste {
    display: flex;
    flex-direction: column;
}

/* ── Vers-item ───────────────────────────────────────────── */
.dfb-vers-item {
    
    column-gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    transition: background 0.15s;
}

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

.dfb-vers-item:hover { background: #fafafa; }

/* Vers med note: subtil indikator i venstre kant */
.dfb-vers--har-note {
    border-left: 3px solid #8b1a1a;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

/* ── Verstekst ───────────────────────────────────────────── */
.dfb-vers-tekst-wrap {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
}

.dfb-vers-num {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #8b1a1a;
    min-width: 1.5rem;
    padding-top: 0.15rem;
}

.dfb-vers-tekst {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
    /* Multi-linje vers (poesi som Sl, Job, Åb 4-5,7,15,18-19) gemmes med
       \n mellem linjer i databasen. white-space: pre-line sikrer at \n
       renderes som linjeskift selv hvis JS indsætter via textContent (uden
       at konvertere til <br>). Sammen med <br>-tags fra tekst_html giver
       det robust visning uanset om browseren har cachet gammel JS. */
    white-space: pre-line;
}

/* ── + knap ──────────────────────────────────────────────── */
.dfb-note-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin-top: 0.3rem;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #aaa;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.dfb-note-toggle:hover,
.dfb-vers--open .dfb-note-toggle {
    border-color: #8b1a1a;
    color: #8b1a1a;
    background: #fff5f5;
}

.dfb-vers--har-note .dfb-note-toggle {
    border-color: #8b1a1a;
    color: #8b1a1a;
}

.dfb-note-toggle[data-tooltip] {
    position: relative;
}
.dfb-note-toggle[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.8rem;
    line-height: 1.55;
    padding: 0.45rem 0.65rem;
    border-radius: 3px;
    max-width: 260px;
    width: max-content;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 2px 10px rgba(0,0,0,0.22);
    pointer-events: none;
    z-index: 50;
}
.dfb-vers--open .dfb-note-toggle[data-tooltip]:hover::after {
    display: none;
}

/* ── Note-panel ──────────────────────────────────────────── */
.dfb-note-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0 0.5rem 2.1rem;
}

.dfb-vers--open .dfb-note-panel {
    display: flex;
}

.dfb-note-textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #1a1a1a;
    background: #fffdf9;
    border: 1px solid #ddd;
    border-radius: 3px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.dfb-note-textarea:focus {
    outline: none;
    border-color: #8b1a1a;
    background: #fff;
}

.dfb-note-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dfb-note-gem {
    padding: 0.3rem 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #8b1a1a;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
}

.dfb-note-gem:hover { background: #6e1414; }

.dfb-note-slet {
    padding: 0.3rem 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.dfb-note-slet:hover {
    color: #8b1a1a;
    border-color: #8b1a1a;
}

.dfb-note-status {
    font-size: 0.8rem;
    color: #4a7c4a;
    margin-left: auto;
}

/* ── Loading / fejl ──────────────────────────────────────── */
.dfb-loading {
    display: flex;
    gap: 0.4rem;
    padding: 2rem 0;
    justify-content: center;
}

.dfb-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b1a1a;
    animation: dfb-bounce 1s infinite ease-in-out;
}
.dfb-loading span:nth-child(2) { animation-delay: 0.15s; }
.dfb-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dfb-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1;   }
}

.dfb-intro, .dfb-error {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: #888;
    padding: 1rem 0;
}

.dfb-error { color: #8b1a1a; }

/* ── Tag-widget (i note-panel) ───────────────────────────── */
.dfb-tag-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0 0.2rem 2.1rem;
    min-height: 2rem;
}

.dfb-tag-list {
    display: contents;
}

.dfb-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: #f5eaea;
    border: 1px solid #d4a0a0;
    color: #8b1a1a;
    border-radius: 20px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.dfb-tag-rm {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #b06060;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.dfb-tag-rm:hover { color: #8b1a1a; }

.dfb-tag-input {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    color: #555;
    min-width: 90px;
    padding: 0.1rem 0;
}
.dfb-tag-input::placeholder { color: #bbb; }

.dfb-tag-locked {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    color: #bbb;
    font-style: italic;
    padding: 0.1rem 0;
}


    font-size: 0.75rem;
    color: #4a7c4a;
    margin-left: 0.25rem;
}

/* Vers-indikator: har tags */
.dfb-vers--har-tags .dfb-note-toggle {
    border-color: #8b1a1a;
}

/* ── Tag-badges i modal ──────────────────────────────────── */
.dfb-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.dfb-modal-tag-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    background: #f5eaea;
    border: 1px solid #d4a0a0;
    color: #8b1a1a;
    border-radius: 20px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.5;
}


/* ── Kapitel megamenu (desktop) ──────────────────────────────────
   Vises som en grid af kapitelnumre. For bøger med ≤12 kapitler:
   ét simpelt grid. For større: grupperet i tier-rækker med label. */

.dfb-mega-btn-kap {
    min-width: 80px;
    justify-content: space-between;
}
.dfb-mega-btn-kap .dfb-mega-btn-label {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.dfb-mega-menu-kap {
    padding: 14px 16px;
    min-width: 320px;
    max-width: min(560px, calc(100vw - 32px));
}

/* Simpelt grid (få kapitler) */
.dfb-mega-kap-simple {
    display: grid;
    grid-template-columns: repeat(6, 40px);
    gap: 4px;
}

/* Grupperet visning (mange kapitler) */
.dfb-mega-kap-row {
    display: grid;
    grid-template-columns: 64px repeat(10, 40px);
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
}
.dfb-mega-kap-row:last-child { margin-bottom: 0; }

.dfb-mega-kap-row-label {
    font-size: 0.72rem;
    color: #888;
    font-weight: 600;
    text-align: right;
    padding-right: 4px;
    font-variant-numeric: tabular-nums;
}

.dfb-mega-kap-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0;
    height: 34px;
    cursor: pointer;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: #1a1a1a;
    transition: background .12s, border-color .12s, color .12s;
}
.dfb-mega-kap-btn:hover,
.dfb-mega-kap-btn:focus {
    background: #fbf3f3;
    border-color: #8b1a1a;
    color: #8b1a1a;
    outline: none;
}
.dfb-mega-kap-btn.dfb-mega-active {
    background: #8b1a1a;
    border-color: #8b1a1a;
    color: #fff;
}

/* Ikke-oversatte kapitler: gråtonet, diagonal streg, ikke klikbar */
.dfb-mega-kap-btn.dfb-mega-disabled {
    color: #bbb;
    background: repeating-linear-gradient(
        -45deg,
        #fafafa,
        #fafafa 5px,
        #f0f0f0 5px,
        #f0f0f0 6px
    );
    border-color: #e5e5e5;
    cursor: not-allowed;
    pointer-events: none; /* blokér også klik via tastatur-tab */
}
.dfb-mega-kap-btn.dfb-mega-disabled:hover,
.dfb-mega-kap-btn.dfb-mega-disabled:focus {
    background: repeating-linear-gradient(
        -45deg,
        #fafafa,
        #fafafa 5px,
        #f0f0f0 5px,
        #f0f0f0 6px
    );
    border-color: #e5e5e5;
    color: #bbb;
}

/* Disabled option i mobile <select> — browseren håndterer "ikke valgbar"
   automatisk; vi giver bare et visuelt hint */
#dfb-kap-select option:disabled {
    color: #bbb;
    font-style: italic;
}

/* Smalle desktop-skærme: skru ned til 5 per række hvis nødvendigt */
@media (min-width: 720px) and (max-width: 900px) {
    .dfb-mega-menu-kap {
        min-width: 280px;
    }
    .dfb-mega-kap-row {
        grid-template-columns: 50px repeat(5, 40px);
    }
}


/* ── Bog megamenu (desktop) ──────────────────────────────────────
   Vises på skærme ≥ 720px. På smallere skærme falder vi tilbage til
   den klassiske <select>-dropdown. */

.dfb-mega-wrap { position: relative; }

/* Default: vis mobile-fallback, skjul desktop-trigger */
.dfb-select-mobile  { display: inline-block; }
.dfb-select-desktop { display: none; }

@media (min-width: 720px) {
    .dfb-select-mobile  { display: none; }
    .dfb-select-desktop { display: inline-flex; }
}

.dfb-mega-btn {
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 220px;
    text-align: left;
    background: #fff;
}
.dfb-mega-btn[aria-expanded="true"] {
    outline: 2px solid #8b1a1a;
    outline-offset: 2px;
}
.dfb-mega-btn-arrow {
    font-size: 0.7em;
    color: #777;
    margin-left: auto;
    transition: transform .15s;
}
.dfb-mega-btn[aria-expanded="true"] .dfb-mega-btn-arrow {
    transform: rotate(180deg);
}

.dfb-mega-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    padding: 18px 22px;
    /* Bredde: så bred som muligt uden at gå ud over viewport */
    width: max-content;
    max-width: calc(100vw - 32px);
}

.dfb-mega-menu[hidden] { display: none; }

.dfb-mega-section { margin-bottom: 18px; }
.dfb-mega-section:last-child { margin-bottom: 0; }
.dfb-mega-section-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b1a1a;
    margin: 0 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
}

.dfb-mega-cols {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 0 22px;
}
.dfb-mega-cols.dfb-mega-nt {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.dfb-mega-col-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin: 0 0 6px;
    padding-bottom: 3px;
    border-bottom: 1px solid #f0f0f0;
}

.dfb-mega-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.dfb-mega-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 4px 6px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.92rem;
    color: #1a1a1a;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1.4;
}
.dfb-mega-item:hover,
.dfb-mega-item:focus {
    background: #fbf3f3;
    color: #8b1a1a;
    outline: none;
}
.dfb-mega-item.dfb-mega-active {
    background: #8b1a1a;
    color: #fff;
}

/* Smalle desktops: 4 → 3 kolonner */
@media (min-width: 720px) and (max-width: 1100px) {
    .dfb-mega-cols {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
    .dfb-mega-cols.dfb-mega-nt {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}


@media (max-width: 500px) {
    #dfb-bog-select { min-width: 160px; }

    .dfb-vers-item {
        grid-template-columns: 1fr 28px;
    }
}

/* ── Mine Tags Widget ────────────────────────────────────────── */
.dfb-mine-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dfb-mine-tag-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f5eaea;
    border: 1px solid #d4a0a0;
    color: #8b1a1a;
    border-radius: 20px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.dfb-mine-tag-pill:hover,
.dfb-mine-tag-pill--active {
    background: #8b1a1a;
    color: #fff;
    border-color: #8b1a1a;
}

.dfb-mine-tags-reset {
    display: block;
    margin-top: 0.75rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}

.dfb-mine-tags-reset:hover { color: #8b1a1a; }

/* ── Tag-filterbanner ────────────────────────────────────────── */
.dfb-tag-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.9rem;
    background: #f5eaea;
    border: 1px solid #d4a0a0;
    border-radius: 3px;
    margin-bottom: 1.25rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
    color: #4a1a1a;
    flex-wrap: wrap;
}

.dfb-tag-filter-banner strong { color: #8b1a1a; }

.dfb-tag-filter-reset {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8b1a1a;
    text-decoration: none;
    white-space: nowrap;
}

.dfb-tag-filter-reset:hover { opacity: 0.7; }

/* ── Vers-dimming ved tag-filter ─────────────────────────────── */
.dfb-vers--dimmed {
    opacity: 0.25;
    transition: opacity 0.2s;
}

.dfb-vers--tagged {
    background: #fffdf9;
}

/* ── Tag-oversigt ────────────────────────────────────────────── */
.dfb-tag-oversigt-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1a1a1a;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dfb-tag-oversigt-header .dfb-kapitel-titel {
    margin: 0;
    flex: 1;
}

.dfb-tag-oversigt-antal {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.82rem;
    color: #8a7d72;
    margin: 0;
}

.dfb-tag-oversigt-liste {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dfb-tag-oversigt-item {
    padding: 1.1rem 0;
    border-bottom: 1px solid #eee;
}

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

.dfb-tag-oversigt-ref {
    display: inline-block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8b1a1a;
    text-decoration: none;
    margin-bottom: 0.4rem;
    transition: opacity 0.15s;
}

.dfb-tag-oversigt-ref:hover { opacity: 0.7; }

.dfb-tag-oversigt-tekst {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}

.dfb-tag-oversigt-note {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4a3f36;
    background: #fffdf9;
    border-left: 3px solid #8b1a1a;
    padding: 0.35rem 0.65rem;
    border-radius: 0 2px 2px 0;
    margin-top: 0.4rem;
}

/* ── H-knap (hebraisk grundtekst for GT-bøger) ──────────────── */
.dfb-h-btn {
    background: #6b4c11 !important;
    font-style: normal !important;
	color:white !important
}
.dfb-h-btn:hover,
.dfb-h-btn.dfb-active {
    background: #4a3408 !important;
}

button.dfb-mega-kap-btn {
    width: 100%;
}

/* ── G-knap (græsk grundtekst for NT-bøger) ──────────────── */
button.dfb-kjv-btn {
    border-radius: 50%;
    width: 35px;
    padding-left: 3px;
    height: 35px;
}
button.dfb-asv-btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
}
 button.dfb-il-btn  {
    border-radius: 50%;
    width: 35px;
    height: 35px;
}
