/* ============================================
   メールフォーム 共通スタイル
   ============================================ */

/* --- ステップインジケーター --- */
.p-form-step {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 80px 0 0;
}

.p-form-step__item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
}

.p-form-step__item--active {
  background: #bc2f2f;
  color: #fff;
}

.p-form-step__line {
  width: 50px;
  height: 1px;
  background: #bc2f2f;
  border-radius: 14px;
  margin: 0 10px;
}

/* --- リード文 --- */
.p-form-lead {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0 0;
  text-align: center;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
}

.p-form-lead__required-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
}

/* --- エラーメッセージ --- */
.p-form-errors {
  max-width: 1000px;
  margin: 20px auto 0;
  padding: 20px;
  background: #fff5f5;
  border: 1px solid #bc2f2f;
  border-radius: 6px;
}

.p-form-errors ul {
  list-style: disc;
  padding-left: 20px;
}

.p-form-errors li {
  color: #bc2f2f;
  font-size: 14px;
  line-height: 24px;
}

/* --- 必須バッジ --- */
.p-form-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background: #f9f4f4;
  border: 1px solid #bc2f2f;
  font-size: 15px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.75px;
  color: #bc2f2f;
  white-space: nowrap;
}

.p-form-badge svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* --- フォーム本体 --- */
.p-form-body {
  max-width: 1000px;
  margin: 40px auto 0;
}

.p-form-row {
  display: flex;
  align-items: flex-start;
  padding: 20px 0;
  border-top: 1px dashed #ccc;
}

.p-form-row:last-child {
  border-bottom: 1px dashed #ccc;
}

.p-form-row__label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: 344px;
  padding-top: 7px;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
}

.p-form-row__field {
  flex: 1;
}

.p-form-row__field input[type="text"],
.p-form-row__field input[type="email"],
.p-form-row__field input[type="tel"],
.p-form-row__field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
}

.p-form-row__field textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
  resize: vertical;
}

.p-form-row__field .p-form-twin {
  display: flex;
  gap: 20px;
}

.p-form-row__field .p-form-twin input {
  width: calc(50% - 10px);
}

.p-form-row__field .p-form-small {
  width: 200px !important;
}

.p-form-row__field .p-form-radio-group {
  display: flex;
  gap: 20px;
  padding-top: 7px;
}

.p-form-row__field .p-form-radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  cursor: pointer;
}

.p-form-row__field .p-form-radio-group input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1px solid #29221c;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.p-form-row__field .p-form-radio-group input[type="radio"]:checked {
  background: #bc2f2f;
  border-color: #bc2f2f;
  /* 白ドットは data:URI 画像だと本番 CSP（img-src）でブロックされるため gradient で描画 */
  background-image: radial-gradient(circle, #fff 3.5px, transparent 4px);
}

.p-form-row__field .error {
  display: block;
  margin-top: 6px;
  color: #bc2f2f;
  font-size: 14px;
}

/* --- チェックボックスエリア --- */
.p-form-privacy {
  position: relative;
  max-width: 1000px;
  margin: 30px auto 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.p-form-privacy input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border: 1px solid #29221c;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
}

.p-form-privacy input[type="checkbox"]:checked {
  background: #bc2f2f;
  border-color: #bc2f2f;
}

/* チェックマークは data:URI 画像だと本番 CSP（img-src）でブロックされるため border で描画 */
.p-form-privacy input[type="checkbox"]:checked + .p-form-privacy__text::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 11px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.p-form-privacy__text {
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #29221c;
}

.p-form-privacy__text a {
  color: #277bce;
  font-weight: 700;
  text-decoration: underline;
}

/* --- 送信ボタン --- */
.p-form-submit {
  max-width: 1000px;
  margin: 40px auto 80px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.p-form-btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 350px;
  height: 80px;
  padding: 0 30px;
  border: none;
  border-radius: 40px;
  background: #2a2a2a;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity var(--transition-base);
  text-decoration: none;
}

.p-form-btn:hover {
  opacity: 0.8;
}

.p-form-btn__arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 40px;
  background: #fff;
}

.p-form-btn__arrow svg {
  width: 20px;
  height: 20px;
}

.p-form-btn--back {
  background: #fff;
  color: #2a2a2a;
  border: 1px solid #ccc;
}

.p-form-btn--back .p-form-btn__arrow {
  background: #2a2a2a;
  left: 15px;
  right: auto;
}

.p-form-btn--back .p-form-btn__arrow svg {
  transform: rotate(180deg);
}

.p-form-btn--back span:not(.p-form-btn__arrow) {
  margin-left: auto;
  margin-right: 30px;
}

/* --- 確認画面 --- */
.p-form-row--confirm .p-form-row__field {
  padding-top: 7px;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
}

/* --- 完了画面 --- */
.p-form-complete {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 0 0;
  text-align: center;
}

.p-form-complete__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
  margin-bottom: 30px;
}

.p-form-complete__text {
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  color: #2a2a2a;
  margin-bottom: 20px;
}

.p-form-complete__note {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background: #f9f4f4;
  border-radius: 10px;
  text-align: left;
}

.p-form-complete__note ul {
  list-style: disc;
  padding-left: 20px;
}

.p-form-complete__note li {
  font-size: 14px;
  line-height: 24px;
  color: #2a2a2a;
  margin-bottom: 10px;
}

.p-form-complete__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 350px;
  height: 80px;
  border-radius: 40px;
  background: #2a2a2a;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 1px;
  text-decoration: none;
  margin-top: 40px;
  margin-bottom: 40px;
  transition: opacity var(--transition-base);
  position: relative;
}

.p-form-complete__home:hover {
  opacity: 0.8;
}

/* --- 個人情報保護方針ボックス（support用） --- */
.p-form-privacy-box {
  max-width: 1000px;
  margin: 30px auto 50px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.p-form-privacy-box__head {
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  color: #2a2a2a;
  margin-bottom: 10px;
}

.p-form-privacy-box__sub {
  font-size: 14px;
  line-height: 24px;
  color: #2a2a2a;
  margin-bottom: 10px;
}

.p-form-privacy-box a {
  color: #277bce;
  text-decoration: underline;
}

/* --- SP レスポンシブ --- */
@media screen and (max-width: 767px) {
  .p-form-step {
    padding: 60px 0 0;
  }

  .p-form-lead {
    padding: 30px 20px 0;
  }

  .p-form-errors {
    margin: 20px 20px 0;
  }

  .p-form-body {
    margin: 30px 20px 0;
  }

  .p-form-row {
    flex-direction: column;
    gap: 15px;
  }

  .p-form-row__label {
    width: 100%;
    padding-top: 0;
  }

  .p-form-row__field {
    width: 100%;
  }

  .p-form-row__field .p-form-twin {
    gap: 15px;
  }

  .p-form-row__field .p-form-twin input {
    width: calc(50% - 7.5px);
  }

  .p-form-privacy {
    margin: 20px 20px 0;
  }

  .p-form-privacy-box {
    margin: 20px 20px 0;
  }

  .p-form-submit {
    margin: 30px 20px 60px;
    flex-direction: column;
    align-items: center;
  }

  .p-form-btn {
    width: 100%;
    max-width: 335px;
  }

  .p-form-complete {
    padding: 60px 20px 0;
  }

  .p-form-complete__home {
    width: 100%;
    max-width: 335px;
  }

  .p-sec.p-sec--form .p-sec__main {
    padding-bottom: 60px;
  }
}

/* --- p-sec__main-inner の汎用スタイルをリセット（フォーム用） --- */
.p-sec.p-sec--form .p-sec__main {
  padding-bottom: 300px;
}

.p-sec.p-sec--form .p-sec__main-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
}

.p-sec.p-sec--form .p-sec__main-inner p {
  margin-top: 0;
  font-size: 16px;
  line-height: 26px;
}

.p-sec.p-sec--form .p-sec__main-inner h2,
.p-sec.p-sec--form .p-sec__main-inner h3,
.p-sec.p-sec--form .p-sec__main-inner h4,
.p-sec.p-sec--form .p-sec__main-inner h5,
.p-sec.p-sec--form .p-sec__main-inner h6 {
  margin-top: 0;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.p-sec.p-sec--form .p-sec__main-inner h2::after,
.p-sec.p-sec--form .p-sec__main-inner h3::after,
.p-sec.p-sec--form .p-sec__main-inner h4::before,
.p-sec.p-sec--form .p-sec__main-inner h5 {
  background-image: none;
}

.p-sec.p-sec--form .p-sec__main-inner h2::after,
.p-sec.p-sec--form .p-sec__main-inner h3::after {
  display: none;
}
