/* BenedictSociety.org – Papal Blue Theme with Dark Mode */

/* ── Prose styling for AI messages ─────────────────────── */

/* Paragraph spacing — the biggest readability win */
.msg-content p {
  margin-bottom: 0.85em;
}
.msg-content p:last-child {
  margin-bottom: 0;
}

/* Slightly more breathing room for lists */
.msg-content ul, .msg-content ol {
  margin-top: 0.5em;
  margin-bottom: 0.75em;
}
.msg-content li {
  margin-bottom: 0.25em;
}

/* Blockquotes get a touch more space */
.msg-content blockquote {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.prose pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.prose code:not(pre code) {
  background: #f0f4f8;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
}
.dark .prose code:not(pre code) {
  background: #1e3550;
  color: #d9e2ec;
}
.prose blockquote {
  border-left: 3px solid #547aa5;
  padding-left: 1rem;
  color: #547aa5;
  font-style: italic;
}
.dark .prose blockquote { color: #9fb3c8; }
.prose h1, .prose h2, .prose h3 {
  font-family: 'Crimson Pro', serif;
  color: #1e3550;
}
.dark .prose h1, .dark .prose h2, .dark .prose h3 { color: #d9e2ec; }
.prose a:not(.cite-ref) {
  color: #3d6592;
  text-decoration: underline;
}
.dark .prose a:not(.cite-ref) { color: #7b9ab8; }

/* ── Inline citation references ────────────────────────── */
.cite-ref {
  font-size: 0.72em;
  font-weight: 600;
  color: #3d6592;
  text-decoration: none !important;
  vertical-align: super;
  line-height: 0;
  padding: 0 1px;
  transition: color 0.15s, background 0.15s;
  border-radius: 2px;
}
.cite-ref:hover {
  color: #1e3550;
  background: #d9e2ec;
  text-decoration: none !important;
}
.dark .cite-ref { color: #7b9ab8; }
.dark .cite-ref:hover { color: #d9e2ec; background: #2d4a73; }

/* ── Message action buttons ────────────────────────── */

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bcccdc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9fb3c8; }
.dark ::-webkit-scrollbar-thumb { background: #2d4a73; }
#sidebar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

/* ── Dropdown options ──────────────────────────────────── */
.dd-opt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.5rem 0.75rem;
  margin: 0.125rem 0.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.1s;
}
.dd-opt:hover { background: #f0f4f8; }
.dark .dd-opt:hover { background: #2d4a73; }
.dd-opt.active {
  background: #d9e2ec;
  font-weight: 500;
}
.dark .dd-opt.active { background: #2d4a73; }

/* ── Misc ──────────────────────────────────────────────── */
#input { field-sizing: content; min-height: 2.5rem; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
@media print {
  #sidebar, #overlay, nav { display: none !important; }
  main { margin: 0 !important; }
}
