/*
 * 汎用見出しパターン 中黒付き見出し
 */

/* 見出しタグ自体のスタイル */
.bullet-heading-block {
  display: flex;
  align-items: center;
  margin: 1em 0 !important;
  background: none !important;
  padding: 0 0 0 33px !important;
  border: none !important;
  box-shadow: none !important;
}

/* 内側のコンテナ */
.bullet-heading {
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

/* 見出しテキスト（span要素） */
span.heading-text {
  flex-grow: 1;
  margin: 0 !important;
  background: none !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  font-size: inherit;
  /* 親の見出しタグのサイズを継承 */
  font-weight: inherit;
  /* 親の見出しタグの太さを継承 */
  word-break: break-all;
}

/* 中黒を疑似要素で追加（優先度を上げる） */
h2.bullet-heading-block::before,
h3.bullet-heading-block::before,
h4.bullet-heading-block::before {
  content: '・' !important;
  display: inline-block !important;
  color: #ffb07c;
  font-weight: bold;
  line-height: 1;
  font-size: 30px;
  position: absolute;
  left: 0;
  top: -2px
}

/* 見出しレベル別フォントサイズ（見出しタグに適用） */
h2.bullet-heading-block {
  font-size: 24px !important;
  font-weight: bold !important;
  line-height: 1.6;
  position: relative;
}

h3.bullet-heading-block {
  font-size: 22px !important;
  font-weight: bold !important;
  line-height: 1.6;
  position: relative;
}

h4.bullet-heading-block {
  font-size: 20px !important;
  font-weight: bold !important;
  line-height: 1.6;
  position: relative;
}

/* エディター用（編集画面でフォントサイズ変更を確認するため） */
.wp-block-editor h2.bullet-heading-block {
  font-size: 24px !important;
  font-weight: bold !important;
  line-height: 1.6;
}

.wp-block-editor h3.bullet-heading-block {
  font-size: 22px !important;
  font-weight: bold !important;
  line-height: 1.6;
}

.wp-block-editor h4.bullet-heading-block {
  font-size: 20px !important;
  font-weight: bold !important;
  line-height: 1.6;
}

/* エディター専用スタイル */
.wp-block-editor .bullet-heading.is-selected {
  background: #f0f6fc;
  border: 1px dashed #007cba;
  border-radius: 4px;
  padding: 0.5em;
}

/* テーマの見出しスタイルをリセット */
h2.bullet-heading-block,
h3.bullet-heading-block,
h4.bullet-heading-block {
  margin: 1em 0 !important;
  padding: 0 0 0 33px !important;
  border: none !important;
  background: none !important;
}

/* テーマの疑似要素を無効化（::beforeは除外） */
h2.bullet-heading-block::after,
h3.bullet-heading-block::after,
h4.bullet-heading-block::after {
  display: none !important;
  content: none !important;
}