form {
  padding-top: 8%;
  padding-bottom: 8%;
}

.form_item {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form_item:not(:first-child) {
  margin-top: 4.8%;
}

/* head_box */

.form_item .head_box {
  display: flex;
  align-items: center;
}

/* 必須 */
.form_item .head_box p.must {
  margin-left: 15px;
  white-space: nowrap;
  color: #FF0D0D;
}

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

/* element_box */

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

/* submitボタン */
.submit_btn {
  width: calc(380 / 1000 * 100%);
  min-width: 200px;
  padding: 16px;
  background-color: #F79155;
  text-align: center;
  display: block;
  border-radius: 8px;
  margin: auto;
  margin-top: 4.8%;
  cursor: pointer;
  transition: all 0.5s;
  color: #ffffff;
}
@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: 20px 12px;
  background-color: #F4F4F4;
  width: 100%;
  font-size: 16px;
}

.input_item.half {
  width: 48%;
}
/* テキストエリア用スタイル */
.input_item.textarea {
  width: 100%;
  padding: 20px 12px;
  background-color: #F4F4F4;
  height: 20vw;
  max-height: 270px;
  min-height: 160px;
  font-size: 16px;
  resize: none;
}

/* ラジオボタン */
.radio_wrapper {
  display: flex;
  gap: 4%;
  flex-wrap: wrap;
  background-color: #F4F4F4;
  padding: 24px 32px;
}
.radio_label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.input_item.radio {
  width: 16px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--site_letter_base);
  position: relative;
  cursor: pointer;
}

.input_item.radio::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: var(--site_color1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.input_item.radio:checked::before {
  opacity: 1;
  visibility: visible;
}

/* プライバシーポリシーの同意 */
.privacy_box {
  border: 1px solid #C9C9C9;
  height: 200px;
  overflow-y: scroll;
  padding: 4%;
  margin-bottom: 40px;
  margin-top: 8%;  
}

.privacy_box::-webkit-scrollbar {
  width: 16px;
}

.privacy_box::-webkit-scrollbar-thumb {
  background-color: #666464;
}

.privacy_box::-webkit-scrollbar-track {
  background-color: #EDECEC;
}

.agree_wrap {
  display: flex;
  align-items: center;
  margin-top: 24px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.form_agree {
  border: 1px solid var(--black);
  background-color: var(--white);
  width: 16px;
  height: 16px;
  margin-right: 8px;
  position: relative;
  cursor: pointer;
}

.form_agree::before {
  opacity: 0;
  visibility: hidden;
  content: "";
  display: block;
  background-image: url(../../../../assets/img/common/icon_check.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 12px;
  height: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.2s;
}

.form_agree:checked::before {
  opacity: 1;
  visibility: visible;
}

.form_agree:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.form_agree:disabled + label {
  cursor: not-allowed;
  opacity: 0.5;
}

.agree_txt {
  cursor: pointer;
  flex: 1;
  a {
    border-bottom: 1px solid var(--black);
  }
}

.form_item:has(.mail_confirm) {
  margin-top: 2.4%;
}

.form_item:has(.mail_confirm) .head_box {
  display: none;
}

/* ====================================================================================================== */
/* レスポンシブ */
/* ====================================================================================================== */
@media screen and (max-width: 1024px) {
  form {
    padding-top: 60px;
    padding-bottom: 80px;
  }
}

@media screen and (max-width: 768px) {
  .form_item {
    flex-direction: column;
  }

  .form_item:not(:first-child) {
    margin-top: 30px;
  }

  .head_box {
    width: 100%;
  }

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

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

  .form_item:has(.mail_confirm) {
    margin-top: 8px;
  }

  .element_box {
    width: 100%;
  }

  .input_item.text {
    padding: 12px;
  }
}

@media screen and (max-width: 480px) {
  form {
    padding-top: 40px;  
  }

  .radio_wrapper {
    padding: 16px 24px;
  }

  .must {
    font-size: 12px;
  }

  .agree_wrap {
    align-items: flex-start;
  }

  .form_agree {
    margin-top: 7px;
  }
  
  .submit_btn {
    margin-top: 40px;
    font-size: 16px;
  }
}
