/* ================================================================================
   フォームページ（form）専用スタイル
   tokens/components は css/style.css を前提（同梱の :root 変数を利用）。
   読み込み順: reset.css → bootstrap → style.css → form.css
================================================================================ */

/* ページ余白（LPの .page 内に収める）
-------------------------------------------------------------------- */
.form-wrap {
  padding: 30px 15px 44px;
}
@media (min-width: 768px) {
  .form-wrap {
    padding: 36px 22px 52px;
  }
}

/* 見出し（LPのセクション見出しを踏襲：紺＋オレンジ下線）
-------------------------------------------------------------------- */
.form-wrap > h2 {
  position: relative;
  font-size: 23px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 14px;
  padding-bottom: 14px;
  line-height: 1.45;
  color: var(--primary-dark);
}
.form-wrap > h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 52px;
  height: 4px;
  background: var(--cta);
  border-radius: 2px;
}
.form-lead {
  text-align: left;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 22px;
}
@media (min-width: 768px) {
  .form-wrap > h2 {
    font-size: 31px;
  }
  .form-lead {
    font-size: 17px;
    text-align: center;
  }
}

/* ステップ表示（バルーン）
-------------------------------------------------------------------- */
.balloon {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}
.balloon > div {
  position: relative;
  flex: 1;
  max-width: 230px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 6px;
  border-radius: 8px;
  background: #fff;
  color: var(--sub);
  border: 1px solid var(--line);
}
.balloon .balloon_active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
/* アクティブ側に下向き三角 */
.balloon .balloon_active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--primary);
}

/* プログレスバー（上部に追従）
-------------------------------------------------------------------- */
.bar_box {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--accent-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 22px;
  box-shadow: 0 4px 12px rgba(7, 52, 99, 0.1);
}
.bar_title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 4px;
}
.bar_title span {
  color: var(--form);
  font-size: 18px;
  margin: 0 2px;
}
.bar_box_inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
#bar {
  flex: 1;
  height: 12px;
  background: #dbe4ee;
  border-radius: 999px;
  overflow: hidden;
}
#progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--tel));
  border-radius: 999px;
  transition: width 0.35s ease;
}
#count_text {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
  text-align: right;
}
@media (min-width: 768px) {
  .bar_title {
    font-size: 17px;
  }
  .bar_title span {
    font-size: 22px;
  }
}

/* フォーム本体
-------------------------------------------------------------------- */
.form_content {
  background: #fff;
}
.form-horizontal .row {
  margin: 0 0 14px;
}
.form-horizontal .col-form-label {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 16px;
  text-wrap: balance;
  padding-bottom: 6px;
}
.form-horizontal .badge.bg-danger {
  display: inline-block;
  vertical-align: 2px;
  margin-right: 8px;
  background: var(--form) !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 5px;
}
/* 補足注記（例：郵便番号の「住所が自動入力されます」）は改行して表示 */
.form-horizontal .col-form-label small {
  font-weight: 600;
  color: var(--sub);
  font-size: 14px;
  margin-top: 3px;
}
@media (min-width: 768px) {
  .form-horizontal .row {
    display: flex;
    align-items: flex-start;
  }
  .form-horizontal .col-form-label {
    font-size: 18px;
    padding-top: 12px;
    padding-bottom: 0;
  }
  .form-horizontal .col-form-label.col-form-label2 {
    padding-top: 0px;
  }
  .form-horizontal .col-sm-9 {
    flex: 1;
  }
  .form-horizontal .col-form-label small {
    display: block;
  }
}

/* ---- 入力欄 ---- */
.form-control,
.form-select {
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  width: 100%;
  background: #fff;
  transition: 0.15s;
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 91, 181, 0.15);
}
textarea.form-control {
  line-height: 1.7;
  resize: vertical;
}
@media (min-width: 768px) {
  .form-control,
  .form-select {
    font-size: 17px;
  }
}

/* ---- バリデーション（Bootstrap）：ブランド配色。エラーのみ表示し緑チェックは出さない ---- */
.was-validated .form-control:invalid,
.form-control.is-invalid,
.was-validated .form-select:invalid,
.form-select.is-invalid {
  border-color: var(--form);
  box-shadow: 0 0 0 3px rgba(214, 47, 25, 0.12);
  background-image: none;
}
.was-validated .form-control:valid,
.form-control.is-valid,
.was-validated .form-select:valid,
.form-select.is-valid {
  border-color: var(--line);
  box-shadow: none;
  background-image: none;
}
.invalid-feedback {
  color: var(--form);
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}

/* ---- 注意書き ---- */
.form_ex {
  margin: 20px 0 4px;
  font-size: 15px;
  color: var(--sub);
  line-height: 1.7;
}
.form_ex a {
  color: var(--primary);
  text-decoration: underline;
}
@media (min-width: 768px) {
  .form_ex.center {
    text-align: center;
  }
}

/* ---- 送信ボタン（LPのフォームCTA＝赤・立体影） ---- */
.form_btn_box {
  margin-top: 18px;
}
.form_btn {
  max-width: 520px;
  margin: 0 auto;
}
/* Bootstrapのリンク下線リセット（ヘッダーお問い合わせ等のaボタン） */
.btn-outline,
.btn-outline:hover,
#btnSubmit,
.header a,
.footer-logo a {
  text-decoration: none;
}
#btnSubmit {
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--form);
  font-size: 18px;
  font-weight: 800;
  padding: 18px 0;
  min-height: 62px;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--form-dark);
  transition: 0.2s;
}
#btnSubmit:hover {
  filter: brightness(1.06);
}
#btnSubmit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ================================================================================
   送信完了（send）ページ
================================================================================ */
/* 送信内容の控え（JSで値を格納するのみ・画面には出さない） */
.send_mail,
.send_tel,
.send_name,
.send_address {
  display: none;
}
.send-wrap {
  padding: 36px 18px 56px;
  text-align: center;
}
.send-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--tel);
  display: flex;
  align-items: center;
  justify-content: center;
}
.send-check svg {
  width: 38px;
  height: 38px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
}
.send-wrap > h2 {
  position: relative;
  font-size: 23px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.5;
  margin: 0 0 16px;
  padding-bottom: 16px;
}
.send-wrap > h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 52px;
  height: 4px;
  background: var(--cta);
  border-radius: 2px;
}
.send-lead {
  font-size: 16px;
  color: var(--sub);
  line-height: 1.9;
  margin-bottom: 28px;
  text-align: left;
}
.send-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  padding: 15px 34px;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--primary-dark);
  transition: 0.2s;
}
.send-back:hover {
  filter: brightness(1.06);
}
@media (min-width: 768px) {
  .send-wrap {
    padding: 56px 22px 72px;
  }
  .send-wrap > h2 {
    font-size: 30px;
  }
  .send-lead {
    font-size: 18px;
    text-align: center;
  }
  .send-check {
    width: 84px;
    height: 84px;
  }
  .send-check svg {
    width: 44px;
    height: 44px;
  }
}
