form {
  padding-bottom: 13rem;
}

.form_item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1.8rem 0;
  border-top: 1px solid #B9B9B9;
}

.form_item:last-child {
  margin-bottom: 3.8rem;
  border-bottom: 1px solid #B9B9B9;
}

/* head_box */

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

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

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

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

/* element_box */

.form_item .element_box {
  flex: auto;
}

.input_wrap {
  width: 100%;
}

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

/* submitボタン */
.submit_btn_wrapper {
  position: relative;
  width: calc(380 / 1000 * 100%);
  min-width: 307px;
  margin: auto;
  margin-top: 4.8%;
}

.submit_btn_wrapper::before {
  position: absolute;
  content: "";
  background-image: url(../../../img/entry_btn.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 21px;
  height: 20px;
  top: 50%;
  right: 8%;
  transform: translate(-50%, -50%);
}

.submit_btn {
  width: 100%;
  padding: 27px 16px;
  background-color: #FF923F;
  text-align: center;
  display: block;
  cursor: pointer;
  transition: all 0.3s;
  color: #ffffff;
  border-radius: 10px;
  font-weight: bold;
}

.submit_btn:hover {
  background-color: #FF6E00;
}

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

/* テキストボックス用スタイル */
.input_item.text {
  width: 100%;
  padding: 14px 12px;
  background-color: #EEEEEE;
  font-size: 16px;
  box-shadow: inset 0 1px 3px #00000040;
}

.input_item.half {
  width: 48%;
}

/* 単位付きテキスト（年齢など） */
.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: 400px;
  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: 20px;
  height: 14pc;
  pointer-events: none;
}

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

.form_item:has(.input_item.work_history) .head_box,
.form_item:has(.input_item.other_message) .head_box {
  align-items: flex-start;
}

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

/* ラジオボタン */
.radio_wrapper {
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.radio_label {
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  color: #000;
  line-height: 1;
}

.input_item.radio {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid #111;
  background-color: #fff;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0;
}

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

.input_item.radio:checked {
  border-color: #0082D4;
}

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

/* ファイルアップロード */
.file_group_wrapper {
  display: flex;
  flex-direction: column;
  gap: 17px;
  width: 100%;
}

.file_row {
  display: flex;
  align-items: center;
  gap: 48px;
}

.file_label {
  flex: 0 0 120px;
  color: #000;
}

.file_input_wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.file_input_wrap .input_item.file {
  font-size: 16px;
  color: #000;
}

.file_input_wrap .input_item.file::file-selector-button {
  font-size: 14px;
}

/* プライバシーポリシーの同意 */

.privacy_ttl {
  text-align: center;
  margin-bottom: 1.5rem;
}

.privacy_box {
  max-width: 625px;
  width: 92%;
  margin: 0 auto 3rem;
  border: 1px solid #C9C9C9;
  height: 170px;
  overflow-y: scroll;
  padding: 2%;
}

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

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

.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(../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;
}

/* 郵便番号 */
.postal_code_wrapper {
  display: flex;
  align-items: center;
  gap: 27px;
}

.postal_code {
  padding: 20px 12px;
  background-color: #F4F4F4;
  font-size: 16px;
  width: 100%;
}

.postal-search {
  appearance: none;
  background-color: #ffffff;
  border: 1px solid var(--site_letter_base);
  padding: 10px 12px;
  color: var(--site_letter_base);
  cursor: pointer;
  transition: 0.3s;
}

.postal-search:hover {
  background-color: #5A5A5A;
  border-color: #5A5A5A;
  color: #ffffff;
}

/* ２列配置 */
.form_item:not(.address):has(.cols) {
  flex-direction: row;
  align-items: center;
  margin-top: 16px;
}

.form_item:not(.address):has(.cols) .head {
  font-weight: 400;
}

.form_item:not(.address):has(.cols) .element_box {
  flex: 1;
}

.input_item.short {
  width: 62%;
}

.form_item:not(.address):has(.cols) .must {
  display: none;
}

/* ====================================================================================================== */
/* レスポンシブ */
/* ====================================================================================================== */
@media screen and (max-width: 1024px) {
  .privacy_box {
    margin-top: 5.6%;
  }
}

@media screen and (max-width: 768px) {
  .form_item:has(.mail_confirm) {
    margin-top: 8px;
  }

  .element_box {
    width: 100%;
  }

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

@media screen and (max-width: 480px) {

  .form_item {
    gap: 4px;
  }

  .form_item .head_box {
    flex: 0 0 31%;
  }

  .form_item .head_box .head {
    padding-left: 7px;
    font-size: 13px;
  }

  .must {
    font-size: 12px;
  }

  .radio_wrapper {
    gap: 44px;
  }

  .radio_label {
    gap: 12px;
    font-size: 13px;
  }

  .privacy_box {
    height: 160px;
  }

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

  .form_agree {
    margin-top: 7px;
  }

  .submit_btn {
    margin-top: 40px;
    font-size: 16px;
    min-width: 307px;
  }

  .postal_code_wrapper {
    gap: 16px;
  }

  .postal-search {
    padding: 6px 10px;
  }

  .input_item.postal_code {
    flex: 1;
  }

  /* .form_item:not(.address):has(.cols) {
    flex-direction: column;
    align-items: flex-start;
  } */

  .input_item.short {
    width: 100%;
  }

  .file_row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .file_label {
    flex: 0 0 auto;
  }

  .file_input_wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .file_input_wrap .input_item.file {
    font-size: 12px;
  }

  .file_input_wrap .input_item.file::file-selector-button {
    font-size: 10px;
  }

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

  .privacy_ttl {
    font-size: 14px;
  }

  .agree_txt {
    font-size: 15px;
  }

  .submit_btn {
    padding: 23px 16px;
    font-size: 19px;
  }

  .submit_btn_wrapper::before {
    width: 16px;
    height: 15px;
    top: 50%;
    right: 6%;
  }

  form {
    padding-bottom: 4rem;
  }
}