/* Text & File Comparer — matches the Deecliq Data Transfer shape, with a
   two-panel input stage standing in for the usual dropzone+modal. */
.tdc-fit.tdc-scope {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 1600px; margin: 0 auto;
  padding: 90px 4vw 60px;
}

.tdc-hero { text-align: center; flex-shrink: 0; }
.tdc-hero h1 {
  font-size: 1.5rem !important; font-weight: 800 !important;
  color: var(--brand, #6366f1) !important;
  margin: 0 0 4px !important;
}
#tdcScope .tdc-hero p {
  font-size: .85rem !important; color: var(--txt-2, #64748b) !important;
  margin: 0 !important;
}

#tdcScope .tdc-card {
  max-width: 100% !important; width: 100%;
  padding: 24px 32px !important;
  background: var(--page-bg, #f8fafc) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  box-shadow: none !important;
  margin: 0 auto !important;
}
.tdc-input-view { display: flex; flex-direction: column; gap: 16px; }

.tdc-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tdc-panel {
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px;
}
.tdc-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: .85rem; color: var(--txt, #0f172a);
}
.tdc-mode-toggle { display: flex; gap: 4px; }
.tdc-mode-btn {
  padding: 4px 10px; border-radius: 7px; font-size: .76rem; font-weight: 700;
  background: var(--page-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0);
  color: var(--txt-2, #64748b); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tdc-mode-btn.active { background: var(--brand, #6366f1); color: #fff; border-color: var(--brand, #6366f1); }

.tdc-textarea {
  width: 100%; min-height: 260px; resize: vertical;
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  background: var(--page-bg, #f8fafc); color: var(--txt, #0f172a);
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: .82rem; line-height: 1.5;
  padding: 12px;
}
.tdc-textarea:focus { outline: none; border-color: var(--brand, #6366f1); }

.tdc-dropzone {
  min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; border: 2px dashed var(--brand, #6366f1); border-radius: 10px;
  cursor: pointer; text-align: center; color: var(--txt, #0f172a);
  transition: border-color .2s ease, background .2s ease;
}
.tdc-dropzone:hover, .tdc-dropzone.tdc-dragover {
  border-color: var(--brand-dark, #4f46e5); background: rgba(99,102,241,.05);
}
.tdc-dropzone i { color: var(--brand, #6366f1); font-size: 2rem; }
.tdc-drop-title { font-weight: 700; margin-top: 10px; font-size: .9rem; }
.tdc-drop-sub { font-size: .76rem; opacity: .65; margin-top: 4px; color: var(--txt-2, #64748b); }

.tdc-file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--page-bg, #f8fafc); border: 1px solid var(--border, #e2e8f0);
}
.tdc-file-row i { color: var(--brand, #6366f1); }
.tdc-file-row span { flex: 1; min-width: 0; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdc-file-remove {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--red, #ef4444); border: none; border-radius: 50%;
  color: #fff; font-size: .72rem; cursor: pointer;
}
.tdc-file-remove:hover { background: #dc2626; }

.tdc-options { display: flex; flex-wrap: wrap; gap: 18px; }
.tdc-checkbox-item {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 600; color: var(--txt, #0f172a);
  cursor: pointer; user-select: none;
}
.tdc-checkbox-item input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.tdc-checkbox-box {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 2px solid var(--border, #e2e8f0);
  display: inline-block; position: relative;
  transition: border-color .15s ease, background .15s ease;
}
.tdc-checkbox-item input[type="checkbox"]:checked + .tdc-checkbox-box {
  border-color: var(--brand, #6366f1); background: var(--brand, #6366f1);
}
.tdc-checkbox-item input[type="checkbox"]:checked + .tdc-checkbox-box::after {
  content: '\2713'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .68rem; font-weight: 800;
}

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }

#tdcScope #tdcCompareBtn,
#tdcScope #tdcExportBtn {
  background: linear-gradient(135deg, var(--brand, #6366f1), var(--brand-dark, #4f46e5));
  border: none; padding: 13px 26px; font-weight: 700; font-size: .95rem;
  border-radius: 12px; box-shadow: 0 10px 24px rgba(99,102,241,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#tdcScope #tdcCompareBtn:hover, #tdcScope #tdcExportBtn:hover {
  transform: translateY(-2px); box-shadow: 0 14px 30px rgba(99,102,241,.45);
}
#tdcScope .btn-warning { padding: 13px 26px; font-weight: 700; font-size: .95rem; border-radius: 12px; }

.tdc-error {
  margin-top: 4px; padding: 10px 14px; border-radius: 10px;
  background: var(--page-bg, #f8fafc); border: 1px dashed var(--brand, #6366f1);
  color: var(--txt, #0f172a); font-size: .85rem;
}

@media (max-width: 760px) {
  .tdc-panels { grid-template-columns: 1fr; }
}

/* ── Processing screen — simpler single-ring variant (no step icons; this
   tool's work is just "read → diff → render", over almost instantly). ── */
.tdc-processing { padding: 30px 0; text-align: center; }
.tdc-ring-wrap { position: relative; width: 120px; height: 120px; margin: 0 auto 16px; }
.tdc-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.tdc-ring-track { fill: none; stroke: var(--border, #e2e8f0); stroke-width: 8; }
.tdc-ring-fill {
  fill: none; stroke: var(--brand, #6366f1); stroke-width: 8;
  stroke-linecap: round; transition: stroke-dashoffset .2s ease;
  filter: drop-shadow(0 0 6px rgba(99,102,241,.45));
}
.tdc-ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--txt, #0f172a); }
.tdc-ring-count { font-size: 1.8rem; line-height: 1; }
.tdc-ring-percent { font-size: 1rem; opacity: .7; margin-left: 2px; }
.tdc-progress-text { font-size: .85rem; font-weight: 600; color: var(--txt, #0f172a); }

/* ── Result: stats + side-by-side diff ── */
.tdc-result-view { display: flex; flex-direction: column; gap: 16px; }
.tdc-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.tdc-change-nav {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.tdc-nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  color: var(--txt, #0f172a); font-size: .82rem; font-weight: 700; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tdc-nav-btn:hover { background: var(--brand, #6366f1); color: #fff; border-color: var(--brand, #6366f1); }
.tdc-nav-btn:disabled { opacity: .45; cursor: default; }
.tdc-nav-btn:disabled:hover { background: var(--surface, #fff); color: var(--txt, #0f172a); }
.tdc-change-counter { font-size: .82rem; color: var(--txt-2, #64748b); font-weight: 700; min-width: 60px; text-align: center; }
.tdc-stat-card {
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px; padding: 14px 22px; text-align: center; min-width: 110px;
}
.tdc-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--txt, #0f172a); }
.tdc-stat-value.tdc-stat-added { color: #16a34a; }
.tdc-stat-value.tdc-stat-removed { color: #dc2626; }
.tdc-stat-value.tdc-stat-modified { color: #d97706; }
.tdc-stat-label { font-size: .76rem; color: var(--txt-2, #64748b); margin-top: 2px; }

.tdc-diff-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tdc-diff-col h4 { font-size: .85rem; color: var(--txt-2, #64748b); margin: 0 0 6px; }
.tdc-diff-pane {
  height: 480px; overflow-y: auto;
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  background: var(--surface, #fff);
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: .8rem; line-height: 1.6;
}
.tdc-diff-line { display: flex; padding: 1px 0; }
.tdc-diff-line-num {
  flex-shrink: 0; width: 42px; text-align: right; padding-right: 8px;
  color: var(--txt-2, #64748b); opacity: .6; user-select: none;
}
.tdc-diff-line-text { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-all; padding-right: 10px; }
.tdc-diff-line.added { background: rgba(22,163,74,.12); }
.tdc-diff-line.added .tdc-diff-line-text::before { content: '+ '; color: #16a34a; font-weight: 700; }
.tdc-diff-line.removed { background: rgba(220,38,38,.12); }
.tdc-diff-line.removed .tdc-diff-line-text::before { content: '- '; color: #dc2626; font-weight: 700; }
.tdc-diff-line.modified { background: rgba(217,119,6,.14); }
.tdc-diff-line.modified .tdc-diff-line-text::before { content: '~ '; color: #d97706; font-weight: 700; }
.tdc-diff-line.empty-filler { opacity: .3; }

@media (max-width: 760px) {
  .tdc-diff-wrap { grid-template-columns: 1fr; }
}

.hidden { display: none !important; }
