/* ========================================
   基本要素スタイル
   HTML要素レベルの基礎的なスタイル（固定・安定）

   ボタン、リスト、テーブルなどの基本的な要素
   このファイルは固定的に運用（変更少ない）
======================================== */

.bold,
strong {
  font-weight: bold;
  font-family: var(--font_jp);
}

.marker {
  background: linear-gradient(transparent 50%, rgb(from var(--wp--preset--color--primary) r g b / 20%) 50%);
}

/* プライマリーカラーが背景になっている場合、文字色を白にする */
.has-primary-background-color :where(h1, h2, h3, h4, h5, h6, p, a, span, strong, em, small, time, dt, dd, dt, dd, dl, ul, ol, li, table, tr, th, td) {
  color: var(--wp--preset--color--primary-text);
}

/* ボタンの基本スタイル */
.entry-content .wp-block-buttons>.wp-block-button {
  display: block;
}

.wp-block-button .wp-block-button__link,
.wp-block-button .wp-element-button {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary-text);
  font-family: var(--font_jp);
  font-size: 17px;
  line-height: 1.5;
  padding: 12px 30px 12px 43px;
  position: relative;
  text-align: center;
  transition: opacity 0.3s;
  min-height: 52px;
  min-width: 220px;
}

.wp-block-button .wp-block-button__link::before,
.wp-block-button .wp-element-button::before {
  content: "";
  display: block;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  width: 8px;
  height: 8px;
  transform: rotate(-45deg);
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translateY(-50%) rotate(-45deg);
}

@media (any-hover:hover) {

  .wp-block-button .wp-block-button__link:focus-visible,
  .wp-block-social-links .wp-social-link a:focus-visible,
  .wp-block-button .wp-element-button:focus-visible {
    outline: 2px solid var(--wp--preset--color--border-color);
  }
}

@media (max-width: 782px) {
  .wp-block-button {
    width: 100%;
  }
}

.has-primary-background-color .wp-block-button .wp-block-button__link,
.has-primary-background-color .wp-block-button .wp-element-button {
  background-color: var(--wp--preset--color--primary-text);
  color: var(--wp--preset--color--primary);
}

.has-primary-background-color .wp-block-button .wp-block-button__link::before,
.has-primary-background-color .wp-block-button .wp-element-button ::before {
  border-color: var(--wp--preset--color--primary);
}

.has-primary-background-color .wp-block-button .wp-block-button__link:focus-visible,
.has-primary-background-color .wp-block-button .wp-element-button:focus-visible {
  background-color: var(--wp--preset--color--primary-text) !important;
  color: var(--wp--preset--color--primary) !important;
}


/* 輪郭ボタン（is-style-outlineスタイル） */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-element-button {
  background-color: transparent;
  border: 2px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:focus-visible,
.wp-block-button.is-style-outline .wp-element-button:focus-visible {
  background-color: var(--wp--preset--color--primary) !important;
  color: var(--wp--preset--color--primary-text) !important;
}

@media (any-hover:hover) {

  .wp-block-button.is-style-outline .wp-block-button__link:hover,
  .wp-block-button.is-style-outline .wp-element-button:hover {
    background-color: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--primary-text) !important;
  }
}

.has-primary-background-color .wp-block-button.is-style-outline .wp-block-button__link,
.has-primary-background-color .wp-block-button.is-style-outline .wp-element-button {
  color: var(--wp--preset--color--primary-text);
  border-color: var(--wp--preset--color--primary-text);
}

/* 矢印付きボタン（is-style-arrowスタイル） */
.wp-block-button.is-style-arrow .wp-block-button__link::before,
.wp-block-button.is-style-arrow .wp-element-button::before {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

:where(.wp-block-button__link),
:where(.wp-element-button) {
  border-radius: initial;
}

/* ボタン背景hoverをoklchで固定化 */
.wp-block-button .wp-block-button__link:focus-visible,
.wp-block-button .wp-element-button:focus-visible {
  opacity: 0.8;
}

@media (any-hover:hover) {

  .wp-block-button .wp-block-button__link:hover,
  .wp-block-button .wp-element-button:hover {
    opacity: 0.8;
  }
}

/* リストの基本スタイル */
li {
  position: relative;
}

:root :where(.wp-block-list li) {
  margin-top: 0.5rem;
}

ul.wp-block-list:not(.is-style-checklist):not(:where(ul.is-style-checklist *)) li {
  list-style: none;
  position: relative;
  padding-left: calc(5px + 1rem);
  display: block;
}

ul.wp-block-list:not(.is-style-checklist):not(:where(ul.is-style-checklist *)) li::before {
  content: "";
  display: block;
  background: var(--wp--preset--color--primary);
  border-radius: 50%;
  width: 5px;
  height: 5px;
  position: absolute;
  left: 0;
  top: calc(0.5em + 5px);
}


/*ボックス背景色がprimaryの時、ボタンとリストアイコンを白にする*/
.has-primary-background-color ul.wp-block-list:not(.is-style-checklist) li:before {
  background-color: var(--wp--preset--color--primary-text);
}

.has-primary-background-color ul.wp-block-list.is-style-checklist li:before {
  border-color: var(--wp--preset--color--primary-text);
}

ol.wp-block-list {
  counter-reset: number;
}

ol.wp-block-list>li {
  list-style: none;
  display: block;
  position: relative;
  padding-inline-start: 1.8rem;
}

ol.wp-block-list li:before {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary-text);
  border-radius: 15px;
  counter-increment: number;
  content: counter(number);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: calc(0.2rem + 4px);
  position: absolute;
  left: 0;
}


.has-primary-background-color ol.wp-block-list li:before {
  background-color: var(--wp--preset--color--primary-text);
  color: var(--wp--preset--color--primary);
}

.editor-styles-wrapper ol.wp-block-list li:before {
  padding-left: 0;
}

ol.wp-block-list li+li {
  margin-block-start: 5px;
}

/* テーブルブロック */
.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table>table tr th {
  font-weight: bold;
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary-text);
}

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table>table tr th,
.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table>table tr td {
  border: 1px solid var(--wp--preset--color--border-color);
  padding: 0.9rem;
}

/* テーブル2 */
.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-clinic-hours>table tr th,
.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-clinic-hours>table tr td {
  text-align: center;
}

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-style02>table tr th {
  text-align: center;
}

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-style02>table tr td {
  text-align: left;
}

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-style02>table tr:not(:first-child) th {
  background-color: var(--wp--preset--color--primary-light-bg);
  color: var(--wp--preset--color--base-black);
}

/* 診療時間 */

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-clinic-hours>table tr:not(:first-child) th {
  background-color: var(--wp--preset--color--primary-bg);
  color: var(--wp--preset--color--base-black);
}

@media (max-width: 782px) {

  .wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-clinic-hours>table th,
  .wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-clinic-hours>table td {
    padding: 5px 0;
    font-size: 12px;
  }

  .wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.table-clinic-hours>table tr:not(:first-child) th {
    font-size: 10px;
  }
}

/* リンク */
a[data-type="link"][target="_blank"]::after {
  content: "";
  background: url(../../images/share/icon_out.svg) no-repeat center/contain;
  width: 12px;
  height: 10px;
  display: inline-block;
  margin: 0 5px;
}


/* スマホでのテーブルスクロール対応 */
@media (max-width: 782px) {

  /* スクロール可能なテーブル */
  .wp-block-flexible-table-block-table.is-scroll-on-mobile {
    overflow-x: scroll;
  }

  .wp-block-flexible-table-block-table.is-scroll-on-mobile table {
    min-width: 150%;
    max-width: none;
  }

  /* スクロール可能テキスト */
  .wp-block-flexible-table-block-table.is-scroll-on-mobile::before {
    content: "スクロールできます";
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
  }

  .wp-block-flexible-table-block-table.is-scroll-on-mobile::before {
    background: url(../../images/share/icon_scroll.svg) no-repeat left center/30px 24.5px;
    padding-left: 40px;
  }
}
