/* Markdown tables: quiet borders, shared type and enough room for real data. */
.content table {
  width: 100%;
  max-width: var(--content-wide-width);
  margin: 28px auto;
  border: 1px solid var(--line-2);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  display: table;
  table-layout: auto;
  overflow: hidden;
}

.content table thead {
  background-color: #f4f5f7;
}

.content table th {
  padding: 12px 14px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-strong);
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
}

.content table th:last-child {
  border-right: none;
}

.content table td {
  padding: 11px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.content table td:last-child {
  border-right: none;
}

.content table tbody tr:last-child td {
  border-bottom: none;
}

.content table tbody tr:nth-child(even) td {
  background-color: #fcfcfd;
}

.content table tbody tr:hover td {
  background-color: #f6f8fa;
}

.content table code {
  background-color: #f1f3f4;
  padding: 0.1em 0.32em;
  border-radius: 4px;
  font-size: 0.9em;
  color: #c8346e;
  white-space: nowrap;
}

.content table a {
  color: #356aa0;
}

.content table a:hover {
  color: #214f7d;
}

@media (max-width: 768px) {
  .content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 22px auto;
    overflow-x: auto;
    font-size: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .content table th,
  .content table td {
    min-width: 90px;
    padding: 9px 10px;
  }
}

@media (max-width: 480px) {
  .content table {
    font-size: 14px;
  }

  .content table th,
  .content table td {
    min-width: 84px;
    padding: 8px;
  }
}

/* Hexo syntax highlighting uses a table internally; keep it out of article-table styling. */
.content figure.highlight table,
.content .codeblock table {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
}

.content figure.highlight table th,
.content figure.highlight table td,
.content .codeblock table th,
.content .codeblock table td {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.content figure.highlight table tbody tr:hover td,
.content figure.highlight table tbody tr:nth-child(even) td,
.content .codeblock table tbody tr:hover td,
.content .codeblock table tbody tr:nth-child(even) td {
  background: transparent;
}

.content figure.highlight table .gutter,
.content .codeblock table .gutter {
  padding: 0.3em 15px;
  border-right: 1px solid;
}

.content figure.highlight table .code,
.content .codeblock table .code {
  padding: 1em;
}

/* 表格内容对齐 */
.content table .text-left {
  text-align: left;
}
.content table .text-center {
  text-align: center;
}
.content table .text-right {
  text-align: right;
}

/* 表格高亮行样式 */
.content table .highlight {
  background-color: #fff3cd;
}

.content table .highlight:hover {
  background-color: #ffeeba;
}
