/* OWL Legal Research Demo */

.legal-demo-hero {
  background: linear-gradient(135deg, #37517e 0%, #47b2e4 100%);
  color: #fff;
  padding: 120px 0 60px;
}

.legal-demo-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.case-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.agent-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 2rem 0;
}

.agent-card {
  flex: 1 1 140px;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #dee2e6;
  transition: all 0.4s ease;
  min-width: 140px;
}

.agent-card.pending { border-left-color: #dee2e6; opacity: 0.6; }
.agent-card.running { border-left-color: #ffc107; transform: scale(1.02); box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3); }
.agent-card.complete { border-left-color: #47b2e4; }
.agent-card.error { border-left-color: #dc3545; }

.agent-card .agent-icon {
  font-size: 1.5rem;
  color: #47b2e4;
  margin-bottom: 8px;
}

.agent-card.running .agent-icon {
  animation: pulse-agent 1s infinite;
}

@keyframes pulse-agent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.agent-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #37517e;
}

.agent-card p {
  font-size: 0.75rem;
  color: #6c757d;
  margin: 0;
}

.doc-viewer {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 2rem;
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0;
  margin: 0;
  list-style: none;
}

.doc-tabs li {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.doc-tabs li:hover { color: #37517e; background: #fff; }
.doc-tabs li.active { color: #47b2e4; border-bottom-color: #47b2e4; background: #fff; }

.doc-content {
  padding: 0;
  max-height: 600px;
  overflow: auto;
}

.doc-content pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 24px;
  background: #fefefe;
  color: #212529;
}

.sources-panel {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 24px;
  margin-top: 2rem;
}

.sources-panel h3 {
  font-size: 1.1rem;
  color: #37517e;
  margin-bottom: 1rem;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 50px;
  padding: 6px 14px;
  margin: 4px;
  font-size: 0.8rem;
}

.source-chip.live { border-color: #28a745; color: #155724; }
.source-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
}

.demo-status {
  padding: 12px 20px;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.demo-status.info { background: #e7f3ff; color: #004085; }
.demo-status.success { background: #d4edda; color: #155724; }
.demo-status.error { background: #f8d7da; color: #721c24; }

.btn-run-demo {
  background: #47b2e4;
  border: none;
  color: #fff;
  padding: 14px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s;
}

.btn-run-demo:hover:not(:disabled) {
  background: #37517e;
  transform: translateY(-2px);
  color: #fff;
}

.btn-run-demo:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 2rem 0;
}

.metric-box {
  flex: 1 1 150px;
  text-align: center;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.metric-box .value {
  font-size: 2rem;
  font-weight: 700;
  color: #47b2e4;
}

.metric-box .label {
  font-size: 0.8rem;
  color: #6c757d;
}

#demo-results { display: none; }
#demo-results.visible { display: block; }

.legal-doc-paper {
  background: #fff;
  box-shadow: inset 0 0 0 1px #e9ecef;
}

@media (max-width: 768px) {
  .agent-pipeline { flex-direction: column; }
  .doc-tabs li { flex: 1 1 100%; text-align: center; }
}
