/* =========================================================
   wp.css — WordPress / プラグイン出力まわりのデザイン調整
   ・Snow Monkey Forms などWP側が吐き出すHTMLの見た目をここで上書きする
   ・style.css の後に読み込むため、ここでの指定が優先される
   ・SMF本体CSSに負けないよう `.ct-form .smf-form` 始まりで詳細度を確保
   ========================================================= */

/* ---------------------------------------------------------
   お問い合わせフォーム（Snow Monkey Forms / simple-table 出力）
   --------------------------------------------------------- */

/* フォーム見出し（お問い合わせフォーム / Contact form）を中央寄せ */
.ct-form .ct-form__head {
  text-align: center;
}

/* フォーム／お電話／資料請求のセクションボックス上部に赤ライン
   .ct-form は contact・member 両方で使用＝資料請求にも効く */
.ct-form,
.ct-tel {
  border-top: 5px solid var(--red);
}
/* .ct-form は元々上余白が無いので、赤ラインと中身の間に余白を足す（.ct-tel は既存6remのまま） */
.ct-form {
  padding-top: 4rem;
}

/* 行の区切り線は無し（style.css と SMF 既定の両方を上書き） */
.ct-form .smf-form .smf-item,
.ct-form .smf-form .smf-item--divider {
  border: none;
}

/* 各行の余白（ゆったりめ） */
.ct-form .smf-form .smf-item {
  padding: 2.3rem 0;
}

/* チェックボックス選択肢の要素間 */
.ct-form .smf-form .smf-checkboxes-control__control .smf-label + .smf-label {
  margin-top: 0.5rem;
}

/* ラベル列：ラベルテキスト＋必須バッジを横並びに */
.ct-form .smf-form .smf-item__col--label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.ct-form .smf-form .smf-item__label { padding-top: 0; }
.ct-form .smf-form .smf-item__label__text {
  font-size: 1.6rem;
  font-weight: 700;
}

/* 必須バッジ（description に「必須」テキストを入れている）を赤バッジ化 */
.ct-form .smf-form .smf-item__description {
  display: inline-block;
  margin-left: auto; /* ラベル列の右端に寄せる */
  background: var(--red);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.5rem 0.9rem;
}

/* 入力欄の余白を少し広げる */
.ct-form .smf-form .smf-text-control__control,
.ct-form .smf-form .smf-email-control__control,
.ct-form .smf-form .smf-tel-control__control,
.ct-form .smf-form .smf-url-control__control,
.ct-form .smf-form .smf-textarea-control__control,
.ct-form .smf-form .smf-select-control__control {
  /* SMF本体が calc(var(--_space)*.25 .5) で padding を指定しているため !important で上書き */
  padding: 1.8rem 1.6rem !important;
}

/* 説明文（divider内の段落テキスト）の行間を広げる */
.ct-form .smf-form .smf-item--divider p {
  line-height: 2;
}

/* 送信完了メッセージの行間 */
.ct-form .smf-complete-content p {
  line-height: 2;
}

/* 説明文（divider）の段落内に置いた span（「必須」）を赤バッジ化
   ※span は「必須」の語に付けること（別の語に付けるとその語がバッジ化される） */
.ct-form .smf-form .smf-item--divider p span {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.5rem 0.9rem;
  margin-left: 0.8rem;
  vertical-align: middle;
}

/* 説明文中のリンクは赤文字＋下線 */
.ct-form .smf-form .smf-item--divider p a {
  color: var(--red);
  text-decoration: underline;
}

/* プライバシーポリシー同意（divider内のチェックボックス）を中央寄せ */
.ct-form .smf-form .smf-item--divider .smf-item__controls { text-align: center; }
.ct-form .smf-form .smf-item--divider .smf-checkboxes-control__control { justify-content: center; }
.ct-form .smf-form .smf-item--divider .smf-checkboxes-control .smf-label > label {
  display: inline-flex;
  justify-content: center;
}

/* ---------------------------------------------------------
   GTranslate 言語スイッチャー（ヘッダー内 .header__lang）
   --------------------------------------------------------- */

/* GTranslate標準は .gt_option（言語リスト）が position:relative・height:0→auto で
   フロー内で開くため、開くと .header__lang の高さが伸びる。
   親 .header__nav は align-items:center なので、伸びた瞬間に箱ごと縦再センタリングされ
   スイッチャーが上方向に飛ぶ。リストを絶対配置で浮かせてレイアウトに影響させない */
/* GTranslateのインライン<style>（.gt_container--xxx .gt_switcher .gt_option＝詳細度3）に
   勝つため、.header__nav を足して詳細度4で上書きする。
   ※位置基準は .header__lang にする。.gt_switcher は overflow:hidden（GTの開閉アニメ用）の
     ため、そこを基準にすると箱外に出たリストが切り取られて消える。包含ブロックを
     overflow:hidden を持たない祖先 .header__lang にすれば、CSS仕様上クリップされない */
.header__nav .header__lang { position: relative; }
.header__nav .header__lang .gt_switcher .gt_option {
  position: absolute;
  top: 100%;
  left: 0;
  width: 171px;
  z-index: 9998;
}

/* ---------------------------------------------------------
   パンくずリスト（Rank Math rank_math_the_breadcrumbs 出力）
   旧 .breadcrumb と同じ見た目を .rank-math-breadcrumb に適用
   出力構造：.rank-math-breadcrumb > p（a / span.separator / span.last）
   --------------------------------------------------------- */
.rank-math-breadcrumb {
  padding: 1.2rem var(--side);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--gray-bg);
}
.rank-math-breadcrumb p {
  max-width: var(--inner);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 1.3rem;
  color: var(--dark);
}
.rank-math-breadcrumb a {
  color: var(--dark);
  text-decoration: none;
}
.rank-math-breadcrumb a:hover { color: var(--red); }
/* 区切りは旧仕様の「›」に統一（RM標準の区切り文字は隠して差し替え） */
.rank-math-breadcrumb .separator {
  font-size: 0;
  margin: 0 0.8rem;
}
.rank-math-breadcrumb .separator::before {
  content: "›";
  font-size: 1.3rem;
  color: var(--dark);
}
