/* XML Comparison Tool — same shape/size as the Deecliq Data Transfer tool:
   centered hero, flat no-shadow card, same button/spacing system. The
   comparison itself runs synchronously (it's plain text parsing, finishes
   in milliseconds), so there's no processing/result-view stage like the
   file-upload tools — just input → results, same as before, restyled. */
.fct-fit.fct-scope {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 1600px; margin: 0 auto;
  padding: 90px 4vw 60px;
}

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

#fctScope .fct-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;
}

.fct-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-bottom: 6px;
}
.fct-textarea {
  width: 100%; height: 280px; resize: vertical;
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  background: var(--surface, #fff); color: var(--txt, #0f172a);
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: .82rem; line-height: 1.6;
  padding: 12px;
}
.fct-textarea:focus { outline: none; border-color: var(--brand, #4f46e5); }

.hidden { display: none !important; }

/* Keeps the results box visible without scrolling the page while the
   textareas above (which have their own internal scrollbar) can be as
   tall/long as needed. Buttons sit plainly above it, not enclosed in it. */
.fct-sticky-panel {
  position: sticky; bottom: 12px; z-index: 5;
  box-shadow: 0 -8px 24px -8px rgba(15,23,42,.12), 0 10px 24px -8px rgba(15,23,42,.12);
}

#fctScope .controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0; }
#fctScope #fctCompareBtn {
  background: linear-gradient(135deg, var(--brand, #4f46e5), var(--brand-dark, #4338ca));
  border: none; padding: 13px 26px; font-weight: 700; font-size: .95rem;
  border-radius: 12px; box-shadow: 0 10px 24px rgba(79,70,229,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#fctScope #fctCompareBtn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79,70,229,.45); }
#fctScope .btn-warning { padding: 13px 26px; font-weight: 700; font-size: .95rem; border-radius: 12px; }
#fctScope .btn-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  border: none; padding: 13px 26px; font-weight: 700; font-size: .95rem;
  border-radius: 12px; box-shadow: 0 10px 24px rgba(37,99,235,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
#fctScope .btn-info:hover { transform: translateY(-2px); }

/* One unified box — every message (error or success) is a row inside it,
   separated by a thin divider, instead of each being its own colored card. */
/* Fixed height — never grows past this regardless of how many messages
   there are; once content overflows it, it scrolls inside the box instead
   of pushing the sticky panel off the screen. */
.fct-results {
  padding: 4px 18px; border-radius: 12px; background: var(--surface, #fff);
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: .82rem;
  overflow-y: auto; white-space: pre-wrap;
  height: 260px; max-height: 50vh;
  border: 1px solid var(--border, #e2e8f0);
}
.fct-error, .fct-success {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; line-height: 1.5; background: none;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.fct-error:last-child, .fct-success:last-child { border-bottom: none; }
.fct-error { color: var(--txt, #0f172a); font-weight: 600; }
.fct-success { color: var(--txt, #0f172a); font-weight: 600; }

/* Numbered circle badge instead of a check/x icon — 1, 2, 3… in order. */
.fct-row-num {
  flex-shrink: 0; margin-top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .74rem; font-weight: 800;
  border: 2px solid;
}
.fct-error .fct-row-num { color: var(--red, #ef4444); border-color: var(--red, #ef4444); }
.fct-success .fct-row-num { color: #16a34a; border-color: #16a34a; }

/* Click-to-copy chip for UUIDs (Rule IDs) embedded in a message — still
   plain selectable text, but also clickable for a one-step copy. */
.fct-id-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: rgba(0,0,0,.06); border-radius: 5px; padding: 1px 6px;
  transition: background .15s ease;
}
.fct-id-chip:hover { background: rgba(0,0,0,.12); }
.fct-id-chip-icon { font-size: .72rem; opacity: .6; }
.fct-id-chip:hover .fct-id-chip-icon { opacity: 1; }
html[data-theme="dark"] .fct-id-chip { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .fct-id-chip:hover { background: rgba(255,255,255,.18); }

@media (max-width: 700px) {
  .fct-form-row { grid-template-columns: 1fr; }
}
