/* Custom styles for gap cards and Tailwind overrides */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.gap-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1rem;
}

.gap-card {
  flex: 0 1 calc(50% - 0.5rem);
  background-color: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.gap-card:hover {
  background-color: #f0f9ff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.gap-card.selected {
  border: 2px solid #3b82f6;
  background-color: #dbeafe;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
  position: relative;
}

.gap-card.final-idea {
  border: 3px solid #10b981;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  position: relative;
}

.gap-card.final-idea:hover {
  background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
  border-color: #059669;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.gap-card.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: bold;
}

.gap-card h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}

.gap-card p {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
}

.gap-card small {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

@media screen and (max-width: 768px) {
  .gap-card {
    flex: 0 1 100%;
  }
}

/* Tab active state (works with Tailwind classes) */
.tab.active {
  background-color: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
  border-bottom: 3px solid #3b82f6;
}

/* Citations styling */
#citations h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

#citations ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#citations li {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

#citations li:hover {
  background: #f0f9ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

#citations li.bg-purple-50 {
  background: #faf5ff;
  border-color: #d8b4fe;
}

#citations li.bg-purple-50:hover {
  background: #f3e8ff;
  border-color: #c084fc;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

#citations a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

#citations a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

#citations small {
  display: block;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Analysis result styling */
#analysis-result {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

#analysis-result h1,
#analysis-result h2,
#analysis-result h3 {
  color: #1f2937;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

#analysis-result h1 {
  font-size: 1.875rem;
}

#analysis-result h2 {
  font-size: 1.5rem;
}

#analysis-result h3 {
  font-size: 1.25rem;
}

#analysis-result p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 1rem;
}

#analysis-result ul,
#analysis-result ol {
  color: #4b5563;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

#analysis-result code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #db2777;
}

#analysis-result pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

#analysis-result pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
