@charset "utf-8";
/* ==================================================
ブログ記事サイドバーの相談フォーム 26.11.17
template-parts/sidebar-form.php／functions/sidebar-form.php（ブログの記事詳細・一覧・タグ一覧のみ読み込み）
色はサイトに合わせる：青 #006cc9（サイドバー見出し）／オレンジ #ff7646（予約ボタン）／薄い青 #f4f8fb（フォーム部分）・#cee1f2（電話欄）
================================================== */

/* ---------- 追従（PCのみ）：サイドバー全体（フォーム＋人気記事＋最近の投稿） ---------- */
@media only screen and (min-width: 768px) {
  .blog_container .blog_aside {
    top: 101px !important; /* 固定ヘッダー（85px）＋すき間16px。footer.php のスクリプトがサイドバーの下端を画面に合わせる top（マイナス値）を直接書き込むので、!important で上書きしてフォームを常に画面内に残す */
    max-height: calc(100vh - 117px); /* 画面より長い分はサイドバーの中でスクロール */
    overflow-y: auto;
    scrollbar-width: thin;
    overscroll-behavior: contain;
  }
}

/* ---------- 枠 ---------- */
.sbf {
  /* 枠線では囲まず、背景色で区切る（BIRDYのサイドバーフォームと同じ考え方）。
     色は見出し・フォーム・電話欄それぞれに付ける */
  background: transparent;
  font-size: 1.4rem;
  line-height: 1.5;
}

@media only screen and (max-width: 767px) {
  .sbf {
    margin-top: 0;
  }
}

/* ---------- 見出し ---------- */
.sbf_head {
  padding: 16px 10px 18px;
  background: #006cc9;
  color: #fff;
  text-align: center;
}

.sbf_catch {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0;
  white-space: nowrap; /* 「＼ … ／」が途中で折り返さないように */
}

.sbf_ttl {
  margin: 4px 0 0;
  font-size: 2.4rem;
  font-weight: bold;
  line-height: 1.4;
}

.sbf_badges {
  display: flex;
  flex-direction: column; /* 上下に並べる */
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.sbf_badges li {
  min-width: 200px; /* 2つの幅を揃える */
  margin: 0;
  padding: 2px 14px;
  background: #fff;
  color: #006cc9;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.6;
  text-align: center;
}

/* 「無料」「10%割引」を強調（オレンジはサイトのCTAボタン・「10%割引」と同じ色） */
.sbf_badges strong {
  margin: 0 1px;
  color: #ff7646;
  font-size: 1.4rem; /* 大きくしすぎると見出しの「相続の無料相談」と目立ち合うので、色で強調して大きさは控えめに */
  font-weight: bold;
  line-height: 1;
}

/* ---------- フォーム ---------- */
.sbf_body {
  padding: 20px 16px 28px; /* 送信ボタンの下にも少し余白 */
  background: #f4f8fb; /* フォーム部分はサイトの薄い青（#f4f8fb）、入力欄は白 */
}

.sbf_field + .sbf_field {
  margin-top: 16px;
}

.sbf_label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: bold;
}

.sbf_tag {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid #6f7579;
  border-radius: 2px;
  color: #6f7579;
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1.5;
}

.sbf_tag--req {
  border-color: #ff7646;
  background: #ff7646;
  color: #fff;
}

.sbf input[type="text"],
.sbf input[type="email"],
.sbf select,
.sbf textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #dcdfe3;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 1.6rem; /* iPhoneで入力時にズームしないよう16px */
  line-height: 1.4;
}

.sbf input::placeholder,
.sbf textarea::placeholder {
  color: #9aa1a6;
}

.sbf input:focus,
.sbf select:focus,
.sbf textarea:focus {
  outline: none;
  border-color: #006cc9;
  background: #fff;
}

.sbf textarea {
  height: 96px;
  resize: vertical;
}

/* 都道府県 */
.sbf_select {
  position: relative;
}

.sbf_select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  cursor: pointer;
}

.sbf_select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 2px solid #6f7579;
  border-bottom: 2px solid #6f7579;
  transform: rotate(45deg);
  pointer-events: none;
}

.sbf_note {
  margin: 4px 0 0;
  color: #6f7579;
  font-size: 1.1rem; /* PCのサイドバー幅で1行に収まるように */
}

/* ご相談内容（2列） */
.sbf_checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sbf_checks .error {
  grid-column: 1 / -1;
}

/* チェックボックス：common.css の作り（本物のチェックボックスは透明にして、文字の前の ::before で四角、::after でチェックを描く）を使い、
   四角の位置を文字の高さの真ん中に合わせる */
.sbf label {
  display: inline-block;
  margin: 0;
  cursor: pointer;
}

.sbf label input[type="checkbox"] + span {
  padding-left: 22px;
  line-height: 1.5;
}

.sbf label input[type="checkbox"] + span::before {
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 1px solid #9aa3ab;
  border-radius: 2px;
  background-color: #fff;
}

.sbf label input[type="checkbox"] + span::after {
  top: 50%;
  margin: -6px 0 0 6px; /* 四角（16px）の中央にチェックを置く */
  width: 5px;
  height: 9px;
}

.sbf label input[type="checkbox"]:checked + span::before {
  border-color: #006cc9;
  background-color: #fff;
}

.sbf label input[type="checkbox"]:checked + span::after {
  border-color: #006cc9;
}

/* キーボードで選んだときに分かるように */
.sbf label input[type="checkbox"]:focus-visible + span::before {
  outline: 2px solid #006cc9;
  outline-offset: 2px;
}

/* 同意 */
.sbf_agree {
  margin-top: 20px;
  text-align: center;
}

.sbf_agree a {
  color: #006cc9;
  text-decoration: underline;
}

/* 入力エラー（MW WP Form） */
.sbf .error {
  display: block;
  margin-top: 4px;
  color: #d93025;
  font-size: 1.2rem;
}

/* reCAPTCHA（プラグインが送信ボタンの直前に差し込む）
   本体は幅304px固定で、PCのサイドバー（入力欄の幅 約250px）より広い。
   はみ出した状態でも真ん中に来るよう flex で中央に置き、0.82倍に縮小して入力欄の幅に収める */
.sbf .g-recaptcha {
  display: flex;
  justify-content: center;
  margin: 0 0 16px !important; /* reCAPTCHAは送信ボタンと同じ箱（.sbf_submit_area）の中に入るので、ボタンとの間はここであける */
  height: 64px; /* 縮小後の高さ（78px × 0.82 ≒ 64px）。縮小しても元の高さ分の余白が残らないように */
}

.sbf .g-recaptcha > div {
  flex-shrink: 0;
  margin: 0 !important;
  transform: scale(0.82);
  transform-origin: center top;
}

@media only screen and (max-width: 767px) {
  .sbf .g-recaptcha {
    height: auto;
  }

  .sbf .g-recaptcha > div {
    transform: none;
  }
}

/* 送信ボタン */
.sbf_submit_area {
  margin-top: 16px; /* 同意欄との間 */
}

.sbf .sbf_submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 8px 16px;
  border: none;
  background: #ff7646;
  color: #fff;
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
}

/* 矢印：TOPのサービス紹介のボタン（.tr_link）と同じ画像・大きさ・位置にそろえる
   文字の「→」は隠して、白い矢印画像（plan_arr_w@2x.png）を右端に置く */
.sbf .sbf_submit {
  position: relative;
  padding-right: 48px;
  padding-left: 48px; /* 文字が真ん中からずれないよう左右同じ */
}

.sbf .sbf_submit_arrow {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 20px;
  height: 6px;
  margin-top: -3px;
  background: url("../images/index/plan_arr_w@2x.png") no-repeat center / 20px auto;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.sbf .sbf_submit:not(:disabled):hover {
  opacity: 0.8; /* 押せるときだけ、ほかのボタンと同じく薄くする */
}

/* reCAPTCHAにチェックするまでは押せない（プラグインが disabled にする）。
   薄いオレンジだとホバー中に見えるので、押せない間はグレー（お問い合わせページの押せないボタンと同じ #ccc）。チェックするとオレンジになる */
.sbf .sbf_submit:disabled {
  background: #ccc;
  opacity: 1;
  cursor: not-allowed;
}

/* ---------- 電話 ---------- */
.sbf_tel {
  padding: 16px 16px 18px;
  background: #cee1f2; /* サイトの薄い青のうち、フォーム部分（#f4f8fb）より濃い色で目立たせる */
  text-align: center;
}

.sbf_tel_lead {
  margin: 0;
  font-size: 1.4rem;
  font-weight: bold;
}

.sbf_tel_num {
  display: inline-block;
  margin-top: 2px;
  color: #006cc9;
  font-size: 3rem;
  font-weight: bold;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.sbf_tel_num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 電話アイコン：ヘッダーの電話番号と同じ形（images/icon_tel_w.svg）を、サイトの青で塗る */
.sbf_tel_num::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 28px;
  background-color: #006cc9;
  -webkit-mask: url("../images/icon_tel_w.svg") no-repeat center / contain;
  mask: url("../images/icon_tel_w.svg") no-repeat center / contain;
}

.sbf_tel_time {
  margin: 2px 0 0;
  color: #313131;
  font-size: 1.2rem;
}

/* ---------- 下の人気記事との間 ---------- */
.blog_container .blog_aside .sbf {
  margin-bottom: 40px;
}