/* Анализ звонков ОП — транскрипт → выпадающий список */
.call-viz {
    margin: 2px 0 0;
    --call-aud-color: #fbbf24;
}
.call-viz__head {
    font-size: 0.8125rem;
    color: var(--p-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}
.call-viz__head strong { color: var(--p-text); }
.call-viz__total {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--p-border);
    font-size: 0.8125rem;
    color: var(--p-muted);
}
.call-viz__total strong { color: var(--p-text); }
.call-viz__section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--p-border);
}
.call-viz__section-title {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--p-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.call-score-block {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 4px;
}
.call-score-block__label {
    font-size: 0.5rem;
    font-weight: 500;
    color: var(--p-muted);
    line-height: 1.25;
    text-align: right;
    max-width: 4.75rem;
}
.call-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.call-score--high { background: #14532d44; color: #4ade80; border: 1px solid #22c55e55; }
.call-score--mid { background: #42200644; color: #fbbf24; border: 1px solid #f59e0b55; }
.call-score--low { background: #450a0a44; color: #f87171; border: 1px solid #ef444455; }

/* ——— главный звонок ——— */
.call-main__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 8px;
}
.call-main__title { font-size: 0.75rem; font-weight: 600; color: var(--p-text); }
.call-main__meta { font-size: 0.625rem; color: var(--p-muted); }

/* ——— транскрипт + подсветки ——— */
.call-transcript-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 6px;
    font-size: 0.5625rem;
}
.call-transcript-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--p-muted);
}
.call-transcript-legend__dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
.call-transcript-legend__dot--reg { background: #f87171; }
.call-transcript-legend__dot--q { background: #fbbf24; }

.call-transcript {
    padding: 8px 10px;
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    font-size: 0.625rem;
    color: var(--p-muted);
    line-height: 1.5;
}
.call-transcript--main { margin-top: 0; }
.call-viz__section--transcript { margin-top: 8px; padding-top: 8px; }
.call-transcript--in-dropdown { margin-top: 6px; }

.call-transcript__line {
    margin-bottom: 8px;
    padding: 0;
}
.call-transcript__line:last-child { margin-bottom: 0; }

.call-transcript__utterance {
    margin: 0;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.call-transcript__line--reg .call-transcript__utterance {
    border-color: rgba(248, 113, 113, 0.2);
}
.call-transcript__line--question .call-transcript__utterance {
    border-color: rgba(251, 191, 36, 0.18);
}

.call-transcript__who { font-weight: 600; color: var(--p-text); }
.call-transcript__time {
    font-size: 0.5rem;
    color: var(--p-dim);
    margin-left: 5px;
    font-variant-numeric: tabular-nums;
}
.call-transcript__sep { margin-left: 1px; }
.call-transcript__text { color: var(--p-muted); }

.call-transcript__hl {
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.call-transcript__hl--reg {
    background: rgba(248, 113, 113, 0.45);
    color: #fff1f2;
    outline: 1px solid rgba(248, 113, 113, 0.65);
}
.call-transcript__hl--q {
    background: rgba(251, 191, 36, 0.4);
    color: #fffbeb;
    outline: 1px solid rgba(251, 191, 36, 0.55);
}

.call-transcript__issue {
    margin: 4px 0 0 6px;
    padding: 5px 8px 5px 10px;
    border-radius: 0 4px 4px 0;
    font-size: 0.5625rem;
    line-height: 1.45;
    border-left: 3px solid;
}
.call-transcript__issue--reg {
    background: rgba(127, 29, 29, 0.35);
    border-left-color: #f87171;
    color: #fecaca;
}
.call-transcript__issue--q {
    background: rgba(120, 53, 15, 0.32);
    border-left-color: #fbbf24;
    color: #fde68a;
}
.call-transcript__issue-label {
    display: block;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
    opacity: 0.92;
}
.call-transcript__issue-text { color: inherit; opacity: 0.95; }

/* ——— аудио (статичное), единый цвет ——— */
.call-aud {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 100%;
    box-sizing: border-box;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: 10px;
    padding: 10px 12px;
    --aud-color: var(--call-aud-color);
}
.call-aud--sm { padding: 6px 8px; }
.call-aud__media {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.call-aud__wave-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
}
.call-aud__wave-row .call-aud__wave {
    flex: 1;
    min-width: 0;
}
.call-aud--static .call-aud__play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--aud-color, #fbbf24);
    color: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.95;
}
.call-aud__play svg { width: 12px; height: 12px; margin-left: 2px; }
.call-aud__wave {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1px;
    width: 100%;
    height: 36px;
}
.call-aud__bar {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    border-radius: 2px;
    background: var(--aud-color, #fbbf24);
    opacity: 0.32;
}
.call-aud__bar--played { opacity: 0.95; }
.call-aud__times {
    display: flex;
    justify-content: space-between;
    font-size: 0.5rem;
    color: var(--p-dim);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.call-split2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}
.call-split2__side {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.call-split2__side--qa {
    justify-content: center;
}
.call-qa-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.call-qa-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 6px;
    font-size: 0.5625rem;
    color: var(--p-muted);
}
.call-qa-row__track {
    height: 3px;
    background: var(--p-surface);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--p-border);
    grid-column: 1 / -1;
}
.call-qa-row__fill { height: 100%; border-radius: 99px; }
.call-cards__detail { font-size: 0.625rem; color: var(--p-muted); margin-top: 4px; line-height: 1.35; }
.call-insight { font-size: 0.625rem; color: var(--p-muted); margin-bottom: 6px; }
.call-insight strong { color: var(--p-text); }

/* ——— выпадающий список звонков ——— */
.call-dropdown { display: flex; flex-direction: column; gap: 4px; }

.call-dropdown__item {
    border: 1px solid var(--p-border);
    border-radius: 8px;
    background: var(--p-surface);
    overflow: hidden;
}
.call-dropdown__item[open] { border-color: rgba(167, 139, 250, 0.35); }

.call-dropdown__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    font-size: 0.6875rem;
    color: var(--p-text);
    min-height: 44px;
}
.call-dropdown__summary::-webkit-details-marker { display: none; }
.call-dropdown__summary::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-left: auto;
    flex-shrink: 0;
    border-right: 1.5px solid var(--p-muted);
    border-bottom: 1.5px solid var(--p-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-top: -2px;
}
.call-dropdown__item[open] .call-dropdown__summary::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.call-dropdown__av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.call-dropdown__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.call-dropdown__mgr { font-weight: 600; line-height: 1.3; }
.call-dropdown__sub {
    display: block;
    margin-top: 1px;
    font-size: 0.5625rem;
    color: var(--p-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.call-dropdown__flags {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.call-dropdown__flag {
    font-size: 0.5rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}
.call-dropdown__flag--reg { color: #fca5a5; background: rgba(127, 29, 29, 0.4); }
.call-dropdown__flag--q { color: #fcd34d; background: rgba(120, 53, 15, 0.4); }

.call-dropdown__body {
    padding: 10px;
    border-top: 1px solid var(--p-border);
}

.call-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.call-chips__item {
    font-size: 0.5625rem;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    color: var(--p-muted);
}
.call-chips__item--bad { border-color: #ef444455; color: #f87171; }

.call-mgr-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.call-mgr-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px 3px 4px;
    border-radius: 999px;
    border: 1px solid var(--p-border);
    background: var(--p-surface);
    font-size: 0.5625rem;
    color: var(--p-muted);
}
.call-mgr-chip--active { border-color: #a78bfa88; color: #f4f4f5; }
.call-mgr-chip__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 700;
    color: #fff;
}

/* ——— мобилка: шапка звонка не сжимается в одну полоску ——— */
@media (max-width: 640px) {
    .call-dropdown__summary {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 10px;
        row-gap: 6px;
        align-items: start;
        padding: 10px 12px;
        min-height: 0;
    }

    .call-dropdown__av {
        grid-row: 1 / span 2;
        align-self: start;
        width: 28px;
        height: 28px;
        margin-top: 1px;
    }

    .call-dropdown__info {
        grid-column: 2;
        grid-row: 1;
        gap: 3px;
        min-width: 0;
    }

    .call-dropdown__mgr {
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .call-dropdown__sub {
        margin-top: 0;
        white-space: normal;
        line-height: 1.35;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .call-dropdown__summary::after {
        grid-column: 3;
        grid-row: 1;
        margin: 6px 0 0;
        align-self: start;
    }

    .call-dropdown__item[open] .call-dropdown__summary::after {
        margin-top: 8px;
    }

    .call-dropdown__flags {
        grid-column: 2;
        grid-row: 2;
        flex-wrap: wrap;
        align-self: center;
    }

    .call-score-block {
        grid-column: 3;
        grid-row: 2;
        flex-direction: row;
        align-items: center;
        justify-self: end;
        align-self: center;
        margin-left: 0;
        gap: 5px;
        max-width: 100%;
    }

    .call-score-block__label {
        max-width: none;
        text-align: left;
        white-space: normal;
        line-height: 1.2;
        font-size: 0.46875rem;
    }

    .call-split2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
