/* 2 · Call import: the phone system's recordings on the left, the calls the app imports from them on the right. */
.cm-import h2 { max-width: none; }
.cm-import .cm-main { grid-template-rows: auto 1fr auto; gap: .9cqw; }

/* The bar: the connection, and the count the dashboard totals use. */
.cm-import .im-conn { margin-left: auto; padding: .26cqw .75cqw; font-size: .88cqw; }
.cm-import .im-conn i { width: .55cqw; height: .55cqw; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 .2cqw rgb(47 107 58 / 22%); }
.cm-import .im-count { position: relative; display: flex; align-items: center; gap: .75cqw; padding: .42cqw 1.1cqw .42cqw .9cqw; border-radius: .9cqw; background: #fff; box-shadow: 0 0 0 1px var(--app-line); }
.cm-import .im-count b { min-width: 5.4cqw; font: 750 2.1cqw/1 var(--display); letter-spacing: -.035em; text-align: right; font-variant-numeric: tabular-nums; }
.cm-import .im-count > span { display: grid; font-size: .8cqw; line-height: 1.3; color: var(--app-mute); }
.cm-import .im-count strong { font-size: .9cqw; font-weight: 650; color: var(--ink); }
.cm-import .im-count em { position: absolute; top: -.85cqw; right: .8cqw; padding: .1cqw .55cqw; border-radius: 99cqw; background: var(--amber-soft); color: var(--amber); box-shadow: 0 0 0 .12cqw #fff; font-size: .76cqw; font-style: normal; font-weight: 700; animation: d-rise .4s ease-out both; }
.cm-import .im-count.is-bump { animation: im-bump .9s ease-out; }
@keyframes im-bump { from { box-shadow: 0 0 0 .3cqw rgb(4 120 87 / 26%), 0 0 0 1px var(--app-line); background: var(--emerald-soft); } }

/* Two panes: the phone system's feed, narrow, and the app's list of imported calls. */
.cm-import .im-panes { display: grid; grid-template-columns: 22cqw minmax(0, 1fr); gap: 1.2cqw; min-height: 0; }
.cm-import .im-feed, .cm-import .im-list { display: grid; grid-template-rows: auto 1fr; min-height: 0; border-radius: 1cqw; overflow: hidden; }
.cm-import .im-feed { background: rgb(41 59 51 / 6%); box-shadow: inset 0 0 0 1px var(--app-line); }
.cm-import .im-list { background: #fff; box-shadow: 0 0 0 1px var(--app-line); }
.cm-import .im-panes h4 { display: flex; align-items: center; gap: .5cqw; font-size: 1cqw; white-space: nowrap; }
.cm-import .im-panes h4 .ic { width: 1.1cqw; height: 1.1cqw; opacity: .7; }
.cm-import .im-feed > h4 { padding: .8cqw 1cqw .55cqw; }
.cm-import .im-list > header { display: flex; align-items: center; justify-content: space-between; padding: .8cqw 1.1cqw .6cqw; }
.cm-import .im-list > header > span { font-size: .84cqw; color: var(--app-mute); }
.cm-import .im-recs, .cm-import .im-rows { display: flex; flex-direction: column; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 calc(100% - 2.4cqw), transparent); mask-image: linear-gradient(#000 calc(100% - 2.4cqw), transparent); }
.cm-import .im-recs { gap: .5cqw; padding: 0 .8cqw .8cqw; }
.cm-import .im-in { animation: d-rise .45s ease-out both; }

/* A recording, as the phone system hands it over. */
.cm-import .im-day { padding: .15cqw .2cqw 0; font-size: .8cqw; font-weight: 650; color: var(--app-mute); }
.cm-import .im-rec { flex: none; display: grid; gap: .28cqw; padding: .55cqw .75cqw .6cqw; border-radius: .75cqw; background: #fff; box-shadow: 0 0 0 1px var(--app-line); font-size: .84cqw; line-height: 1.3; transition: box-shadow .3s, background .3s; }
.cm-import .im-rec.is-new { box-shadow: 0 0 0 .14cqw var(--app-accent), 0 .6cqw 1.3cqw -.7cqw rgb(150 70 78 / 55%); }
.cm-import .im-rec.is-dup { background: #fffaf1; box-shadow: 0 0 0 1px rgb(138 85 8 / 32%); }
.cm-import .im-rec-top { display: flex; align-items: center; gap: .45cqw; }
.cm-import .im-rec-top > .ic { width: 1.05cqw; height: 1.05cqw; opacity: .6; }
.cm-import .im-rec-top b { font-size: 1cqw; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-import .im-rec-top > span:not(.cm-chip) { color: var(--app-mute); font-variant-numeric: tabular-nums; }
.cm-import .im-rec-top .cm-chip { margin-left: auto; padding: .08cqw .5cqw; font-size: .76cqw; }
.cm-import .im-rec-top .cm-chip .ic { width: .85cqw; height: .85cqw; }
.cm-import .im-rec-top .cm-chip.is-accent i { width: .5cqw; height: .5cqw; border-radius: 50%; background: currentColor; animation: im-blink 1.2s ease-in-out infinite; }
.cm-import .im-ref { font-size: .8cqw; letter-spacing: .01em; color: var(--app-mute); font-variant-numeric: tabular-nums; }
.cm-import .im-rec dl { display: grid; grid-template-columns: 1fr 1fr; gap: .6cqw; margin: 0; }
.cm-import .im-rec dt { font-size: .72cqw; font-weight: 550; color: var(--app-mute); }
.cm-import .im-rec dd { margin: 0; font-size: .84cqw; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes im-blink { 50% { opacity: .3; } }

/* An imported call: who, which lead, when, the review; under it the steps the call has been through. */
.cm-import .im-call { position: relative; flex: none; display: grid; grid-template-columns: 12.6cqw minmax(0, 1fr) 9.4cqw 11.6cqw; align-items: center; gap: .45cqw .9cqw; padding: .7cqw 1.1cqw .75cqw; border-top: 1px solid var(--app-line); background: #fff; }
.cm-import .im-call.is-ghost > * { visibility: hidden; }
.cm-import .im-call.is-dupflash { animation: im-dup 1.2s ease-out; }
@keyframes im-dup { from { background-color: #f8e3c2; } }
.cm-import .im-call.is-flash { animation: im-flash 1s ease-out; }
@keyframes im-flash { from { background-color: rgb(4 120 87 / 14%); } }
.cm-import .im-who, .cm-import .im-lead, .cm-import .im-when { display: grid; min-width: 0; line-height: 1.3; }
.cm-import .im-who { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .55cqw; }
.cm-import .im-who > span:last-child { display: grid; min-width: 0; }
.cm-import .im-call b { overflow: hidden; font-size: .98cqw; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cm-import .im-call small { overflow: hidden; font-size: .8cqw; color: var(--app-mute); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cm-import .im-num { display: inline-grid; place-items: center; width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: rgb(41 59 51 / 8%); color: var(--app-mute); }
.cm-import .im-num .ic { width: .95cqw; height: .95cqw; }
.cm-import .im-who.is-pop { animation: im-pop .45s ease-out; transform-origin: left center; }
.cm-import .im-res { display: flex; align-items: center; justify-content: flex-end; gap: .45cqw; min-width: 0; }
.cm-import .im-res .cm-score { min-width: 2.3cqw; }
.cm-import .im-res .cm-score.is-none { padding-inline: 0; font-size: .84cqw; }
.cm-import .im-wait { font-size: .84cqw; color: var(--app-mute); }
.cm-import .im-steps { grid-column: 1 / 4; display: flex; gap: .35cqw; }
.cm-import .im-steps li { display: inline-flex; align-items: center; gap: .28cqw; padding: .1cqw .55cqw; border-radius: 99cqw; font-size: .78cqw; font-weight: 650; line-height: 1.35; white-space: nowrap; color: #8a8f8b; box-shadow: inset 0 0 0 1px rgb(41 59 51 / 16%); transition: background .25s, color .25s; }
.cm-import .im-steps li .ic { width: .82cqw; height: .82cqw; stroke-width: 2.6; }
.cm-import .im-steps li.is-on { background: var(--good-soft); color: var(--good); box-shadow: none; }
.cm-import .im-steps li.is-doing { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.cm-import .im-steps li.is-doing::before { content: ""; width: .45cqw; height: .45cqw; border-radius: 50%; background: currentColor; animation: im-blink .9s ease-in-out infinite; }
.cm-import .im-steps li.is-pop { animation: im-pop .5s ease-out; }
@keyframes im-pop { 40% { transform: scale(1.1); } }
.cm-import .im-tx-btn { grid-column: 4; justify-self: end; display: inline-flex; align-items: center; gap: .35cqw; padding: .12cqw .55cqw; border: 0; border-radius: .5cqw; background: none; color: var(--app-accent); font-size: .82cqw; font-weight: 650; }
.cm-import .im-tx-btn .ic { width: .95cqw; height: .95cqw; }
.cm-import .im-tx-btn:hover, .cm-import .im-tx-btn[aria-expanded="true"] { background: var(--app-accent-soft); }
.cm-import .im-tx-btn:focus-visible { outline: .2cqw solid var(--rose); outline-offset: .1cqw; }

/* The transcript preview, opened under its call. */
.cm-import .im-tx { grid-column: 1 / -1; min-height: calc(var(--n, 3) * 1.45cqw + 1.05cqw); border-radius: .7cqw; background: var(--app-bg); box-shadow: inset 0 0 0 1px var(--app-line); overflow: hidden; }
.cm-import .im-tx.im-in { animation: im-open .4s ease-out both; }
@keyframes im-open { from { opacity: 0; min-height: 0; max-height: 0; } to { opacity: 1; max-height: 12cqw; } }
.cm-import .im-tx ol { display: grid; gap: .22cqw; padding: .5cqw .8cqw; }
.cm-import .im-tx li { display: grid; grid-template-columns: 2.3cqw 3.4cqw minmax(0, 1fr); gap: .45cqw; font-size: .86cqw; line-height: 1.43; }
.cm-import .im-tx time { color: var(--app-mute); font-variant-numeric: tabular-nums; }
.cm-import .im-tx li b { font-size: .86cqw; color: var(--app-accent); }
.cm-import .im-tx li.is-founder b { color: #3d5c45; }
.cm-import .im-tx li span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cm-import .im-tx li.is-founder span { font-weight: 600; }

/* The match, shown when the caller ID is recognised. */
.cm-import .im-match { position: absolute; z-index: 4; left: .7cqw; top: calc(100% - .35cqw); display: grid; gap: .25cqw; max-width: 36cqw; padding: .6cqw .95cqw .65cqw; border-radius: .8cqw; background: var(--ink); color: var(--paper); font-size: .92cqw; line-height: 1.35; box-shadow: 0 .9cqw 1.8cqw -.7cqw rgb(15 26 21 / 60%); animation: d-rise .4s ease-out both; }
.cm-import .im-match::before { content: ""; position: absolute; top: -.45cqw; left: 1.5cqw; border: .45cqw solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.cm-import .im-match p { display: flex; align-items: center; gap: .45cqw; font-weight: 650; white-space: nowrap; }
.cm-import .im-match p .cm-av { box-shadow: 0 0 0 .12cqw rgb(247 246 244 / 70%); }
.cm-import .im-call .im-match small { font-size: .84cqw; color: rgb(247 246 244 / 80%); white-space: normal; }

/* Sent twice, counted once. */
.cm-import .im-note { grid-column: 1 / -1; display: flex; align-items: center; gap: .5cqw; padding: .38cqw .7cqw; border-radius: .6cqw; background: var(--amber-soft); color: var(--amber); font-size: .9cqw; font-weight: 650; animation: d-rise .4s ease-out both; }
.cm-import .im-note .ic { width: 1.05cqw; height: 1.05cqw; }

/* Calls to the same lead, grouped: each stays its own call. */
.cm-import .im-group { flex: none; margin: .45cqw .6cqw .5cqw; border-radius: .9cqw; background: var(--app-accent-soft); box-shadow: inset 0 0 0 1px rgb(150 70 78 / 22%); }
.cm-import .im-group .im-call:last-child { border-radius: 0 0 .9cqw .9cqw; box-shadow: inset 1px 0 0 rgb(150 70 78 / 22%), inset -1px 0 0 rgb(150 70 78 / 22%), inset 0 -1px 0 rgb(150 70 78 / 22%); }
.cm-import .im-group .im-call { box-shadow: inset 1px 0 0 rgb(150 70 78 / 22%), inset -1px 0 0 rgb(150 70 78 / 22%); }
.cm-import .im-group > header { display: flex; align-items: center; gap: .5cqw; padding: .5cqw .9cqw .45cqw; font-size: .95cqw; color: var(--app-accent); }
.cm-import .im-group > header .ic { width: 1.1cqw; height: 1.1cqw; }
.cm-import .im-group > header b { font-weight: 700; }
.cm-import .im-group > header span { margin-left: auto; font-size: .82cqw; font-weight: 550; color: var(--app-mute); }
.cm-import .im-group .im-call { padding-inline: .9cqw; }
.cm-import .im-group .im-call:first-of-type { border-top-color: rgb(150 70 78 / 18%); }
.cm-import .im-gap { flex: none; display: flex; align-items: center; gap: .8cqw; padding: .45cqw 1.1cqw; border-top: 1px solid var(--app-line); font-size: .82cqw; color: var(--app-mute); }
.cm-import .im-gap::before, .cm-import .im-gap::after { content: ""; flex: 1; border-top: 1px dashed rgb(41 59 51 / 22%); }

/* The line every analysis rests on. */
.cm-import .im-fine { display: flex; align-items: center; gap: .5cqw; font-size: .9cqw; color: var(--app-mute); white-space: nowrap; }
.cm-import .im-fine .ic { width: 1.05cqw; height: 1.05cqw; opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .cm-import .im-in, .cm-import .im-tx.im-in, .cm-import .im-match, .cm-import .im-note, .cm-import .im-count em, .cm-import .im-who,
  .cm-import .im-steps li, .cm-import .im-steps li::before, .cm-import .im-rec-top .cm-chip i, .cm-import .im-call, .cm-import .im-count { animation: none !important; }
}
