/* =============================================================
   comparison.css  –  AITruthCheck Comparison interface
   All class names prefixed  cs-  to avoid collisions.
   ============================================================= */

/* ── Page section ─────────────────────────────────────────────────────────── */
.cs-section {
  background: #f4f5f7;
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 80px;
  box-sizing: border-box;
}

/* ── Main panel ───────────────────────────────────────────────────────────── */
.cs-panel {
  width: 100%;
  max-width: 900px;
}

/* ── Panel header ─────────────────────────────────────────────────────────── */
.cs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.cs-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #1a3a6b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-header-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-header-text h2 {
  margin: 0 0 3px;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.01em;
}

.cs-header-text p {
  margin: 0;
  font-size: 13px;
  color: #777;
}

/* ── File cards grid ──────────────────────────────────────────────────────── */
.cs-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.cs-card {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: border-color 0.2s;
}

.cs-card.has-file {
  border-color: #1a3a6b;
}

/* Card type label */
.cs-card-type {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cs-card-type svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.cs-card.ai-report .cs-card-type  { color: #185FA5; }
.cs-card.ai-report .cs-card-type svg { stroke: #185FA5; }
.cs-card.pri-report .cs-card-type { color: #0F6E56; }
.cs-card.pri-report .cs-card-type svg { stroke: #0F6E56; }

.cs-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 2px;
}

.cs-card-sub {
  font-size: 12px;
  color: #888;
  margin: 0 0 8px;
  line-height: 1.4;
}

/* Drop zone */
.cs-dropzone {
  border: 2px dashed #d6d9de;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.cs-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.cs-dropzone:hover {
  background: #f8f9fb;
}

.cs-card.ai-report  .cs-dropzone:hover { border-color: #185FA5; }
.cs-card.pri-report .cs-dropzone:hover { border-color: #0F6E56; }

.cs-dropzone-icon {
  width: 20px;
  height: 20px;
  margin: 0 auto 4px;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cs-card.ai-report  .cs-dropzone-icon { stroke: #185FA5; }
.cs-card.pri-report .cs-dropzone-icon { stroke: #0F6E56; }

.cs-dropzone-label {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
}

.cs-dropzone-hint {
  font-size: 11px;
  color: #aaa;
}

/* Selected file display */
.cs-file-selected {
  display: none;
  align-items: center;
  gap: 10px;
  background: #f0f4fa;
  border: 1px solid #c8d6ee;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
}

.cs-card.has-file .cs-file-selected {
  display: flex;
}

.cs-file-selected svg {
  width: 18px;
  height: 18px;
  stroke: #1a3a6b;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cs-file-selected-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1a3a6b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.cs-file-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #999;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.cs-file-clear:hover { color: #e53935; }

/* ── Status message card ──────────────────────────────────────────────────── */
.cs-msg-card {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  min-height: 90px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cs-msg-icon {
  width: 20px;
  height: 20px;
  stroke: #aaa;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 1px;
  transition: stroke 0.3s;
}

.cs-msg-card.running .cs-msg-icon { stroke: #185FA5; }
.cs-msg-card.warning .cs-msg-icon { stroke: #e65100; }
.cs-msg-card.success .cs-msg-icon { stroke: #1D9E75; }
.cs-msg-card.error   .cs-msg-icon { stroke: #e53935; }

.cs-msg-text {
  font-size: 13.5px;
  color: #777;
  line-height: 1.6;
  font-style: italic;
  transition: color 0.3s;
}

.cs-msg-card.running .cs-msg-text { color: #1a1a2e; font-style: normal; }
.cs-msg-card.success .cs-msg-text { color: #0F6E56; font-style: normal; font-weight: 600; }
.cs-msg-card.warning .cs-msg-text { color: #bf360c; font-style: normal; font-weight: 600; }
.cs-msg-card.error   .cs-msg-text { color: #c62828; font-style: normal; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.cs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Status indicator */
.cs-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
}

.cs-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  transition: background 0.4s;
}

.cs-status-dot.ready   { background: #1D9E75; }
.cs-status-dot.running { background: #fb8c00; animation: cs-pulse 1s infinite; }
.cs-status-dot.error   { background: #e53935; }

@keyframes cs-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* Run button */
.cs-run-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #1a3a6b;
  color: #fff;
  border: none;
  border-radius: 26px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Work Sans', 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.1s;
  opacity: 0.35;
  pointer-events: none;
}

.cs-run-btn svg {
  width: 17px;
  height: 17px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cs-run-btn.active {
  opacity: 1;
  pointer-events: auto;
}

.cs-run-btn.active:hover  { background: #0d2a55; }
.cs-run-btn.active:active { transform: scale(0.97); }

.cs-run-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cs-cards   { grid-template-columns: 1fr; }
  .cs-section { padding: 24px 14px 60px; }
  .cs-run-btn { padding: 11px 20px; font-size: 13px; }
}

/* ── Cancel button ───────────────────────────────────────────────────────── */
.cs-cancel-btn {
  display: none;
  align-items: center;
  background: transparent;
  color: #e53935;
  border: 2px solid #e53935;
  border-radius: 26px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Work Sans', 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cs-cancel-btn:hover {
  background: #e53935;
  color: #fff;
}
