@charset "UTF-8";
/* =====================================================================
 * お問い合わせフォーム（Snow Monkey Forms）  2026-10
 *   functions.php の futawa_form_assets() が、新しいフォームを表示するページだけで読み込む。
 *   すべて .contactPage の内側に限定する。
 *   Bootstrap 3 のテーマなので 1rem = 10px（html { font-size: 10px }）。
 * ===================================================================== */

.contactPage .snow-monkey-form {
  max-width: 760px;
  margin-top: 1em;
  font-size: 15px;
}

/* プログレストラッカー（入力画面・確認画面・完了画面）の上下の余白 */
.contactPage .smf-progress-tracker {
  margin-top: 30px;
  margin-bottom: 40px;
}

/* 項目のラベルと説明
 *   ラベルと説明は近づけ、説明（ラベル）と入力欄の間は少し空ける。
 *   Snow Monkey Forms の構造：.smf-item__col--label（.smf-item__label＋.smf-item__description）→ .smf-item__col--controls */
.contactPage .smf-item {
  margin-bottom: 22px;
}
.contactPage .smf-item__col--label {
  margin-bottom: 8px;
}
.contactPage .smf-item__label {
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.5;
}
.contactPage .smf-item__description {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 2px;
  margin-bottom: 4px;
}

/* 入力欄（スマートフォンで拡大されないよう 16px 以上） */
.contactPage .smf-text-control__control,
.contactPage .smf-textarea-control__control {
  font-size: 16px;
  width: 100%;
  max-width: 30em;
}
.contactPage .smf-textarea-control__control {
  max-width: 100%;
}

/* 郵便番号は短く、住所（テキストエリア）は他の入力欄と同じ幅 */
.contactPage input[name="visit_zip"],
.contactPage input[name="install_zip"] {
  max-width: 10em;
}
.contactPage textarea[name="visit_address"],
.contactPage textarea[name="install_address"] {
  max-width: 30em;
}

/* ラジオボタン・チェックボックス */
.contactPage .smf-radio-buttons-control__control,
.contactPage .smf-checkboxes-control__control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 2em;
}
.contactPage .smf-label {
  font-weight: normal;
}

/* 住所の欄：種類が「無料見積・ご相談」「メンテナンスサービスのお申込」のときだけ表示 */
.contactPage .snow-monkey-form .ftw-address {
  display: none;
}
.contactPage .snow-monkey-form:has(input[name="inquiry_type"][value="無料見積・ご相談"]:checked) .ftw-address,
.contactPage .snow-monkey-form:has(input[name="inquiry_type"][value="メンテナンスサービスのお申込"]:checked) .ftw-address,
.contactPage .snow-monkey-form[data-screen="confirm"]:has(input[type="hidden"][name="inquiry_type"][value="無料見積・ご相談"]) .ftw-address,
.contactPage .snow-monkey-form[data-screen="confirm"]:has(input[type="hidden"][name="inquiry_type"][value="メンテナンスサービスのお申込"]) .ftw-address {
  display: block;
}

/* 住所の欄を、旧フォームのように「お伺いする先」「設置予定」の2つの枠にまとめる
 *   郵便番号の項目を枠の上半分、住所の項目を下半分にする（入力欄の name で判定するので、管理画面の設定は不要）。
 *   確認画面でも同じ name の hidden 入力があるので、枠はそのまま出る。 */
.contactPage .smf-item:has([name="visit_zip"]),
.contactPage .smf-item:has([name="install_zip"]),
.contactPage .smf-item:has([name="visit_address"]),
.contactPage .smf-item:has([name="install_address"]) {
  max-width: 540px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  padding-left: 20px;
  padding-right: 20px;
}
.contactPage .smf-item:has([name="visit_zip"]),
.contactPage .smf-item:has([name="install_zip"]) {
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding-top: 16px;
  margin-bottom: 0;
}
.contactPage .smf-item:has([name="visit_address"]),
.contactPage .smf-item:has([name="install_address"]) {
  border-top: 0;
  border-radius: 0 0 4px 4px;
  padding-top: 10px;
  padding-bottom: 18px;
}
@media (max-width: 767px) {
  .contactPage .smf-item:has([name="visit_zip"]),
  .contactPage .smf-item:has([name="install_zip"]),
  .contactPage .smf-item:has([name="visit_address"]),
  .contactPage .smf-item:has([name="install_address"]) {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* 住所の欄が現れるときのアニメーション（旧フォームの slideDown の代わり。確認画面では動かさない） */
.contactPage .snow-monkey-form:not([data-screen="confirm"]) .ftw-address {
  animation: ftw-address-in 0.35s ease-out;
}
@keyframes ftw-address-in {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .contactPage .snow-monkey-form .ftw-address {
    animation: none;
  }
}

/* ボタン */
.contactPage .smf-action {
  margin-top: 30px;
  text-align: center;
}

/* Turnstile：送信ボタンと同じく中央に寄せ、ボタンとの間を空ける */
.contactPage .snow-monkey-forms-turnstile > div {
  justify-content: center;
}
.contactPage .snow-monkey-forms-turnstile--position\:after {
  margin-top: 28px;
}
.contactPage .snow-monkey-forms-turnstile--position\:before {
  margin-bottom: 28px;
}
.contactPage .smf-button-control__control {
  min-width: 12em;
  font-size: 16px;
}

/* エラー */
.contactPage .smf-error-messages {
  color: #c0392b;
  font-size: 14px;
  margin-top: 4px;
}

/* 完了画面：Turnstile の表示（「成功しました!」）を隠す */
.contactPage .snow-monkey-form[data-screen="complete"] .snow-monkey-forms-turnstile {
  display: none;
}

/* スマホの完了画面は左揃え・文中の改行なし（画面幅で折り返しが変わるため） */
@media (max-width: 767px) {
  .contactPage .snow-monkey-form[data-screen="complete"] .smf-form,
  .contactPage .snow-monkey-form[data-screen="complete"] .has-text-align-center {
    text-align: left;
  }
  .contactPage .snow-monkey-form[data-screen="complete"] .smf-form br {
    display: none;
  }
}

/* 送信回数の上限に達したとき（functions.php の futawa_form_limit_notice_html） */
.contactPage .ffg-alert {
  margin: 30px 0;
  padding: 28px 30px;
  background: #fff6e8;
  border: 2px solid #f08200;
  border-radius: 6px;
  text-align: left;
}
.contactPage .ffg-alert__title {
  margin: 0 0 14px;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.5;
  color: #c0392b;
}
.contactPage .ffg-alert__body {
  margin: 0;
}
.contactPage .ffg-alert__body a {
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .contactPage .ffg-alert {
    padding: 20px 16px;
  }
  .contactPage .ffg-alert__title {
    font-size: 1.5rem;
  }
}

/* WordPress のスクリーンリーダー用テキスト（Bootstrap 3 には .sr-only しかない） */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
