/* Custom styles for course micro-lesson markdown content */

.lesson-markdown {
  line-height: 1.8rem;
  color: #374151; /* text-gray-700 */
  font-size: 1.05rem;
}

.lesson-markdown h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid #0d9488; /* teal-600 */
  padding-left: 0.75rem;
  line-height: 2.25rem;
}

.lesson-markdown h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 2rem;
}

.lesson-markdown h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.lesson-markdown p {
  margin-bottom: 1.25rem;
  line-height: 1.8rem;
}

.lesson-markdown a {
  color: #0d9488;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed #0d9488;
  transition: all 0.2s ease;
}

.lesson-markdown a:hover {
  color: #0f766e;
  border-bottom-style: solid;
}

.lesson-markdown a.material-button {
  color: #ffffff !important;
  border-bottom: none;
}

.lesson-markdown a.material-button:hover {
  color: #ffffff !important;
  border-bottom: none;
}

/* Styled Lists */
.lesson-markdown ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.lesson-markdown ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.625rem;
  line-height: 1.75rem;
}

.lesson-markdown ul li::before {
  content: "✓";
  position: absolute;
  left: 0.25rem;
  color: #0d9488; /* teal-600 */
  font-weight: 800;
}

.lesson-markdown ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.lesson-markdown ol li {
  margin-bottom: 0.625rem;
  line-height: 1.75rem;
}

/* Custom Blockquotes for alerts or key callouts */
.lesson-markdown blockquote {
  background-color: #f0fdfa; /* teal-50 */
  border-left: 4px solid #0d9488; /* teal-600 */
  color: #0f766e; /* teal-800 */
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  font-style: italic;
  margin: 1.75rem 0;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.lesson-markdown blockquote p {
  margin-bottom: 0;
}

/* Premium Code Blocks */
.lesson-markdown pre {
  background-color: #0f172a; /* slate-900 */
  color: #f8fafc; /* slate-50 */
  padding: 1.25rem;
  border-radius: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Inline Code tags */
.lesson-markdown code {
  background-color: #f1f5f9; /* slate-100 */
  color: #0f766e; /* teal-700 */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
}

.lesson-markdown pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-weight: inherit;
  font-size: inherit;
}

/* Beautiful Images styling */
.lesson-markdown img {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  margin: 2.25rem auto;
  display: block;
  max-width: 100%;
}

.lesson-markdown br {
  margin-bottom: 1.25rem;
}

/* Compact markdown styling for drawers, previews, and cards */
.lesson-markdown-sm {
  line-height: 1.625;
  color: #475569; /* slate-600 */
  font-size: 0.875rem; /* 14px */
}

.lesson-markdown-sm p {
  margin-bottom: 0.75rem;
  line-height: 1.625;
}

.lesson-markdown-sm p:last-child {
  margin-bottom: 0;
}

.lesson-markdown-sm strong {
  font-weight: 700;
  color: #0f172a; /* slate-900 */
}

.lesson-markdown-sm em {
  font-style: italic;
  color: #334155;
}

.lesson-markdown-sm ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.lesson-markdown-sm ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.lesson-markdown-sm ul li::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  color: #C21057;
  font-weight: 800;
  font-size: 1.1rem;
}

.lesson-markdown-sm ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.lesson-markdown-sm ol li {
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.lesson-markdown-sm code {
  background-color: #f1f5f9;
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}

.lesson-markdown-sm img {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  margin: 0.75rem auto;
  display: block;
  max-width: 100%;
}

/* Modern Responsive Table Styling */
.lesson-markdown .table-responsive-wrapper,
.table-responsive-wrapper {
  margin: 2rem 0;
  width: 100%;
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9); /* border-slate-200/90 */
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  -webkit-overflow-scrolling: touch;
}

.lesson-markdown table,
.table-responsive-wrapper table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem; /* 14px */
  line-height: 1.6;
  color: #334155; /* slate-700 */
}

.lesson-markdown table thead,
.table-responsive-wrapper table thead {
  background-color: #f8fafc; /* slate-50 */
}

.lesson-markdown table th,
.table-responsive-wrapper table th {
  padding: 0.875rem 1.25rem;
  font-size: 0.75rem; /* 12px */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569; /* slate-600 */
  border-bottom: 1px solid #e2e8f0; /* slate-200 */
  white-space: nowrap;
  vertical-align: middle;
}

.lesson-markdown table td,
.table-responsive-wrapper table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f1f5f9; /* slate-100 */
  vertical-align: top;
  line-height: 1.6;
  color: #334155; /* slate-700 */
}

.lesson-markdown table tbody tr:last-child td,
.table-responsive-wrapper table tbody tr:last-child td {
  border-bottom: none;
}

.lesson-markdown table tbody tr,
.table-responsive-wrapper table tbody tr {
  transition: background-color 0.15s ease;
}

.lesson-markdown table tbody tr:hover,
.table-responsive-wrapper table tbody tr:hover {
  background-color: #f8fafc; /* slate-50 */
}

.lesson-markdown table tbody tr td:first-child,
.table-responsive-wrapper table tbody tr td:first-child {
  font-weight: 600;
  color: #0f172a; /* slate-900 */
}

.lesson-markdown table code,
.table-responsive-wrapper table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 0.375rem;
  background-color: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

/* Compact markdown table styling (drawers, previews, cards) */
.lesson-markdown-sm .table-responsive-wrapper {
  margin: 1.25rem 0;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  overflow-x: auto;
}

.lesson-markdown-sm table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem; /* 13px */
  line-height: 1.45;
  color: #334155;
}

.lesson-markdown-sm table thead {
  background-color: #f8fafc;
}

.lesson-markdown-sm table th {
  padding: 0.625rem 0.875rem;
  font-size: 0.6875rem; /* 11px */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.lesson-markdown-sm table td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  line-height: 1.5;
}

.lesson-markdown-sm table tbody tr:last-child td {
  border-bottom: none;
}

.lesson-markdown-sm table tbody tr td:first-child {
  font-weight: 600;
  color: #0f172a;
}

.lesson-markdown-sm table code {
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
}