.form_item {
  display: flex;
  padding: 1.7rem 0 1.5rem;
  border-bottom: 1px solid #B9B9B9;
}

.form_item:first-child {
  border-top: 1px solid #B9B9B9;
}

/* head_box */
.form_item .head_box {
  display: flex;
  align-items: center;
  flex: 0 0 22%;
  line-height: calc(20 / 16);
}

.form_item .head_box .head {
  position: relative;
  padding-left: 8px;
}

/* 必須 */
.form_item .head_box .head .must {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  color: #FF0D0D;
  font-size: 16px;
}

/* エラー文 */
.form_item .element_box p.errors {
  color: #dc0000;
  margin-top: 5px;
}

/* element_box */
.element_box {
  flex: auto;
}

.input_wrap {
  width: 100%;
}

.double_text_input_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* プライバシーポリシー（お問い合わせ） */
.privacy_box {
  text-align: center;
  margin-top: 3.5rem;
}

.privacy_box .privacy_txt a {
  color: #0007FF;
}

/* 同意チェック（エントリー） */
.agree_wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 3.5rem;
}

.agree_label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.agree_check_wrap {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.agree_wrap .form_agree {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.agree_check {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid #000;
  background-color: #fff;
  pointer-events: none;
}

.form_agree:checked+.agree_check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.agree_wrap .agree_txt {
  font-size: 16px;
  line-height: 1.5;
}

.agree_wrap .errors {
  width: 100%;
  text-align: center;
  margin-top: 8px;
  color: #dc0000;
}

.form-entry .submit_btn_wrapper {
  margin-top: 2.5rem;
}

/* submitボタン */

.submit_btn_wrapper {
  position: relative;
  max-width: 302px;
  width: 100%;
  margin: auto;
  margin-top: 4.9rem;
}

.submit_btn_wrapper::before {
  position: absolute;
  content: "";
  background-image: url(../../../../assets/img/common/red_arrow.svg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  top: 0;
  bottom: 0;
  right: 12%;
  margin: auto;
  width: 21px;
  height: 15px;
  z-index: 1;
}

.submit_btn {
  width: 100%;
  background-color: #000;
  text-align: center;
  display: block;
  cursor: pointer;
  transition: all 0.5s;
  color: #ffffff;
  padding: 2.8rem 0;
}

@media screen and (max-width: 768px) {
  .submit_btn {
    margin-top: 60px;
    padding: 12px;
  }
}

.submit_btn:hover {
  opacity: 0.7;
}

/* テキストボックス用スタイル */
.input_item.text {
  width: 100%;
  padding: 15px;
  background-color: #EEEEEE;
  width: 100%;
}

.input_item.half {
  width: 48%;
}

/* テキストエリア用スタイル */
.input_item.textarea {
  width: 100%;
  padding: 15px;
  background-color: #EEEEEE;
  height: 20vw;
  max-height: 270px;
  min-height: 160px;
}

/* 単位付きテキスト（年齢など） */
.input_with_unit {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input_with_unit .input_item.text.age {
  width: 88px;
  max-width: 88px;
  flex: 0 0 88px;
  text-align: center;
}

.input_with_unit .input_unit {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

/* セレクトボックス */
.contact_form_input {
  position: relative;
  max-width: 284px;
  width: 92%;
}

.contact_form_input select.input_item.select {
  width: 100%;
  padding: 12px 36px 12px 12px;
  border: 1px solid #B9B9B9;
  border-radius: 0;
  background-color: #fff;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  line-height: 1.5;
}

.contact_form_input::after {
  content: "";
  position: absolute;
  background-image: url(../../../img/icon_arrow_down.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
}

/* テキストエリア行は上揃え */
.form_item:has(.input_item.textarea) {
  align-items: flex-start;
}

.form_agree:disabled+.agree_check,
.form_agree:disabled~.agree_txt {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ====================================================================================================== */
/* レスポンシブ */
/* ====================================================================================================== */
@media screen and (max-width: 768px) {
  .form_item {
    flex-direction: column;
  }

  .head_box {
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .form_item:first-child .head_box {
    border-top: unset;
  }

  .form_item:first-child .element_box {
    border-top: unset;
  }

  .element_box {
    width: 100%;
  }

  .input_item.text {
    padding: 12px;
  }

  .form_item .head_box .head {
    font-size: 15px;
  }
}

@media screen and (max-width: 480px) {
  .submit_btn {
    margin-top: 40px;
  }

  .contact_form_input select.input_item.select {
    font-size: 14px;
  }
}