/* ======================= */
/* common */

/* single.cssでthe_content出力部分すべて + editorの共通部分のみ記入
（すべてのeditorに反映されるため、ページ分岐はCSSクラスで管理）*/
/* ======================== */
/* コラム投稿画面で使用中
フロントデザイン用クラス名：
  .column-single__contents
エディタのみクラス例：
  .post-type-column .editor-styles-wrapper */

/* h2 {
	font-size: 100px;
} */

.column-single__contents {
  display: grid;
  row-gap: 40px;
  padding-top: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
}

.column-single__contents,
.post-type-column.editor-styles-wrapper .wp-block-post-content {
  border-top: 1px solid var(--colorGray350);
  position: relative;
}

.column-single__contents::after,
.post-type-column.editor-styles-wrapper .wp-block-post-content::after {
  content: "";
  background-color: var(--colorRed);
  width: 7.5rem;
  height: 1px;
  position: absolute;
  top: -1px;
  left: 0;
}

.column-single__contents h2,
.post-type-column.editor-styles-wrapper h2 {
  border-left: 1px solid var(--colorRed);
  letter-spacing: 0.05em;
  line-height: 1.5;
  font-size: 2rem;
  font-weight: 700;
  padding-left: 2rem;
  margin-top: 2.5rem;
}

.column-single__contents h3,
.post-type-column.editor-styles-wrapper h3 {
  border-bottom: 1px solid var(--colorGray350);
  letter-spacing: 0.05em;
  line-height: 1.5;
  font-size: 1.75rem;
  font-weight: 700;
  padding-bottom: 1.5rem;
  margin-top: 2.5rem;
}

.column-single__contents h4,
.post-type-column.editor-styles-wrapper h4 {
  background-color: var(--colorWhite);
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 0.5em 1em;
  margin-top: 2.5rem;
  white-space: normal;
  overflow-wrap: break-word;
}

.column-single__contents p,
.post-type-column.editor-styles-wrapper p {
  line-height: 2;
  font-weight: 400;
}

/* 丸リスト */
.column-single__contents ul li,
.post-type-column.editor-styles-wrapper ul li {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  padding-left: 1.5rem;
  position: relative;
}

.column-single__contents ul li + li,
.post-type-column.editor-styles-wrapper ul li + li {
  margin-top: 1rem;
}

.column-single__contents ul li::before {
  content: "";
  background-color: var(--colorRed);
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  position: absolute;
  opacity: 0.2;
  width: 1rem;
  height: 1rem;
  top: 0.2925rem;
  left: 0;
}

.column-single__contents ul li::after {
  content: "";
  background-color: var(--colorRed);
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  top: 0.5425rem;
  left: 0.25rem;
}

/* 数字リスト */
.column-single__contents ol,
.post-type-column.editor-styles-wrapper ol {
  counter-reset: first-list;
}

.column-single__contents ol li + li,
.post-type-column .editor-styles-wrapper ol li + li {
  margin-top: 1rem;
}

.column-single__contents ol li,
.post-type-column.editor-styles-wrapper ol li {
  counter-increment: first-list;
  padding-left: 1.5rem;
  line-height: 1.8;
  position: relative;
}

.column-single__contents ol li::after,
.post-type-column.editor-styles-wrapper ol li::after {
  color: var(--colorRed);
  content: counter(first-list);
  font-family: var(--familyRoboto);
  font-size: 1.125rem;
  font-weight: 700;
  left: 0.1rem;
  line-height: 1.5;
  position: absolute;
  top: 0.1rem;
}

.column-single__contents ol li > ol,
.post-type-column.editor-styles-wrapper ol li > ol {
  counter-reset: second-list;
  gap: 1rem;
  margin-top: 1rem;
  position: relative;
}

.column-single__contents ol li > ol li,
.post-type-column.editor-styles-wrapper ol li > ol li {
  counter-increment: second-list;
  padding-left: 2rem;
  position: relative;
}

.column-single__contents ol li > ol li::after,
.post-type-column.editor-styles-wrapper ol li > ol li::after {
  content: "(" counter(second-list) ")";
  font-weight: 400;
  position: absolute;
}

.column-single__contents p > a,
.post-type-column.editor-styles-wrapper p > a {
  color: var(--colorBlack);
  text-decoration: underline;
  line-height: 2;
  font-weight: 400;
  font-size: 1rem;
  transition: all 0.3s;
}

.column-single__contents p > a:hover,
.column-single__contents p > a:focus {
  color: var(--colorRed);
  text-decoration: none;
  opacity: 1;
}

.column-single__contents .wp-block-image,
.post-type-column.editor-styles-wrapper .wp-block-image {
  width: fit-content;
  margin: 0 auto;
}

/* 画像 */
.column-single__contents .wp-block-image img,
.post-type-column.editor-styles-wrapper .wp-block-image img {
  width: clamp(45rem, -56.818rem + 127.27vw, 62.5rem);
  margin: 0 auto;
  border-radius: 1rem;
}

/* キャプション */
.column-single__contents .wp-element-caption,
.post-type-column.editor-styles-wrapper .wp-element-caption {
  font-size: 0.875rem;
  color: #44444d;
  text-align: left;
}

/* YouTube */
.column-single__contents .wp-block-embed-youtube .wp-block-embed__wrapper,
.post-type-column.editor-styles-wrapper
  .wp-block-embed-youtube
  .wp-block-embed__wrapper {
  width: clamp(45rem, -56.818rem + 127.27vw, 62.5rem);
  aspect-ratio: 16/9;
  margin: 0 auto;
  max-width: 100%;
}

.column-single__contents
  .wp-block-embed-youtube
  .wp-block-embed__wrapper
  iframe,
.post-type-column.editor-styles-wrapper
  .wp-block-embed-youtube
  .wp-block-embed__wrapper
  iframe {
  width: 100%;
  height: 100%;
}

/* 外部リンク */
.column-single__contents,
.post-type-column.editor-styles-wrapper {
  p > a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    margin: 0 1rem 0.25rem 0.5rem;
    background: url(../../images/common/icon-target-red-nomargin.svg) no-repeat
      center / contain;
    vertical-align: text-bottom;
  }
}

/* テーブル */
.column-single__contents .wp-block-table,
.post-type-column.editor-styles-wrapper .wp-block-table {
  overflow-x: auto;
  padding-bottom: 0.5rem;

  table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
  }

  thead {
    border: none;
    overflow: hidden;

    th {
      background-color: #44444d;
      color: var(--colorWhite);
      font-weight: 700;
      line-height: 1.5;
      padding: 1em;
      border: none;
      text-align: left;
			border-right: 1px solid var(--colorGray750);
    }
    th:first-child {
      width: 30%;
      border-radius: 1rem 0 0 0;
    }
    th:last-child {
			border-right: none;
      border-radius: 0 1rem 0 0;
    }
  }

  tbody {
    td {
      border: none;
      border-bottom: 1px solid var(--colorGray350);
      padding: 1em;
      font-size: 1rem;
      -webkit-text-size-adjust: 100%;
      line-height: 1.5;
      font-weight: 400;
      background: var(--colorWhite);
			border-right: 1px solid var(--colorGray350);
			&:last-child {
				border-right: none;
			}
    }
    tr:last-child {
      td {
        border-bottom: none;
      }
      td:first-child {
        border-radius: 0 0 0 1rem;
      }
      td:last-child {
        border-radius: 0 0 1rem 0;
      }
    }
  }
}

/* カラムブロック（2カラム）使用時 */
.wp-block-columns.is-layout-flex {
  gap: 2.5rem;
}

@media screen and (max-width: 767px) {
  .column-single__contents h2,
  .post-type-column.editor-styles-wrapper h2 {
    font-size: var(--size24);
    padding-left: var(--size16);
    margin-top: var(--size32);
  }

  .column-single__contents h3,
  .post-type-column.editor-styles-wrapper h3 {
    font-size: var(--size20);
    padding-bottom: var(--size24);
    margin-top: var(--size32);
  }

  .column-single__contents h4,
  .post-type-column.editor-styles-wrapper h4 {
    font-size: var(--size18);
    padding: 0.889em;
    margin-top: var(--size32);
  }

  .column-single__contents::after,
  .post-type-column.editor-styles-wrapper .wp-block-post-content::after {
    width: 18.8%;
  }

  /* 丸リスト */
  .column-single__contents ul li,
  .post-type-column.editor-styles-wrapper ul li {
    font-size: var(--size16);
    padding-left: var(--size24);
  }

  .column-single__contents ul li::before {
    width: var(--size16);
    height: var(--size16);
    top: clamp(
      0.2925rem * var(--sp-scale-min),
      calc(4.68 * 100vw / 390),
      0.2925rem * var(--sp-scale-max)
    );
  }

  .column-single__contents ul li::after {
    width: var(--size8);
    height: var(--size8);
    top: clamp(
      0.5425rem * var(--sp-scale-min),
      calc(8.68 * 100vw / 390),
      0.5425rem * var(--sp-scale-max)
    );
    left: var(--size4);
  }

  .column-single__contents ul li + li {
    margin-top: var(--size16);
  }

  /* 数字リスト */
  .column-single__contents ol,
  .post-type-column.editor-styles-wrapper ol {
    padding-left: var(--size24);
  }

  .column-single__contents ol li::after,
  .post-type-column.editor-styles-wrapper ol li::after {
    font-size: var(--size18);
    left: clamp(
      0.1875rem * var(--sp-scale-min),
      calc(3 * 100vw / 390),
      0.1875rem * var(--sp-scale-max)
    );
    top: clamp(
      0.08rem * var(--sp-scale-min),
      calc(1.28 * 100vw / 390),
      0.08rem * var(--sp-scale-max)
    );
  }

  .column-single__contents ol li + li,
  .post-type-column.editor-styles-wrapper ol li + li {
    margin-top: var(--size16);
  }

  .column-single__contents ol li > ol,
  .post-type-column.editor-styles-wrapper ol li > ol {
    padding-left: var(--size24);
  }

  .wp-block-image.size-full > img {
    width: 100%;
  }

  .column-single__contents p > a,
  .post-type-column.editor-styles-wrapper p > a {
    font-size: var(--size16);
  }

  /* テーブル */
  .column-single__contents .wp-block-table,
  .post-type-column.editor-styles-wrapper .wp-block-table {
    overflow-x: auto;
    padding-bottom: var(--size8);
  }

  .wp-block-columns.is-layout-flex {
    gap: var(--size24);
  }

  /* 画像 */
  .column-single__contents .wp-block-image img,
  .post-type-column.editor-styles-wrapper .wp-block-image img {
    border-radius: var(--size16);
  }
}
