/* This is the styling applied to markdown (like the one used for Changelog). */

.gd-markdown {
  font-family: var(--gdevelop-modern-font-family);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  min-width: 0; /** Prevents horizontal overflow */
  word-break: break-word; /* Prevent horizontal overflow for long lines */
}

.gd-markdown.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gd-markdown.standalone-text-container {
  line-height: 1.3;
}
.gd-markdown .generated-list-item {
  margin-block-start: 0;
  margin-block-end: 0;
  list-style-type: none;
}
.gd-markdown .generated-list-item p {
  margin-block-start: 4px;
  margin-block-end: 4px;
}

.gd-markdown h1 {
  margin-bottom: 10px;
}

.gd-markdown h2 {
  margin-bottom: 10px;
}

.gd-markdown h3 {
  margin-top: 20px;
  margin-bottom: 5px;
}

.gd-markdown ul {
  word-break: break-word;
  margin-block-start: 8px;
  margin-block-end: 8px;
}

.gd-markdown blockquote {
  border-left: 5px solid var(--markdown-blockquote-border-left-color);
  padding-left: 15px;
  margin-left: 20px;
}

.gd-markdown a {
  color: var(--markdown-link-color);
  cursor: pointer;
}

.gd-markdown pre {
  overflow-x: scroll; /* Prevent horizontal overflow for long code blocks */
  white-space: pre-wrap; /* Wrap long lines */
}

.gd-markdown code {
  font-family: 'Lucida Console', Monaco, monospace;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
  font-size: 13px;
}

.gd-markdown img {
  max-width: 100%;
}

.gd-markdown p {
  margin-block-start: 8px;
  margin-block-end: 8px;
}

.gd-markdown.text-ellipsis p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gd-markdown table {
  border-collapse: collapse;
}
.gd-markdown th,
.gd-markdown td {
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 10px;
  padding-right: 10px;
  border: 1px solid currentColor;
}
