/* CommonMarker Syntax Highlighting & GitHub Alerts */
/* Syntax highlighting colors are embedded inline by CommonMarker's syntect */
/* This file provides base styling for code blocks and GFM features */

/* Prose typography styles (replaces @tailwindcss/typography for Tailwind v4) */
.prose {
  color: #374151;
  line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #1D7F6C;
  font-weight: 700;
  line-height: 1.25;
}

.prose h1 {
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.875em;
}

.prose h2 {
  font-size: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.prose h4 {
  font-size: 1em;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose a {
  color: #1D7F6C;
  text-decoration: underline;
}

.prose strong {
  font-weight: 600;
  color: #111827;
}

.prose em {
  font-style: italic;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

/* Regular unordered lists get disc bullets, but not task lists */
.prose ul:not(:has(input[type="checkbox"])) {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

/* Task lists (identified by checkbox presence) should not have bullets */
.prose ul:has(input[type="checkbox"]) {
  list-style: none;
  padding-left: 0;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Nested lists */
.prose li > ul, .prose li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  font-style: italic;
  border-left: 0.25rem solid #e5e7eb;
  padding-left: 1em;
  margin: 1.25em 0;
  color: #6b7280;
}

.prose hr {
  border-color: #e5e7eb;
  margin: 2em 0;
}

.prose img {
  margin: 1.5em 0;
}

/* prose-lg size adjustments */
.prose-lg {
  font-size: 1.125rem;
}

.prose-lg h1 {
  font-size: 2.5em;
}

.prose-lg h2 {
  font-size: 1.75em;
}

.prose-lg h3 {
  font-size: 1.375em;
}

/* prose-sm size adjustments */
.prose-sm {
  font-size: 0.875rem;
}

.prose-sm h1 {
  font-size: 2em;
}

.prose-sm h2 {
  font-size: 1.375em;
}

.prose-sm h3 {
  font-size: 1.125em;
}

/* prose-xl size adjustments */
.prose-xl {
  font-size: 1.25rem;
}

.prose-xl h1 {
  font-size: 2.75em;
}

.prose-xl h2 {
  font-size: 1.875em;
}

.prose-xl h3 {
  font-size: 1.5em;
}

/* prose-2xl size adjustments */
.prose-2xl {
  font-size: 1.5rem;
}

.prose-2xl h1 {
  font-size: 3em;
}

.prose-2xl h2 {
  font-size: 2em;
}

.prose-2xl h3 {
  font-size: 1.625em;
}

/* Keyboard input */
.prose kbd {
  display: inline-block;
  padding: 0.125em 0.375em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  font-weight: 500;
  line-height: 1.25;
  color: #1f2937;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  box-shadow: inset 0 -1px 0 #d1d5db;
}

/* Abbreviations */
.prose abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* Mark / highlighted text */
.prose mark {
  padding: 0.125em 0.25em;
  background-color: #fef08a;
  color: #1f2937;
  border-radius: 0.125rem;
}

/* Figure and figcaption */
.prose figure {
  margin: 1.5em 0;
}

.prose figure > * {
  margin: 0;
}

.prose figcaption {
  margin-top: 0.75em;
  font-size: 0.875em;
  color: #6b7280;
  text-align: center;
}

/* Definition lists */
.prose dl {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose dt {
  font-weight: 600;
  color: #111827;
  margin-top: 1em;
}

.prose dt:first-child {
  margin-top: 0;
}

.prose dd {
  margin-top: 0.25em;
  margin-left: 1.625em;
}

/* Video */
.prose video {
  margin: 1.5em 0;
  max-width: 100%;
}

/* Superscript and subscript */
.prose sup {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

.prose sub {
  font-size: 0.75em;
  vertical-align: sub;
  line-height: 0;
}

/* Small text */
.prose small {
  font-size: 0.875em;
}

/* Code blocks base styling */
pre {
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Light mode code blocks */
pre {
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
}

/* Inline code */
code:not(pre code) {
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

code:not(pre code) {
  background-color: rgba(175, 184, 193, 0.2);
}

/* GitHub Alerts - GFM extension */
/* Rendered as blockquotes with markdown-alert classes */
.markdown-alert {
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  border-left: 0.25rem solid;
  border-radius: 0.25rem;
}

.markdown-alert > :first-child {
  margin-top: 0;
}

.markdown-alert > :last-child {
  margin-bottom: 0;
}

.markdown-alert-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.markdown-alert-title svg {
  width: 1rem;
  height: 1rem;
}

/* Note alert - kogito teal */
.markdown-alert-note {
  border-color: #1D7F6C;
  background-color: #e6f5f2;
}

.markdown-alert-note .markdown-alert-title {
  color: #1D7F6C;
}

/* Tip alert - sage green */
.markdown-alert-tip {
  border-color: #81B077;
  background-color: #eef5ec;
}

.markdown-alert-tip .markdown-alert-title {
  color: #81B077;
}

/* Important alert - kogito dark */
.markdown-alert-important {
  border-color: #155c4e;
  background-color: #e0efec;
}

.markdown-alert-important .markdown-alert-title {
  color: #155c4e;
}

/* Warning alert - muted amber */
.markdown-alert-warning {
  border-color: #8a6d3b;
  background-color: #fdf6e8;
}

.markdown-alert-warning .markdown-alert-title {
  color: #8a6d3b;
}

/* Caution alert - muted red */
.markdown-alert-caution {
  border-color: #a94442;
  background-color: #fdf0ef;
}

.markdown-alert-caution .markdown-alert-title {
  color: #a94442;
}

/* Task lists */
.contains-task-list {
  list-style: none;
  padding-left: 0;
}

.task-list-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.task-list-item input[type="checkbox"] {
  margin: 0;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

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

th {
  font-weight: 600;
  background-color: #f6f8fa;
}

/* Footnotes */
.footnotes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #d0d7de;
  font-size: 0.875rem;
}

.footnote-ref {
  font-size: 0.75rem;
  vertical-align: super;
}

/* Strikethrough */
del {
  text-decoration: line-through;
  color: #656d76;
}
