/* ============================================================
   Engawa Theme — block-styles.css
   ------------------------------------------------------------
   register_block_style() で登録したコアブロック用スタイル。
   （includes/block-styles.php が登録、このファイルが装飾を担当）

   ⚠️ このファイルはフロントとエディタの両方で読み込まれる。
      assets.php:
        add_editor_style( 'assets/css/block-styles.css' )  ← エディタ
        wp_enqueue_style( 'engawa-block-styles', ... )     ← フロント

   ⚠️ .editor-styles-wrapper 接頭辞は書かないこと。
      iframe化されたエディタでは iframe 内の body に
      editor-styles-wrapper クラスが付くため、接頭辞なしで効く。
      接頭辞付きの複製を editor.css に置いていた結果、
      2026-07-23 時点で5箇所の値がズレていた（ボタン4件・見出し1件）。
      この統合により、以後は global 側の値が唯一の正となる。

   ⚠️ 「body .is-style-〜」という指定が一部にある。
      これは詳細度を上げるための既存の書き方で、そのまま移設した。
      エディタで効かない場合は body を外し、
      クラス2回書き（.is-style-x.is-style-x）に置き換えること。
   ============================================================ */

/* ── ボックススタイル ── */
.is-style-ew-box-border-gray,
.is-style-ew-box-dashed-gray,
.is-style-ew-box-border-accent,
.is-style-ew-box-dashed-accent,
.is-style-ew-box-bg-accent,
.is-style-ew-box-bg-light,
.is-style-ew-box-bg-gray,
.is-style-ew-box-note {
  padding: 1.4em 1.6em;
  border-radius: 2px;
}

/* 線枠（グレー） */
.is-style-ew-box-border-gray {
  border: 1.5px solid var(--ew-sand, #EDE4D5);
}

/* 線枠（アクセント色） */
.is-style-ew-box-border-accent {
  border: 1.5px solid var(--ew-accent);
}

/* 点線枠（グレー） */
.is-style-ew-box-dashed-gray {
  border: 1.5px dashed var(--ew-sand, #EDE4D5);
}

/* 点線枠（アクセント色） */
.is-style-ew-box-dashed-accent {
  border: 1.5px dashed var(--ew-accent);
}

/* 背景（アクセント色） */
.is-style-ew-box-bg-accent {
  background: var(--ew-accent);
  color: #fff;
}

/* 背景（薄アクセント色） */
.is-style-ew-box-bg-light {
  background: var(--ew-section-bg);
}

/* 背景（グレー） */
.is-style-ew-box-bg-gray {
  background: var(--ew-section-bg, #F5F0E8);
}

/* 注釈エリア */
.is-style-ew-box-note {
  background: var(--ew-section-bg, #F5F0E8);
  border-left: 3px solid var(--ew-taupe);
  border-radius: 0;
  font-size: 0.88em;
  color: var(--ew-text-sub);
}

/* ── リストブロックスタイル ── */
/* body を前置して詳細度を上げ、!importantなしでWordPressデフォルトに勝つ */
body .is-style-ew-list-check,
body .is-style-ew-list-good,
body .is-style-ew-list-bad,
body .is-style-ew-list-arrow,
body .is-style-ew-list-note {
  list-style: none;
  padding-left: 0;
  padding-inline-start: 0;
}
body .is-style-ew-list-check > li,
body .is-style-ew-list-good > li,
body .is-style-ew-list-bad > li,
body .is-style-ew-list-arrow > li,
body body .is-style-ew-list-note > li {
  position: relative;
  padding-left: 1.8em;
  padding-inline-start: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.7;
}
body body .is-style-ew-list-check > li::before,
body body .is-style-ew-list-good > li::before,
body body .is-style-ew-list-bad > li::before,
body body .is-style-ew-list-arrow > li::before,
body body .is-style-ew-list-note > li::before {
  position: absolute;
  left: 0;
  top: 0.1em;
  font-style: normal;
}

/* チェック */
.is-style-ew-list-check li::before {
  content: '✓';
  color: var(--ew-accent);
  font-weight: 700;
}

/* グッド（○） */
.is-style-ew-list-good li::before {
  content: '○';
  color: var(--ew-accent);
  font-weight: 700;
}

/* バッド（×） */
.is-style-ew-list-bad li::before {
  content: '✕';
  color: var(--ew-error, #b0454a);
  font-weight: 700;
}

/* 矢印 */
.is-style-ew-list-arrow li::before {
  content: '→';
  color: var(--ew-accent);
}

/* 注釈 */
.is-style-ew-list-note li {
  font-size: 0.88em;
  color: var(--ew-text-sub);
  padding-left: 1.8em;
}
.is-style-ew-list-note li::before {
  content: '※';
  color: var(--ew-text-sub);
}


/* ── Q&Aブロック（core/details）スタイル ── */

/* 共通ベース */
.is-style-ew-faq-accordion,
.is-style-ew-faq-open {
  border-top: 1px solid var(--ew-sand);
  margin-bottom: 0 !important;
}
.is-style-ew-faq-accordion + .is-style-ew-faq-accordion,
.is-style-ew-faq-open + .is-style-ew-faq-open,
.is-style-ew-faq-accordion + .is-style-ew-faq-open,
.is-style-ew-faq-open + .is-style-ew-faq-accordion {
  border-top: none;
}
.is-style-ew-faq-accordion:last-of-type,
.is-style-ew-faq-open:last-of-type {
  border-bottom: 1px solid var(--ew-sand);
}

/* Q（summary） */
.is-style-ew-faq-accordion > summary,
.is-style-ew-faq-open > summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 8px;
  font-family: var(--ew-font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ew-text);
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
  transition: color .2s;
}
.is-style-ew-faq-accordion > summary::-webkit-details-marker { display: none; }
.is-style-ew-faq-accordion > summary::marker { display: none; }

/* Q ラベル */
.is-style-ew-faq-accordion > summary::before,
.is-style-ew-faq-open > summary::before {
  content: 'Q';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ew-accent);
  color: #fff;
  font-family: var(--ew-font-sans);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* 開閉アイコン（アコーディオンのみ） */
.is-style-ew-faq-accordion > summary::after {
  content: '+';
  margin-left: auto;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 300;
  color: var(--ew-accent);
  transition: transform .3s;
  line-height: 1;
}
.is-style-ew-faq-accordion[open] > summary::after {
  transform: rotate(45deg);
}
.is-style-ew-faq-accordion > summary:hover {
  color: var(--ew-accent);
}

/* A（回答エリア） */
.is-style-ew-faq-accordion > *:not(summary),
.is-style-ew-faq-open > *:not(summary) {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 8px 20px;
  font-family: var(--ew-font-serif-body);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ew-text-sub);
}

/* A ラベル */
.is-style-ew-faq-accordion > *:not(summary)::before,
.is-style-ew-faq-open > *:not(summary)::before {
  content: 'A';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--ew-taupe);
  color: var(--ew-taupe);
  font-family: var(--ew-font-sans);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* 全開きは常に open 状態 */
.is-style-ew-faq-open {
  display: block;
}
.is-style-ew-faq-open > summary {
  pointer-events: none; /* クリック無効 */
  cursor: default;
}

/* ============================================================
   Engawa: ボタンブロック スタイル拡張
   ============================================================ */

/* 共通リセット・ベース */
.wp-block-button__link {
  transition: all .28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  letter-spacing: .06em;
  font-family: var(--ew-font-sans, sans-serif);
  font-weight: 600;
  font-size: 14px;
}

/* ── 線枠（アウトライン） ── */
.is-style-ln-btn-outline .wp-block-button__link {
  background: transparent !important;
  border: 2px solid currentColor !important;
  color: var(--ew-accent, #C07A52) !important;
  padding: 12px 28px;
  border-radius: 2px;
}
.is-style-ln-btn-outline .wp-block-button__link:hover {
  background: var(--ew-accent, #C07A52) !important;
  color: #fff !important;
  border-color: var(--ew-accent, #C07A52) !important;
}

/* ── テキスト＋矢印 ── */
.is-style-ln-btn-arrow .wp-block-button__link {
  background: transparent !important;
  color: var(--ew-accent, #C07A52) !important;
  padding: 8px 4px !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1.5px solid var(--ew-accent, #C07A52) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.is-style-ln-btn-arrow .wp-block-button__link::after {
  content: '→';
  font-size: 16px;
  transition: transform .25s ease;
  display: inline-block;
}
.is-style-ln-btn-arrow .wp-block-button__link:hover::after {
  transform: translateX(5px);
}
.is-style-ln-btn-arrow .wp-block-button__link:hover {
  background: transparent !important;
  opacity: .75;
}

/* ── 角丸ピル型 ── */
.is-style-ln-btn-pill .wp-block-button__link {
  border-radius: 999px !important;
  padding: 12px 32px;
  background: var(--ew-accent, #C07A52) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(192, 122, 82, .28);
}
.is-style-ln-btn-pill .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192, 122, 82, .36);
}

/* ── グラデーション ── */
.is-style-ln-btn-gradient .wp-block-button__link {
  background: linear-gradient(
    135deg,
    var(--ew-accent, #C07A52) 0%,
    var(--ew-gold, #C4944A) 100%
  ) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px;
  padding: 13px 30px;
  box-shadow: 0 4px 14px rgba(192, 122, 82, .3);
  position: relative;
  overflow: hidden;
}
.is-style-ln-btn-gradient .wp-block-button__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--ew-gold, #C4944A) 0%,
    var(--ew-accent, #C07A52) 100%
  );
  opacity: 0;
  transition: opacity .3s ease;
}
.is-style-ln-btn-gradient .wp-block-button__link:hover::before {
  opacity: 1;
}
.is-style-ln-btn-gradient .wp-block-button__link span {
  position: relative;
  z-index: 1;
}

/* ── ゴースト（透明・白文字想定） ── */
.is-style-ln-btn-ghost .wp-block-button__link {
  background: transparent !important;
  border: 1.5px solid rgba(255,255,255,.7) !important;
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.is-style-ln-btn-ghost .wp-block-button__link:hover {
  background: rgba(255,255,255,.15) !important;
  border-color: #fff !important;
}

/* ============================================================
   Engawa: 見出しブロック スタイル拡張
   ============================================================ */

/* 共通リセット */
.is-style-ln-h-line-left,
.is-style-ln-h-line-both,
.is-style-ln-h-border-left,
.is-style-ln-h-underline,
.is-style-ln-h-bg-accent,
.is-style-ln-h-badge,
.is-style-ln-h-stripe,
.is-style-ln-h-icon-star,
.is-style-ln-h-icon-leaf,
.is-style-ln-h-icon-camera {
  font-family: var(--ew-font-sans, sans-serif);
  letter-spacing: .06em;
}

/* ── 左ライン ── */
.is-style-ln-h-line-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.is-style-ln-h-line-left::before {
  content: '';
  display: block;
  width: 3px;
  height: 1em;
  background: var(--ew-accent, #C07A52);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── 両サイドライン ── */
.is-style-ln-h-line-both {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: center;
  justify-content: center;
}
.is-style-ln-h-line-both::before,
.is-style-ln-h-line-both::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ew-taupe, #C9B99A);
}

/* ── 左ボーダー ── */
.is-style-ln-h-border-left {
  border-left: 4px solid var(--ew-accent, #C07A52);
  padding-left: 16px;
  margin-left: 0;
}

/* ── アンダーライン ── */
.is-style-ln-h-underline {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ew-accent, #C07A52);
  position: relative;
}
.is-style-ln-h-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40%;
  height: 2px;
  background: var(--ew-taupe, #C9B99A);
}

/* ── アクセント背景 ── */
.is-style-ln-h-bg-accent {
  background: var(--ew-accent, #C07A52);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 2px;
}

/* ── バッジ（丸角背景） ── */
.is-style-ln-h-badge {
  background: var(--ew-section-bg, #FAF7F2);
  border: 1px solid var(--ew-sand, #EDE4D5);
  padding: 10px 24px;
  border-radius: 999px;
  display: inline-block;
}

/* ── ストライプ背景 ── */
.is-style-ln-h-stripe {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(192,122,82,.08) 4px,
    rgba(192,122,82,.08) 8px
  );
  padding: 10px 16px;
  border-left: 3px solid var(--ew-accent, #C07A52);
}

/* ── Font Awesome アイコン付き ── */
.is-style-ln-h-icon-star::before,
.is-style-ln-h-icon-leaf::before,
.is-style-ln-h-icon-camera::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--ew-accent, #C07A52);
  margin-right: 10px;
  font-size: .85em;
}
.is-style-ln-h-icon-star::before   { content: '\f005'; } /* fa-star */
.is-style-ln-h-icon-leaf::before   { content: '\f06c'; } /* fa-leaf */
.is-style-ln-h-icon-camera::before { content: '\f030'; } /* fa-camera */
