/* ─────────────────────────────────────────────────────────────────────────────
   Journal-tidslinje — kronologisk venstremenu i AI-svar-popuppen.

   Erstatter den foldbare kategori-menu med én tidslinje: farvekode pr.
   notattype (prik), klikbare tekst-filtre (ingen boks) og et hover-uddrag
   af chunken. Markup i Home.razor (.jtl-*), logik i MF_JournalTimeline.cs,
   hover-positionering i js/journalTimelineInterop.js.
   ───────────────────────────────────────────────────────────────────────────── */

/* Variant A: hvid-domineret popup med en anelse blåt i nederste højre hjørne. */
.journal-answer-modal--split {
    background:
        radial-gradient(82% 96% at 100% 100%,
            rgba(197, 221, 245, 0.62) 0%,
            rgba(228, 240, 251, 0.34) 22%,
            rgba(255, 255, 255, 0) 47%),
        #ffffff;
}

/* ─── Filtre: ren klikbar tekst (prik + label) ─────────────────────────────── */
.jtl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin: 10px 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(47, 108, 143, 0.12);
}

.jtl-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #5a6f85;
    cursor: pointer;
    user-select: none;
    transition: color 0.12s ease, opacity 0.12s ease;
}
.jtl-filter-label { border-bottom: 1.5px solid transparent; padding-bottom: 1px; }
.jtl-filter:hover .jtl-filter-label { border-bottom-color: rgba(47, 108, 143, 0.35); }
.jtl-filter:focus-visible { outline: none; }
.jtl-filter:focus-visible .jtl-filter-label { border-bottom-color: rgba(47, 108, 143, 0.6); }
.jtl-filter.is-on { color: #15405e; }
.jtl-filter.is-on .jtl-filter-label { font-weight: 600; border-bottom-color: currentColor; }
.jtl-filter.is-dim { opacity: 0.4; }

.jtl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ─── Kronologisk liste ─────────────────────────────────────────────────────── */
.jtl-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 8px 12px;
}

.jtl-month {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #8496ab;
    margin: 12px 6px 2px;
}
.jtl-month:first-child { margin-top: 2px; }

.jtl-note {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: 8px;
    padding-right: 4px;
}
.jtl-note:hover { background: rgba(47, 108, 143, 0.06); }
.jtl-note.is-active { background: rgba(47, 108, 143, 0.15); }
.jtl-note.is-kbfocus { box-shadow: inset 0 0 0 1.5px rgba(47, 108, 143, 0.55); }

.jtl-note-open {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    padding: 6px 4px 6px 8px;
    cursor: pointer;
}
.jtl-note-date {
    font-size: 0.74rem;
    color: #6a82a0;
    width: 34px;
    flex-shrink: 0;
}
.jtl-note-title {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    color: #33526f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jtl-note.is-active .jtl-note-title { color: #15405e; font-weight: 600; }

/* Eksport-markering: diskret flueben — vises ved hover/fokus eller når valgt. */
.jtl-note-pick {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #9bb0c6;
    font-size: 0.9rem;
    line-height: 1;
    padding: 4px 5px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease, color 0.12s ease;
}
.jtl-note:hover .jtl-note-pick,
.jtl-note:focus-within .jtl-note-pick { opacity: 1; }
.jtl-note-pick:hover { color: #2f6c8f; }
.jtl-note.is-checked .jtl-note-pick { opacity: 1; color: #2f6c8f; }

/* ─── Hover-kort (fixed, positioneret af journalTimelineInterop.js) ─────────── */
.jtl-hovercard {
    position: fixed;
    z-index: 95;
    width: 250px;
    background: #fff;
    border: 1px solid rgba(47, 108, 143, 0.2);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(21, 50, 74, 0.18);
    padding: 10px 12px;
    pointer-events: none;
    animation: fp-fade-in 120ms ease both;
}
.jtl-hovercard-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.jtl-hovercard-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.jtl-hovercard-body { font-size: 0.78rem; line-height: 1.5; color: #4a5f76; }

/* Vigtigste/Vis alle-toggle over tidslinjen */
.jtl-view-toggle {
    margin: 4px 12px 2px;
    padding: 6px 10px;
    border: 1px solid rgba(47, 108, 143, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: #2a4d6c;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.jtl-view-toggle:hover { background: #fff; color: #15405e; }
