/* Base container */
.markdown-content {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base Text - Paragraphs */
.markdown-content p {
  font-size: 15px;
  line-height: 24px;
  color: #111418;
  margin-bottom: 8px;
  margin-top: 0;
}

.dark .markdown-content p {
  color: rgb(243 244 246);
}

/* Headers */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  font-weight: 500;
  color: #111418;
  margin-bottom: 8px;
}

.dark .markdown-content h1,
.dark .markdown-content h2,
.dark .markdown-content h3 {
  color: rgb(243 244 246);
}

.markdown-content h1 {
  font-size: 24px;
  margin-top: 20px;
}

.markdown-content h2 {
  font-size: 20px;
  margin-top: 16px;
}

.markdown-content h3 {
  font-size: 18px;
  margin-top: 12px;
}

/* Bold & Italic */
.markdown-content strong {
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
}

/* Lists - Custom bullet màu xanh */
.markdown-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.markdown-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 22px;
  color: #111418;
}

.dark .markdown-content ul li {
  color: rgb(209 213 219);
}

/* Bullet màu xanh */
.markdown-content ul li::before {
  content: "•";
  color: #137fec;
  font-weight: bold;
  font-size: 16px;
  position: absolute;
  left: 8px;
  top: 0;
}

/* Ordered List */
.markdown-content ol {
  padding-left: 20px;
  margin-bottom: 8px;
  list-style-type: decimal;
}

.markdown-content ol li {
  font-size: 15px;
  line-height: 22px;
  color: #111418;
  margin-bottom: 6px;
}

.dark .markdown-content ol li {
  color: rgb(209 213 219);
}

/* Table wrapper for horizontal scroll */
.markdown-content .table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.markdown-content table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  margin: 0;
  display: table;
}

.markdown-content thead {
  background-color: rgb(243 244 246);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dark .markdown-content thead {
  background-color: rgb(31 41 55);
}

.markdown-content th,
.markdown-content td {
  padding: 8px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  line-height: 20px;
  color: #111418;
  vertical-align: middle;
}

.dark .markdown-content th,
.dark .markdown-content td {
  border-color: rgb(55 65 81);
  color: rgb(209 213 219);
}

.markdown-content th {
  font-weight: 600;
  white-space: nowrap;
}

/* Xóa border phải của cột cuối cùng */
.markdown-content tr td:last-child,
.markdown-content tr th:last-child {
  border-right: none;
}

.markdown-content tbody tr:nth-child(even) {
  background-color: rgb(249 250 251);
}

.dark .markdown-content tbody tr:nth-child(even) {
  background-color: rgb(17 24 39);
}

.markdown-content tbody tr:hover {
  background-color: rgb(243 244 246);
}

.dark .markdown-content tbody tr:hover {
  background-color: rgb(31 41 55);
}

/* Scrollbar styling */
.markdown-content .table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.markdown-content .table-wrapper::-webkit-scrollbar-track {
  background: rgb(243 244 246);
  border-radius: 4px;
}

.dark .markdown-content .table-wrapper::-webkit-scrollbar-track {
  background: rgb(31 41 55);
}

.markdown-content .table-wrapper::-webkit-scrollbar-thumb {
  background: rgb(156 163 175);
  border-radius: 4px;
}

.markdown-content .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgb(107 114 128);
}

.dark .markdown-content .table-wrapper::-webkit-scrollbar-thumb {
  background: rgb(75 85 99);
}

.dark .markdown-content .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgb(107 114 128);
}

@media (max-width: 640px) {
  .markdown-content table {
    font-size: 0.75rem;
    min-width: 500px;
  }

  .markdown-content th,
  .markdown-content td {
    padding: 0.5rem;
  }
}
