/* Diff Checker — a toolbar bar (view, ignore options, swap), the two input
   panes side by side as cards, then the result card: stat pills, the diff
   body as a flush row, an empty state and a warning caption (layout from
   styles/components/form.css). The text areas are styles/components/editor.css
   panes, counts use styles/components/text-output.css, and stat pills
   styles/components/tag.css; only the options and
   the diff lines are the page's own. */

textarea.dc-textarea {
  min-height: 200px;
}

/* Ignore options in the bar */
.dc-opt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Stat pills — the first row of the result card */
.dc-stats {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-2);
}
/* Diff body */
.dc-result {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}

.dc-line {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
}
.dc-gutter {
  flex-shrink: 0;
  width: 48px;
  padding: 1px 8px;
  text-align: right;
  color: var(--text-quaternary);
  background: var(--bg-elev-2);
  user-select: none;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
}
.dc-sign {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  user-select: none;
  color: var(--text-muted);
}
.dc-text {
  flex: 1;
  min-width: 0;
  padding: 1px 12px 1px 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  tab-size: 4;
}
.dc-text:empty::after { content: " "; white-space: pre; }

.dc-line--add { background: var(--success-soft); }
.dc-line--add .dc-sign { color: var(--success); }
.dc-line--del { background: var(--danger-soft); }
.dc-line--del .dc-sign { color: var(--danger); }
.dc-line--eq:hover { background: var(--bg-hover); }

/* Intra-line change marker: a solid, saturated same-hue chip over the soft
   line background. Two-level emphasis — line = "this line changed",
   chip = "exactly these characters changed". Strong enough to read at a glance
   against the already-tinted line; weight bumped, no layout-shifting padding
   (padding would break monospace alignment in the pre-wrapped text). */
.dc-chg { border-radius: 3px; font-weight: 600; }
.dc-line--del .dc-chg,
.dc-side--del .dc-chg { background: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--text); }
.dc-line--add .dc-chg,
.dc-side--add .dc-chg { background: color-mix(in srgb, var(--success) 52%, transparent); color: var(--text); }

/* Split view: two columns side by side */
.dc-result.is-split .dc-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.dc-result.is-split .dc-side {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  border-right: 1px solid var(--sep);
}
.dc-result.is-split .dc-side:last-child { border-right: none; }
.dc-side--add { background: var(--success-soft); }
.dc-side--del { background: var(--danger-soft); }
.dc-side--empty { background: var(--bg-elev-2); }

@media (max-width: 680px) {
  .dc-result.is-split .dc-line { grid-template-columns: 1fr; }
  .dc-result.is-split .dc-side:first-child { border-right: none; border-bottom: 1px solid var(--sep); }
}
