/* Tailwind CSS - Compiled output for NCERT Academy */
/* Generate with: npx @tailwindcss/cli -i ./app/static/css/input.css -o ./app/static/css/output.css --minify */
/* For now, using CDN via base.html instead */

/* Custom component styles */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

.question-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  transition: all 0.2s;
  display: block;
}
.question-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.subject-card {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}
.subject-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
  border-color: #60a5fa;
  transform: translateY(-4px);
}

.sidebar-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #4b5563;
  border-radius: 0.375rem;
  transition: color 0.15s, background 0.15s;
}
.sidebar-link:hover { background: #eff6ff; color: #1d4ed8; }
.sidebar-link.active { background: #dbeafe; color: #1e40af; font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-easy { background: #dcfce7; color: #166534; }
.badge-medium { background: #fef9c3; color: #854d0e; }
.badge-hard { background: #fee2e2; color: #991b1b; }

.answer-content h2 { font-size: 1.25rem; font-weight: 600; color: #111827; margin-top: 1.4rem; margin-bottom: 0.6rem; }
.answer-content h3 { font-size: 1.125rem; font-weight: 500; color: #1f2937; margin-top: 0.9rem; margin-bottom: 0.4rem; }
.answer-content p { color: #374151; line-height: 1.6; margin-bottom: 0.5rem; }
/* Collapse Quill's empty <p><br></p> spacers into a small controlled gap
   (preserves visual grouping between Q&A blocks without a full dead line) */
.answer-content p:has(br:only-child) { margin: 0; line-height: 0.6rem; }
.answer-content ul, .answer-content ol { margin-left: 1.5rem; margin-bottom: 1rem; color: #374151; }
.answer-content ul { list-style-type: disc; }
.answer-content ol { list-style-type: decimal; }
.answer-content li { margin-bottom: 0.25rem; }
.answer-content code { background: #f3f4f6; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875rem; }
.answer-content blockquote { border-left: 4px solid #60a5fa; padding-left: 1rem; font-style: italic; color: #4b5563; margin: 1rem 0; }

/* Tables in answer content */
.answer-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.925rem; }
.answer-content table th,
.answer-content table td { border: 1px solid #d1d5db; padding: 0.625rem 0.875rem; color: #374151; text-align: left; }
.answer-content table tr:first-child td,
.answer-content table th { background: #f0f5ff; font-weight: 600; color: #1e3a5f; }
.answer-content table tr:nth-child(even) { background: #f9fafb; }
.answer-content table tr:hover { background: #f0f4ff; }

/* Quill.js list rendering — Quill uses <ol> for all lists, data-list attr distinguishes type */
.answer-content .ql-ui { display: none; }
.answer-content ol { list-style: none; counter-reset: list-counter; }
.answer-content li[data-list="bullet"] { list-style-type: disc; margin-left: 1.5rem; }
.answer-content li[data-list="ordered"] { counter-increment: list-counter; list-style-type: none; margin-left: 1.5rem; }
.answer-content li[data-list="ordered"]::before { content: counter(list-counter) ". "; font-weight: 500; }

/* Prevent AdSense auto-ads from overflowing inside content cards */
.answer-content ins.adsbygoogle { max-width: 100%; overflow: hidden; }

/* Answer images */
.answer-content img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1rem 0; }

/* Hyperlinks inside answer content */
.answer-content a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #93c5fd;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
  transition: color 0.15s, text-decoration-color 0.15s, background 0.15s;
}
.answer-content a:hover {
  color: #1d4ed8;
  text-decoration-color: #1d4ed8;
  background: #eff6ff;
}
.answer-content a:visited { color: #7c3aed; }
.answer-content a:visited:hover { color: #6d28d9; text-decoration-color: #6d28d9; }
.answer-content a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 0.25rem;
}
/* External links — subtle arrow indicator */
.answer-content a[href^="http"]:not([href*="ncertacademy.com"])::after {
  content: " \2197";
  font-size: 0.85em;
  opacity: 0.7;
}
