/**
 * WordPress標準テーブルブロックのスタイル（フロントエンド専用）
 * 管理画面（ブロックエディタ）には読み込まない。
 * ブロックエディタ内で読み込むと、td/th（編集可能な要素）が display:flex になり、
 * 空セルにカーソルを置けなくなる不具合が発生するため。
 */
.wp-block-table table,
.entry-content table,
.entry-body table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  margin: 20px 0;
}

.wp-block-table table caption,
.wp-block-table figcaption,
.entry-content table caption,
.entry-content figure figcaption,
.entry-body table caption,
.entry-body figure figcaption {
  color: #666666;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: normal;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 10px;
}

.wp-block-table table thead,
.entry-content table thead,
.entry-body table thead {
  display: none;
}

.wp-block-table table tbody,
.entry-content table tbody,
.entry-body table tbody {
  display: flex;
  flex-direction: column;
}

.wp-block-table table tr,
.entry-content table tr,
.entry-body table tr {
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 0;
  background-color: #f4f4f4;
}

.wp-block-table table tr:nth-child(even),
.entry-content table tr:nth-child(even),
.entry-body table tr:nth-child(even) {
  background-color: #ffffff;
}

.wp-block-table table tr:nth-child(odd),
.entry-content table tr:nth-child(odd),
.entry-body table tr:nth-child(odd) {
  background-color: #f4f4f4;
}

.wp-block-table table th,
.wp-block-table table td,
.entry-content table th,
.entry-content table td,
.entry-body table th,
.entry-body table td {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #000000;
  padding: 12px 10px;
  border: none;
  text-align: left;
  white-space: pre-wrap;
}

.wp-block-table table th,
.entry-content table th,
.entry-body table th {
  font-weight: 400;
  width: 80px;
  flex-shrink: 0;
  border-right: 1px solid #d6d2c8;
}

.wp-block-table table td,
.entry-content table td,
.entry-body table td {
  font-weight: 400;
  flex: 1;
  min-width: 0;
}

.wp-block-table table td:not(:last-child),
.entry-content table td:not(:last-child),
.entry-body table td:not(:last-child) {
  border-right: 1px solid #d6d2c8;
}
