@charset "utf-8";
/* ==========================================================
 * お問い合わせフォーム（MW WP Form）
 * 参考：https://saimu.online/form_saimu_hca/
 * 本文は _mwform/contact/form-body.html。.hy-cf の中だけに効く
 * ========================================================== */

/* フォームと完了ページでは、ハンバーガーメニューとスマホ下部の追従ボタン（無料一括査定）を出さない。
 * このCSSはこの2ページでしか読み込まれない（functions.php【5】）ので、ここに書けば他ページには効かない */
.openbtn1,
#g-nav,
.js-footerCta {
  display: none !important;
}

/* page-form.php の外枠（参考サイトと同じく、薄いグレーの背景に白いフォーム） */
.hy-cf-page {
  display: block;
  padding: 40px 16px 64px;
  background: #f4f4f4;
}

.hy-cf {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 6.25%;
  background: #fff;
  box-sizing: border-box;
  color: #222;
  font-size: 16px;
  line-height: 1.8;
}
.hy-cf *,
.hy-cf *::before,
.hy-cf *::after {
  box-sizing: border-box;
}

.hy-cf__title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
}
.hy-cf__note {
  margin: 0 0 32px;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- 表（PC・SP とも 見出し→入力欄 の縦並び） ---------- */
.hy-cf__table,
.hy-cf__table tbody,
.hy-cf__table tr,
.hy-cf__table th,
.hy-cf__table td {
  display: block;
  width: 100%;
}
.hy-cf__table {
  border: 0;
  border-collapse: separate;
  margin: 0;
}
.hy-cf__table tr {
  margin-bottom: 28px;
}
.hy-cf__table th,
.hy-cf__table td {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.hy-cf__table th {
  margin-bottom: 8px;
  font-weight: 700;
}

.hy-cf__req,
.hy-cf__opt {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  vertical-align: 2px;
}
.hy-cf__req { background: #de0101; }
.hy-cf__opt { background: #999; }

.hy-cf__hint {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

/* ---------- 入力欄 ---------- */
.hy-cf input[type="text"],
.hy-cf input[type="tel"],
.hy-cf input[type="email"],
.hy-cf textarea {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1em;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 16px; /* iOS で入力時に拡大されないよう 16px 以上 */
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}
.hy-cf textarea {
  min-height: 10em;
  resize: vertical;
}
.hy-cf input:focus,
.hy-cf textarea:focus {
  outline: none;
  border-color: #5bb93b;
  box-shadow: 0 0 0 3px rgba(91, 185, 59, .2);
}
.hy-cf ::placeholder {
  color: #aaa;
}

/* ---------- ラジオ（ボタン型） ---------- */
/* ラジオのある欄だけ横並びにする（ボタン間の改行が隙間にならないよう flex / grid） */
.hy-cf td:has(.mwform-radio-field) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hy-cf td:has(.mwform-radio-field) .error {
  flex-basis: 100%;
  grid-column: 1 / -1;
  margin-top: 0;
}
.hy-cf .mwform-radio-field {
  display: inline-block;
  margin: 0 !important;
}
.hy-cf .mwform-radio-field label {
  position: relative;
  display: block;
  cursor: pointer;
}
.hy-cf .mwform-radio-field input[type="radio"] {
  /* 見た目は隣の文字をボタンにするので、本物は隠す（キーボード操作は効く） */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.hy-cf .mwform-radio-field-text {
  display: block;
  min-width: 7.5em;
  padding: .7em 1.2em;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #fff;
  text-align: center;
  line-height: 1.4;
  transition: background .15s, border-color .15s, color .15s;
}
.hy-cf .mwform-radio-field label:hover .mwform-radio-field-text {
  border-color: #5bb93b;
}
.hy-cf .mwform-radio-field input:checked + .mwform-radio-field-text {
  border-color: #5bb93b;
  background: #5bb93b;
  color: #fff;
  font-weight: 700;
}
.hy-cf .mwform-radio-field input:focus-visible + .mwform-radio-field-text {
  box-shadow: 0 0 0 3px rgba(91, 185, 59, .35);
}

/* ---------- エラー（MW WP Form が入力欄の下に出す） ---------- */
.hy-cf .error {
  display: block;
  margin-top: 6px;
  color: #de0101;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- 広告の計測用（画面には出さない） ---------- */
.hy-cf__hidden {
  display: none;
}

/* ---------- 送信ボタン ---------- */
.hy-cf__submit {
  margin-top: 12px;
}
.hy-cf__submit input[type="submit"] {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.3em;
  border: 0;
  border-radius: 10px;
  background: #5bb93b;
  box-shadow: 0 4px 0 #46962b;
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .2s, transform .1s, box-shadow .1s;
  -webkit-appearance: none;
  appearance: none;
}
.hy-cf__submit input[type="submit"]:hover {
  opacity: .9;
}
.hy-cf__submit input[type="submit"]:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #46962b;
}

/* ---------- 完了ページ ---------- */
.hy-cf--thanks {
  text-align: center;
}
.hy-cf--thanks p {
  margin: 0 0 1.2em;
}

/* スマホのヘッダーのサイト名：テーマ（cmn.css）は width: 300px の箱を中央に置き、文字は箱の中で左寄せ。
 * 文字の方が狭いので左にズレて見える → 箱を文字幅にして中央に（cmn.css の切り替え幅 787px に合わせる） */
@media (max-width: 787px) {
  header .siteTitle {
    width: auto;
  }
}

@media (max-width: 600px) {
  .hy-cf-page {
    padding: 0 0 40px; /* 左右の余白は .hy-cf 側で取る */
  }
  .hy-cf {
    padding: 32px 16px;
    font-size: 15px;
  }
  .hy-cf__title {
    font-size: 21px;
  }
  .hy-cf__table tr {
    margin-bottom: 24px;
  }
  /* ラジオは2列に並べて押しやすく */
  .hy-cf td:has(.mwform-radio-field) {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hy-cf .mwform-radio-field-text {
    min-width: 0;
    padding: .8em .5em;
  }
  .hy-cf__submit input[type="submit"] {
    padding: 1.2em;
    font-size: 17px;
  }
}
