// Markdown 主题样式
const defaultThemeCSS = `:root {
  --md-primary-color: rgb(42, 43, 51);
  --md-primary-color-rgb: 42, 43, 51;
  --md-font-family: -apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif;
  --md-font-size: 16px;
}

/* ==================== start base styles ==================== */

body {
  font-size: var(--md-font-size);
  color: #414352;
  font-family: var(--md-font-family);
}

h1 {
  font-size: calc(var(--md-font-size) * 1.25);
  // line-height: calc(var(--md-font-size) * 2);
  font-weight: 700;
  margin-top: calc(var(--md-font-size) * 0.75);
  margin-bottom: calc(var(--md-font-size) * 0.5);
}

h2 {
  font-size: calc(var(--md-font-size) * 1.125);
  // line-height: calc(var(--md-font-size) * 1.125);
  font-weight: 700;
  margin-top: calc(var(--md-font-size) * 0.5);
  margin-bottom: calc(var(--md-font-size) * 0.375);
}

h3 {
  font-size: calc(var(--md-font-size) * 1.067);
  // line-height: calc(var(--md-font-size) * 1.57);
  font-weight: 600;
  margin-top: calc(var(--md-font-size) * 0.5);
  margin-bottom: calc(var(--md-font-size) * 0.25);
}

h4 {
  font-size: calc(var(--md-font-size) * 1);
  // line-height: calc(var(--md-font-size) * 1.43);
  font-weight: 600;
  margin-top: calc(var(--md-font-size) * 0.375);
  margin-bottom: calc(var(--md-font-size) * 0.1875);
}

h5 {
  font-size: calc(var(--md-font-size) * 0.938);
  // line-height: calc(var(--md-font-size) * 1.43);
  font-weight: 600;
  margin-top: calc(var(--md-font-size) * 0.25);
  margin-bottom: calc(var(--md-font-size) * 0.125);
}

h6 {
  font-size: calc(var(--md-font-size) * 0.875);
  // line-height: calc(var(--md-font-size) * 1.14);
  font-weight: 600;
  margin-top: calc(var(--md-font-size) * 0.25);
  margin-bottom: calc(var(--md-font-size) * 0.125);
}

p {
  line-height: 2;
  font-size: var(--md-font-size);
  font-weight: 400;
  margin-top: calc(var(--md-font-size) * 0.5);
  margin-bottom: calc(var(--md-font-size) * 0.5);
}

strong {
  font-weight: 600;
}

/* 一级无序列表：实心圆点 */
ul {
  list-style: disc;
}

/* 二级无序列表：空心圆 */
ul ul {
  list-style: circle;
}

/* 一级有序列表：数字 */
ol {
  list-style: decimal;
}

/* 二级有序列表：小写字母 */
ol ol {
  list-style: lower-alpha;
}

ul, ol {
  color: #414352;
  font-size: var(--md-font-size);
  font-weight: 400;
  padding-left: 1.4em;
  margin-left: 0;
  margin-top: calc(var(--md-font-size) * 0.25);
  margin-bottom: calc(var(--md-font-size) * 0.375);
}

li {
  font-size: var(--md-font-size);
  margin-top: calc(var(--md-font-size) * 0.125);
  margin-top: calc(var(--md-font-size) * 0.125);
  line-height: 2;
}

li > p {
  margin-top: calc(var(--md-font-size) * 0.125);
  margin-bottom: calc(var(--md-font-size) * 0.125);
}

blockquote {
  border-left: 4px solid var(---3-, #DCDDE7);
  background: var(--2, #F7F8FA);
  padding: calc(var(--md-font-size) * 0.45) var(--md-font-size);
  margin: calc(var(--md-font-size) * 0.5) 0;
  color: #9092A3;
}

blockquote p {
  margin: 0;
  padding: 0;
  line-height: calc(var(--md-font-size) * 1.86);
  color: #9092A3;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;

  * {
    font-size: calc(var(--md-font-size) * 0.93);
    line-height: 1.57em;
  }
}

thead {
  font-weight: 600;
  height: 36px;

}

th {
  border-right: 1px solid #F2F3F5;
  border-bottom: 1px solid #F2F3F5;
  word-break: keep-all;
  padding: calc(var(--md-font-size) * 0.5);
}

thead tr:first-child th {
  border-top: 1px solid #F2F3F5;
}

th:first-child {
  border-left: 1px solid #F2F3F5;
}

thead tr:first-child th:first-child {
  border-top-left-radius: 8px;
}

thead tr:first-child th:last-child {
  border-top-right-radius: 8px;
}

td {
  border-right: 1px solid #F2F3F5;
  border-bottom: 1px solid #F2F3F5;
  padding: calc(var(--md-font-size) * 0.5);
  word-break: break-all;
}

td:first-child {
  border-left: 1px solid #F2F3F5;
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

code {
  font-size: calc(var(--md-font-size) * 0.93);
  color: var(--md-primary-color, #FE780F);
  background: #F7F8FA;
  padding: 3px 5px;
  border-radius: 4px;
}

a {
  color: var(--md-primary-color);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  top: 0;
  right: -14px;
  width: 12px;
  height: 12px;
  background-color: var(--md-primary-color);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.52998 5.46997C7.65498 6.59497 7.65498 8.41497 6.52998 9.53497C5.40498 10.655 3.58498 10.66 2.46498 9.53497C1.34498 8.40997 1.33998 6.58997 2.46498 5.46997' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.29498 6.70494C4.12498 5.53494 4.12498 3.63494 5.29498 2.45994C6.46498 1.28494 8.36498 1.28994 9.53998 2.45994C10.715 3.62994 10.71 5.52994 9.53998 6.70494' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.52998 5.46997C7.65498 6.59497 7.65498 8.41497 6.52998 9.53497C5.40498 10.655 3.58498 10.66 2.46498 9.53497C1.34498 8.40997 1.33998 6.58997 2.46498 5.46997' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.29498 6.70494C4.12498 5.53494 4.12498 3.63494 5.29498 2.45994C6.46498 1.28494 8.36498 1.28994 9.53998 2.45994C10.715 3.62994 10.71 5.52994 9.53998 6.70494' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

a.auto-link {
  text-decoration: underline;
  text-decoration-color: var(--md-primary-color);
  text-decoration-thickness: 1px;
}

a.auto-link::after {
  display: none;
}

a.reference-link::after {
  display: none;
}

.reference-marker {
  display: inline-flex;
  width: 18px;
  height: 18px;
  padding: 2px;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  background: var(--3, #F2F3F5);
  font-size: 0.85em;
  line-height: 1;
  margin-left: 4px;
}

hr {
  border: 0 none;
  background-color: #EBEBF0;
  height: 1px;
  margin:  0.75em 0;
}
em {
  font-style: italic;
  font-size: inherit;
}

/* ==================== end base styles ==================== */

/** table start */
thead th {
  background-color: rgba(var(--md-primary-color-rgb), 0.028);
  color: var(--md-primary-color);
}

table thead tr:first-child th {
  border-top: 1px solid rgba(var(--md-primary-color-rgb), 0.08) !important;
}

table th:first-child {
  border-left: 1px solid rgba(var(--md-primary-color-rgb), 0.08) !important;
}

table thead tr:first-child th:last-child {
  border-right: 1px solid rgba(var(--md-primary-color-rgb), 0.08) !important;
}

table td:first-child {
  border-left: 1px solid rgba(var(--md-primary-color-rgb), 0.08) !important;
}

table td:last-child {
  border-right: 1px solid rgba(var(--md-primary-color-rgb), 0.08) !important;
}

table tbody tr:last-child td {
  border-bottom: 1px solid rgba(var(--md-primary-color-rgb), 0.08) !important;
}

table tbody tr:last-child td:last-child {
  border-right: 1px solid rgba(var(--md-primary-color-rgb), 0.1) !important;
}

/* 内部边框 - 12% 主色 */
th:not(:last-child),
td:not(:last-child) {
  border-right: 1px solid rgba(var(--md-primary-color-rgb), 0.08);
}

tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(var(--md-primary-color-rgb), 0.08);
}

thead th {
  border-bottom: 1px solid rgba(var(--md-primary-color-rgb), 0.08);
}
/** table end */



/** h1 start */
/** h1 end */`;

export default defaultThemeCSS;
