/* ===========================================================
   TEXT DIFF STYLES
=========================================================== */
.td-root .td-body {
  flex-direction: column; gap: 4px;
}
.td-inputs {
  display: flex; gap: 4px; flex-shrink: 0;
  height: 28%; min-height: 100px;
}
.td-inputs .t-pane { flex: 1; }
.td-inputs textarea {
  white-space: pre; word-wrap: normal; overflow-wrap: normal;
  overflow: auto;
}

.td-output-pane {
  flex: 1; min-height: 0;
}
.td-output {
  flex: 1; overflow: auto;
  background: #ffffff;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px; line-height: 1.4;
  min-height: 0;
}

/* Side-by-side */
.td-side-wrap {
  display: flex; height: 100%; min-height: 0;
}
.td-side {
  flex: 1; overflow: auto;
  background: #ffffff;
  border-right: 1px solid #c0c0c0;
}
.td-side:last-child { border-right: none; }

.td-row {
  display: flex; align-items: baseline;
  line-height: 1.4;
  min-height: 1.4em;
  border-bottom: 1px solid transparent;
}
.td-row .ln {
  flex: 0 0 36px; text-align: right;
  padding: 0 4px; background: #e8e8e8;
  color: #808080; user-select: none;
  border-right: 1px solid #c0c0c0;
  font-size: 11px;
}
.td-row .gutter {
  flex: 0 0 16px; text-align: center;
  background: #e8e8e8; color: #808080;
  font-weight: bold; user-select: none;
  border-right: 1px solid #c0c0c0;
  font-size: 11px;
}
.td-row .ct {
  flex: 1; padding: 0 6px;
  white-space: pre; overflow: visible;
}

/* Type colors */
.td-row.add { background: #d4f4d4; }
.td-row.add .ln { background: #a4e4a4; color: #004000; }
.td-row.add .gutter { background: #a4e4a4; color: #006000; }
.td-row.del { background: #f4d4d4; }
.td-row.del .ln { background: #e4a4a4; color: #500000; }
.td-row.del .gutter { background: #e4a4a4; color: #800000; }
.td-row.chg { background: #fff4d0; }
.td-row.chg .ln { background: #ffe4a0; color: #604000; }
.td-row.chg .gutter { background: #ffe4a0; color: #806000; }

.td-row.placeholder { background: #f4f4f4; }
.td-row.placeholder .ln,
.td-row.placeholder .gutter { background: #ececec; color: transparent; }

/* word-level inline highlights inside changed rows */
.td-row .ct .td-word-del {
  background: #f4a4a4; color: #500000;
  border-radius: 2px; padding: 0 1px;
}
.td-row .ct .td-word-add {
  background: #a4e4a4; color: #004000;
  border-radius: 2px; padding: 0 1px;
}

/* Unified view */
.td-unified {
  height: 100%; overflow: auto; background: #ffffff;
}

/* Summary in pane title */
.td-summary {
  font-family: "Courier New", monospace;
  font-size: 11px; font-weight: normal;
  color: #cce4ff;
  margin-left: 8px;
}
