/* ==================== СРАВНЕНИЕ ТЕКСТОВ ====================
   Независимый раздел — посимвольный diff версий транскрибации.
   Переиспользует классы из app.css / transcriptions.css (.card, .btn, .form-*, .empty-state,
   .dialog-list-item, .tr-step-title, .tr-preview-table*, плашки .tc-privacy-note и .tc-summary-*);
   здесь — только то, чего там ещё нет. */

.tc-privacy-note { margin: 0 0 14px; font-size: 13px; line-height: 18px; padding: 8px 12px; }

.tc-versions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.tc-version-card {
    border: 1px solid rgb(var(--border));
    border-radius: var(--radius-control);
    background: rgb(var(--surface-raised) / 0.4);
    padding: 12px 14px;
}

.tc-version-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tc-version-head .form-input {
    flex: 1;
    font-weight: 500;
}

.tc-version-card .form-textarea { resize: vertical; }

.tc-compare-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.tc-compare-row .form-select, .tc-compare-row .form-input { width: auto; }

.tc-compare-arrow {
    display: inline-flex;
    color: rgb(var(--ink-faint));
}

.tc-result { margin-top: 10px; }

.tc-summary-ok, .tc-summary-diff { margin: 0 0 12px; font-weight: 500; }

.tc-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.tc-legend {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgb(var(--ink-muted));
}

.tc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tc-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Цвета разницы: «удалено» — жёлтый с зачёркиванием, «добавлено» — зелёный. В тёмной теме — те же оттенки,
   но полупрозрачные поверх тёмного фона: текст остаётся светлым и читаемым. */
:root { --tc-del: #ffef70; --tc-del-line: #7a5c00; --tc-ins: #8ee6a8; }
html.dark { --tc-del: rgb(234 179 8 / 0.35); --tc-del-line: #fde68a; --tc-ins: rgb(34 197 94 / 0.35); }

.tc-swatch-del { background: var(--tc-del); }
.tc-swatch-ins { background: var(--tc-ins); }

.tc-nav-buttons {
    display: flex;
    gap: 8px;
}

.tc-output {
    border: 1px solid rgb(var(--border));
    border-radius: var(--radius-control);
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    max-height: 60vh;
    overflow-y: auto;
    background: rgb(var(--surface-raised) / 0.5);
}

/* Совпадающая часть текстов — как обычно, без выделения */
.tc-output span { color: rgb(var(--ink)); }

/* Удалено из версии A: жёлтый фон + зачёркивание — как на text.num2word.ru */
.tc-output del.tc-del,
.tc-output .tc-del {
    background: var(--tc-del);
    text-decoration: line-through;
    text-decoration-color: var(--tc-del-line);
    border-radius: 2px;
}

/* Добавлено в версии B: зелёный фон, без зачёркивания */
.tc-output ins.tc-ins,
.tc-output .tc-ins {
    background: var(--tc-ins);
    text-decoration: none;
    border-radius: 2px;
}

.tc-change-active {
    outline: 2px solid rgb(var(--brand));
    outline-offset: 1px;
}

.tc-matrix-table th, .tc-matrix-table td { text-align: center; }
.tc-matrix-table thead th:first-child { background: rgb(var(--surface-2)); }

.tc-matrix-table tbody th {
    position: static;
    text-align: left;
    white-space: nowrap;
    background: rgb(var(--surface-2));
    border-bottom: 1px solid rgb(var(--border));
}

.tc-matrix-diag {
    color: rgb(var(--ink-faint));
    background: rgb(var(--surface-2) / 0.5);
}

.tc-matrix-high { background: rgb(var(--success) / 0.14); color: rgb(var(--success)); font-weight: 600; }
.tc-matrix-mid  { background: rgb(var(--warning) / 0.14); color: rgb(var(--warning)); font-weight: 600; }
.tc-matrix-low  { background: rgb(var(--danger) / 0.12); color: rgb(var(--danger)); font-weight: 600; }
