/* The shared activity timeline (public/js/timeline.js): used by the Log activity side screen and the lead page.
   Look M4a "Quiet log" (Sami 2026-11-08): a white card only for a log with words to read; its head is small and grey, the feedback is
   the bold content. Everything else is a thin line with no box. One size scale: 26px icons on cards, 22px on lines; text 15 / 13 / 12. */
/* ---- filters: small pills, the picked one dark ---- */
.ls-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.ls-f { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: var(--c-card); font: inherit; font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-text); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.ls-f:hover { background: var(--c-select); border-color: var(--c-muted); }
.ls-f.on { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-card); }
.ls-f:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ls-f small { min-width: 18px; height: 18px; padding: 0 4px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--c-select); font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.ls-f.on small { background: rgba(255, 255, 255, .18); color: var(--c-card); }

/* ---- the list and the day ---- */
.ls-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ls-list > li { min-width: 0; }
.ls-day { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.ls-day:first-child { margin-top: 0; }
.ls-day::before, .ls-day::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.ls-day span { font-size: var(--fs-hint); font-weight: 700; color: var(--c-ink); white-space: nowrap; }

/* ---- a log with words: white card, quiet head, the words as content ---- */
.ls-card { display: block; width: 100%; padding: 10px 14px 12px; border-radius: var(--r-lg); background: var(--c-card); box-shadow: 0 0 0 1px var(--c-line); }
.ls-ev-h { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 26px; }
.ls-ev-h .md-ty, .ls-nic { width: 26px; height: 26px; flex: none; border-radius: 50%; box-shadow: none; background: color-mix(in srgb, var(--tc, var(--c-muted)) 16%, var(--c-card)); }
.ls-ev-h .md-ty svg { width: 14px; height: 14px; }
.ls-nic { display: grid; place-items: center; color: var(--c-muted); }
.ls-res { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-table); font-weight: var(--fw-medium); color: var(--c-muted); }
.ls-res i { margin-inline-start: 6px; font-style: normal; font-weight: 400; color: var(--c-faint); }
.ls-meta { flex: none; font-size: var(--fs-hint); color: var(--c-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ls-meta time { color: var(--c-muted); }
.ls-line { margin: 8px 0 0; font-size: var(--fs-table); color: var(--c-muted); unicode-bidi: plaintext; text-align: start; }
/* feedback: the loud thing. Bold dark Arabic, items split by a faint dot, no chips */
.ls-fb { margin: 8px 0 0; font-family: var(--md-font-ar, var(--font)); font-size: var(--fs-section); line-height: 28px; text-align: start; }
.ls-fb span { font-weight: var(--fw-semibold); color: var(--c-ink); white-space: nowrap; }
.ls-fb span + span::before { content: "·"; margin: 0 8px 0 4px; font-weight: 400; color: var(--c-faint); }
/* the salesperson's words: plain text, a small quote mark where the Arabic starts */
/* plaintext + start: an Arabic note reads from the right, an English one from the left, the quote mark always where it starts */
.ls-note { margin: 6px 0 0; font-family: var(--md-font-ar, var(--font)); font-size: var(--fs-body); line-height: 24px; color: var(--c-text); white-space: pre-wrap; word-break: break-word; unicode-bidi: plaintext; text-align: start; }
.ls-note .ls-q { margin: 0 6px; vertical-align: 1px; color: var(--tint-amber, var(--c-warning)); }

/* ---- a thin line: nothing to read (tries with no answer, stage, assigned, new lead...) ---- */
.ls-thin { padding: 1px 14px; }
.ls-thin .ls-ev-h { min-height: 22px; }
.ls-thin .ls-ev-h .md-ty, .ls-sys-ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: none; color: var(--c-faint); }
.ls-thin .ls-ev-h .md-ty svg { width: 13px; height: 13px; }
.ls-thin .ls-res { font-size: var(--fs-hint); font-weight: 400; }
.ls-thin .ls-meta { font-size: var(--fs-hint); }
.ls-sys.i-stage .ls-sys-ic { color: var(--c-info); }
.ls-sys .ls-res s { color: var(--c-faint); }
.ls-sys .ls-res i { margin: 0 5px; color: var(--c-faint); }
.ls-sys .ls-res .v { color: var(--c-text); }
.ls-sys-x { padding-inline-start: 30px; font-size: var(--fs-hint); color: var(--c-faint); overflow-wrap: anywhere; }
/* 3+ failed calls folded: one line with a "Show N" button, the tries under it */
.ls-grp-b { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px 0 8px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: var(--c-card); font: inherit; font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-ink); cursor: pointer; }
.ls-grp-b:hover { background: var(--c-select); border-color: var(--c-muted); }
.ls-grp-b:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ls-grp-b svg { transition: transform .2s; }
.ls-grp.open .ls-grp-b svg { transform: rotate(180deg); }
.ls-sub { list-style: none; margin: 4px 0 2px 30px; padding: 0; display: grid; gap: 2px; font-size: var(--fs-hint); color: var(--c-muted); }
.ls-sub li { display: flex; gap: 8px; padding: 2px 0; }
.ls-sub li em { margin-inline-start: auto; font-style: normal; color: var(--c-faint); }
.ls-sub li span:last-child { color: var(--c-faint); font-variant-numeric: tabular-nums; }

.ls-more { display: block; margin: 12px auto 0; height: 32px; padding: 0 16px; border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-card); font: inherit; font-size: var(--fs-table); font-weight: var(--fw-semibold); color: var(--c-ink); cursor: pointer; }
.ls-more:hover { background: var(--c-select); }

/* Lead page options: a tools slot beside the pills, Edit / Delete under a note, extra text under a slim line. */
.ls-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ls-bar .ls-filters { margin-bottom: 0; }
.ls-bar-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.ls-tools { display: flex; gap: 6px; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .ls-grp-b svg { transition: none; } }
