/* ── DFB Ord Farver 2.0 ───────────────────────────────────────────── */

#dfb-of2-widget,
#dfb-of2-faelles {
    font-size: 0.85rem;
    font-family: Georgia, serif;
}

/* Farvesæt-pills */
.dfb-of2-sets {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.dfb-of2-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px 2px 10px;
    border-radius: 12px;
    border: 1.5px solid #c8b99a;
    background: #fffdf9;
    color: #5a3e28;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s;
    line-height: 1.6;
}
.dfb-of2-pill:hover          { border-color: #8b6a3e; }
.dfb-of2-pill.dfb-of2-active { background: #8b1a1a; border-color: #8b1a1a; color: #fff; }
.dfb-of2-pill-del {
    font-size: 0.9rem; opacity: .5; cursor: pointer; padding: 0 1px;
}
.dfb-of2-pill-del:hover { opacity: 1; }
.dfb-of2-new-pill {
    background: none;
    border: 1.5px dashed #c8b99a;
    border-radius: 12px;
    color: #8b6a3e;
    font-size: 0.78rem;
    font-family: Georgia, serif;
    padding: 2px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.dfb-of2-new-pill:hover { border-color: #8b1a1a; color: #8b1a1a; }

/* Gem-bjælke */
.dfb-of2-gem-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 8px;
    background: #f9f6f0;
    border: 1px solid #e5ddd0;
    border-radius: 4px;
}
.dfb-of2-gem-bar label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #5a3e28;
    cursor: pointer;
    margin-left: auto;
    white-space: nowrap;
}
.dfb-of2-gem-btn {
    background: #8b1a1a;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-family: Georgia, serif;
    font-size: 0.78rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.dfb-of2-gem-btn:hover    { background: #6e1414; }
.dfb-of2-gem-status {
    font-size: 0.72rem;
    color: #4a7c4a;
    min-width: 24px;
}

/* Tekst-filter */
.dfb-of2-filter { margin-bottom: 10px; }
.dfb-of2-filter > label {
    display: block;
    font-size: 0.72rem;
    color: #999;
    margin-bottom: 3px;
    letter-spacing: .03em;
}
.dfb-of2-filter-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dfb-of2-filter-input {
    flex: 1; min-width: 0;
    font-family: Georgia, serif;
    font-size: 0.82rem;
    padding: 4px 7px;
    border: 1px solid #d0c4b0;
    border-radius: 3px;
    background: #fffdf9;
    color: #1a1a1a;
}
.dfb-of2-filter-input:focus { outline: none; border-color: #8b1a1a; }
.dfb-of2-filter-hint { font-size: 0.7rem; color: #bbb; margin-top: 2px; font-style: italic; }
.dfb-of2-fstatus {
    font-size: 0.72rem; padding: 2px 7px; border-radius: 10px;
    font-weight: 600; white-space: nowrap;
}
.dfb-of2-fstatus.ok  { background: #e8f4e8; color: #2e6b2e; }
.dfb-of2-fstatus.nej { background: #f4e8e8; color: #8b1a1a; }

/* Ord-rækker */
.dfb-of2-rows { display: flex; flex-direction: column; gap: 5px; margin-bottom: 7px; }
.dfb-of2-row  { display: flex; align-items: center; gap: 5px; }
.dfb-of2-row input[type="text"] {
    flex: 1; min-width: 0;
    font-family: Georgia, serif; font-size: 0.82rem;
    padding: 4px 7px;
    border: 1px solid #d0c4b0; border-radius: 3px;
    background: #fffdf9; color: #1a1a1a;
}
.dfb-of2-row input[type="text"]:focus { outline: none; border-color: #8b1a1a; }
.dfb-of2-row input[type="color"] {
    width: 30px; height: 26px; padding: 1px;
    border: 1px solid #d0c4b0; border-radius: 3px;
    background: none; cursor: pointer; flex-shrink: 0;
}
.dfb-of2-row-del {
    width: 20px; height: 20px; border: none; background: none;
    color: #ccc; font-size: 1rem; cursor: pointer; padding: 0;
    border-radius: 3px; transition: color .15s; flex-shrink: 0; line-height: 1;
}
.dfb-of2-row-del:hover { color: #8b1a1a; }

/* Tilføj-knap */
.dfb-of2-add {
    width: 100%; background: none;
    border: 1px dashed #c8b99a; border-radius: 3px;
    color: #8b6a3e; font-family: Georgia, serif; font-size: 0.8rem;
    padding: 4px; cursor: pointer; margin-bottom: 8px;
    transition: border-color .15s, color .15s;
}
.dfb-of2-add:hover { border-color: #8b1a1a; color: #8b1a1a; }

/* Handlingsbjælke */
.dfb-of2-actions {
    display: flex; gap: 6px; align-items: center;
    border-top: 1px solid #f0ebe2; padding-top: 7px;
}
.dfb-of2-apply {
    flex: 1; background: #8b1a1a; color: #fff; border: none;
    border-radius: 3px; font-family: Georgia, serif; font-size: 0.82rem;
    padding: 5px 10px; cursor: pointer; transition: background .15s;
}
.dfb-of2-apply:hover { background: #6e1414; }
.dfb-of2-clear {
    background: none; border: 1px solid #d0c4b0; border-radius: 3px;
    color: #888; font-family: Georgia, serif; font-size: 0.82rem;
    padding: 5px 10px; cursor: pointer; transition: border-color .15s, color .15s;
}
.dfb-of2-clear:hover { border-color: #8b1a1a; color: #8b1a1a; }
.dfb-of2-count { font-size: 0.72rem; color: #4a7c4a; min-width: 30px; text-align: right; }

/* Tom */
.dfb-of2-empty { font-size: 0.78rem; color: #bbb; font-style: italic; text-align: center; padding: 6px 0; }

/* ── Fælles farvesæt widget ──────────────────────────────────────── */
.dfb-of2-faelles-list { display: flex; flex-direction: column; gap: 8px; }
.dfb-of2-faelles-item {
    border: 1px solid #e5ddd0;
    border-radius: 4px;
    padding: 7px 9px;
    background: #fffdf9;
}
.dfb-of2-faelles-head {
    display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px;
}
.dfb-of2-faelles-navn {
    font-size: 0.85rem; font-weight: 700; color: #1a1a1a; flex: 1;
}
.dfb-of2-faelles-meta {
    font-size: 0.7rem; color: #aaa; font-style: italic; white-space: nowrap;
}
.dfb-of2-faelles-filter {
    font-size: 0.72rem; color: #8b6a3e;
    background: #f5ede0; border-radius: 10px;
    padding: 1px 7px; display: inline-block; margin-bottom: 4px;
}
.dfb-of2-faelles-ord { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.dfb-of2-faelles-tag {
    font-size: 0.75rem; padding: 1px 8px; border-radius: 10px;
    color: #000; border: 1.5px solid;
}
.dfb-of2-kopier {
    background: none; border: 1px solid #8b1a1a; border-radius: 3px;
    color: #8b1a1a; font-family: Georgia, serif; font-size: 0.75rem;
    padding: 3px 9px; cursor: pointer; transition: background .15s, color .15s;
}
.dfb-of2-kopier:hover { background: #8b1a1a; color: #fff; }
.dfb-of2-kopier:disabled { opacity: .5; cursor: default; }
.dfb-of2-faelles-loading { font-size: 0.78rem; color: #aaa; font-style: italic; }

/* Highlight i teksten */
mark.dfb-of2-mark {
    border-radius: 2px; padding: 0 1px;
    font-weight: inherit; font-style: inherit;
    color: #000000;
}

/* ── Modal: Nyt farvesæt ─────────────────────────────────────────── */
.dfb-of2-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999990;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
}
.dfb-of2-modal.show {
    display: flex;
}
.dfb-of2-modal-content {
    background: #fdfbf6;
    width: 90%;
    max-width: 420px;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid #d0c9bb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dfb-of2-modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e6dfce;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5ede0;
}
.dfb-of2-modal-body {
    padding: 1.2em;
}
.dfb-of2-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6em;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e6dfce;
    background: #faf6ec;
}
.dfb-of2-btn-primary,
.dfb-of2-btn-secondary {
    font-family: Georgia, serif;
    font-size: 0.92rem;
    padding: 0.45em 1.1em;
    border-radius: 3px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.dfb-of2-btn-primary {
    background: #8b1a1a;
    color: #fff;
    border: 1px solid #8b1a1a;
}
.dfb-of2-btn-primary:hover {
    background: #6e1414;
    border-color: #6e1414;
}
.dfb-of2-btn-primary:disabled {
    opacity: 0.6;
    cursor: default;
}
.dfb-of2-btn-secondary {
    background: transparent;
    color: #555;
    border: 1px solid #c9bfa8;
}
.dfb-of2-btn-secondary:hover {
    background: #f0e8d6;
    color: #1a1a1a;
}
