/*
  Таблицы в текстовом контенте (страницы, записи — блок «Таблица» редактора).
  Базовые правила в style.min.css рассчитаны на таблицу с шапкой thead;
  здесь добавлена поддержка таблиц «параметр — значение», где th стоит
  в первом столбце каждой строки, и общая рамка ячеек.
*/

.article .wp-block-table,
.article figure.wp-block-table {
  margin-top: 24px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.article table,
.article .wp-block-table table {
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  margin-bottom: 24px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  color: var(--font-color);
  background: var(--white-color);
}

.article .wp-block-table table {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.article table th,
.article table td,
.article .wp-block-table table th,
.article .wp-block-table table td {
  padding: 12px 16px;
  border: 1px solid #D7D8DA;
  vertical-align: top;
  text-align: left;
  font-weight: 400;
  color: var(--font-color);
  background: var(--white-color);
}

/* Шапка таблицы — строка th сверху */
.article table thead th,
.article .wp-block-table table thead th {
  font-weight: 600;
  background: #F4F6F9;
}

.article table thead,
.article .wp-block-table table thead {
  border: 0;
}

/* Таблица «параметр — значение» — th в первом столбце строки */
.article table tbody th,
.article .wp-block-table table tbody th {
  width: 32%;
  font-weight: 600;
  background: #F4F6F9;
}

/* Стиль «полосы» из редактора */
.article .wp-block-table.is-style-stripes table tbody tr:nth-child(odd) td {
  background: #FAFBFC;
}

.article .wp-block-table.is-style-stripes table th,
.article .wp-block-table.is-style-stripes table td {
  border-left: 0;
  border-right: 0;
}

.article table caption,
.article .wp-block-table figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: #7B7E85;
}

@media screen and (max-width: 576px) {
  .article table th,
  .article table td,
  .article .wp-block-table table th,
  .article .wp-block-table table td {
    padding: 10px 12px;
  }

  .article table tbody th,
  .article .wp-block-table table tbody th {
    width: auto;
  }
}
