/* TextCompare — tool-specific styles.
   Shared styles (nav, panels, buttons) live in ../../css/style.css */

.tx { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Toolbar ---------- */
.tx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tx-bar-group { display: flex; align-items: center; gap: 10px; }
.tx-bar-right { margin-left: auto; gap: 8px; }

.tx-count { color: #74747e; font-size: .8rem; }
.tx-count strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-count-add strong { color: #22c55e; }
.tx-count-del strong { color: #ef4444; }

.tx-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #74747e;
  font-size: .76rem;
  cursor: pointer;
}
.tx-toggle input { accent-color: var(--pink); width: 14px; height: 14px; cursor: pointer; }
.tx-toggle:hover { color: #c4c4cc; }

/* ---------- Inputs ---------- */
.tx-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tx-pane { display: flex; flex-direction: column; min-width: 0; }

.tx-pane textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  display: block;
  background: transparent;
  border: none;
  padding: 13px 15px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.6;
  outline: none;
}
.tx-pane textarea::placeholder { color: #4a4a52; }

/* ---------- Diff ---------- */
.tx-diff {
  max-height: 55vh;
  overflow: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.65;
}
.tx-diff:empty::after {
  content: "Paste two texts above to see what changed.";
  display: block;
  padding: 26px 16px;
  text-align: center;
  color: #4a4a52;
  font-family: "Inter", system-ui, sans-serif;
  font-size: .85rem;
}

.tx-line { display: flex; align-items: flex-start; }
.tx-line.is-add { background: rgba(34, 197, 94, .09); }
.tx-line.is-del { background: rgba(239, 68, 68, .09); }

.tx-num {
  flex: none;
  width: 42px;
  padding: 0 8px;
  text-align: right;
  color: #4a4a52;
  font-size: .72rem;
  line-height: 1.65;
  user-select: none;
  border-right: 1px solid #18181c;
}
.tx-sign {
  flex: none;
  width: 24px;
  text-align: center;
  color: #5c5c66;
  user-select: none;
}
.tx-line.is-add .tx-sign { color: #22c55e; }
.tx-line.is-del .tx-sign { color: #ef4444; }

.tx-text {
  flex: 1;
  min-width: 0;
  padding-right: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c4c4cc;
}
.tx-line.is-same .tx-text { color: #74747e; }
.tx-line.is-add .tx-text,
.tx-line.is-del .tx-text { color: var(--text); }

.tx-empty { padding: 26px 16px; text-align: center; color: #5c5c66; font-size: .85rem; }

@media (max-width: 760px) {
  .tx-inputs { grid-template-columns: 1fr; }
  .tx-pane textarea { min-height: 150px; }
  .tx-bar-right { margin-left: 0; }
  .tx-num { width: 34px; padding: 0 5px; }
}
