/* Mobile-first Exam Assistant Styles */
:root {
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

.pb-safe {
  padding-bottom: calc(var(--safe-bottom) + 16px);
}

/* Custom Scrollbars */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Markdown typography styling */
#markdownBody h1, #markdownBody h2, #markdownBody h3 {
  color: #f1f5f9;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

#markdownBody h2 {
  font-size: 1.15rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  padding-bottom: 0.35rem;
}

#markdownBody h3 {
  font-size: 1rem;
  color: #34d399; /* emerald-400 */
}

#markdownBody p {
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

#markdownBody ul, #markdownBody ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

#markdownBody li {
  margin-bottom: 0.35rem;
}

#markdownBody blockquote {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.05);
  padding: 0.65rem 0.9rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 0.85rem 0;
  font-style: normal;
  color: #e2e8f0;
}

#markdownBody table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.825rem;
}

#markdownBody th, #markdownBody td {
  border: 1px solid #334155;
  padding: 0.5rem 0.65rem;
  text-align: left;
}

#markdownBody th {
  background: #1e293b;
  color: #f8fafc;
  font-weight: 600;
}

#markdownBody code:not(.language-mermaid) {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(51, 65, 85, 0.5);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.825rem;
  color: #a7f3d0;
}

#markdownBody pre {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

#markdownBody strong {
  color: #ffffff;
  font-weight: 600;
}

/* Tab Active Styles */
.tab-btn.active {
  background: #10b981 !important;
  color: #020617 !important;
  border-color: #10b981 !important;
}

/* Dialog Animation */
dialog[open] {
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
