:-ms-input-placeholder {
   color: #BDBDBD;
}

/* ▼Chrome・Safari・Opera用(※1：Edgeでも有効) */
::-webkit-input-placeholder {
   color: #BDBDBD;
}

/* ▼Firefox18以前用(※2) */
:-moz-placeholder {
   color: #BDBDBD;
}
/* ▼Firefox19以上用(※3) */
::-moz-placeholder {
   color: #BDBDBD; opacity: 1;
}

/* ▼CSS4標準(予定)の記述 */
::placeholder {
   color: #BDBDBD;
}

form {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

/* head_box */

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

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

/* 必須 */
.form_item .head_box p.must {
  margin-top: 2px;
  margin-left: 4px;
  white-space: nowrap;
  color: #fff;
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 8px;
}

/* エラー文 */
.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: 100%;
  min-width: 200px;
  padding: 16px;
  text-align: center;
  display: block;
  margin: auto;
  margin-top: 3.75%;
  cursor: pointer;
  transition: all 0.3s;
  color: #ffffff;
  font-size: 18px;
}
@media screen and (max-width: 768px) {
  .submit_btn {
    margin-top: 60px;
    padding: 12px;
  }
}

/* テキストボックス用スタイル */
.input_item.text {
  width: 100%;
  padding: 16px;
  background-color: #fff;;
  border: 1px solid var(--black);
  font-size: 16px;
}

.half_input_wrap {
  width: 48.5%;
}
/* テキストエリア用スタイル */
.input_item.textarea {
  width: 100%;
  padding: 16px;
  background-color: #fff;
  border: 1px solid var(--black);
  height: 20vw;
  max-height: 270px;
  min-height: 160px;
  font-size: 16px;
  resize: none;
}

/* ラジオボタン */
.radio_wrapper {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.radio_label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  line-height: calc(24 / 18);
}

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

.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%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

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

/* チェックボックス */
.checkbox_wrapper {
  display: flex;
  justify-content: space-between;
  row-gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.checkbox_label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: calc(100% / 5);
  line-height: calc(24 / 18);
}

.input_item.checkbox {
  width: 16px;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  border: 1px solid var(--site_letter_base);
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.input_item.checkbox::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  aspect-ratio: 1 / 1;
  background-image: url(../icon_check_wh.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

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

.checkbox_desc {
  margin-top: 4px;
}

/* セレクトボックス */
.input_item.select {
  border: 1px solid var(--black);
  background-color: #fff;
  padding: 16px;
  width: 100%;
  font-size: 16px;
}
.contact_form_input:has(.input_item.select) {
  position: relative;
}
.contact_form_input:has(.input_item.select)::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 16px;
  aspect-ratio: 16 / 8;
  background-color: var(--site_color3);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* プライバシーポリシーの同意 */
.privacy_box {
  border: 1px solid var(--black);
  background-color: #fff;
  height: 287px;
  overflow-y: scroll;
  padding: 3%;
  margin-bottom: 4px;
  margin-top: 4px;  
  border-radius: 3px;
}

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

.privacy_box::-webkit-scrollbar-thumb {
  background-color: #BDBDBD;
  border-radius: 100px;
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  background-clip: padding-box;
}

.privacy_box::-webkit-scrollbar-track {
  background-color: #fff;
  border-left: 1px solid var(--black);
}

.agree_wrap {
  display: flex;
  align-items: center;
  width: fit-content;
}

.form_agree {
  border: 1px solid #BDBDBD;
  background-color: var(--white);
  width: 16px;
  height: 16px;
  border-radius: 2px;
  margin-right: 11px;
  position: relative;
  cursor: pointer;
}

.form_agree::before {
  opacity: 0;
  visibility: hidden;
  content: "";
  display: block;
  background-image: url(../icon_check_wh.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;
  line-height: calc(24 / 18);
  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: 10px;
}
.postal_code {
  padding: 16px;
  background-color: #fff;
  border: 1px solid var(--black);
  font-size: 16px;
  width: 100%;
}
.postal-search {
  appearance: none;
  background-color: #ffffff;
  padding: 8px 24px;
  color: var(--white);
  cursor: pointer;
  transition: 0.3s;
  border-radius: 100px;
  border: none;
}
.postal-search:hover {
  opacity: .7;
}

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

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

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

.input_item.short {
  max-width: 432px;
}

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

/* 卒業予定年月 */
.double_text_input_wrapper:has(.graduation_date) {
  justify-content: flex-start;
}
.half_input_wrap:has(.graduation_year), .half_input_wrap:has(.graduation_month) {
  display: flex;
  align-items: flex-end;
  width: calc(305 / 800 * 100%);
}

.half_input_wrap:has(.graduation_year)::after {
  content: "年";
  font-weight: bold;
  padding: 0 7px;
}

.half_input_wrap:has(.graduation_month)::after {
  content: "月";
  font-weight: bold;
  padding: 0 7px;
}

/* 希望面積 */
.input_wrap:has(.floor_area) {
  display: flex;
  align-items: flex-end;

}
.input_wrap:has(.floor_area)::before {
  content: "約";
  padding-right: 7px;
}
.input_wrap:has(.floor_area)::after {
  content: "（40坪・130㎡など）";
  padding-left: 7px;
}
.form_item .floor_area {
  flex: 1;
}
/* ====================================================================================================== */
/* レスポンシブ */
/* ====================================================================================================== */

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

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

  .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, .input_item.postal_code, .input_item.select {
    padding: 12px;
  }
}

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

  .must {
    font-size: 12px;
  }

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

  .radio_wrapper {
    flex-direction: column;
    gap: 8px;
  }

  .radio_label {
    font-size: 14px;

  }

  .privacy_box {
    height: 640px;
  }

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

  .form_agree {
    margin-top: 3px;
  }
  
  .submit_btn {
    margin-top: 20px;
    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%;
  }

  .checkbox_label {
    min-width: 50%;
  }

  .form_agree {
    margin-right: 8px;
  }

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

  .privacy_box::-webkit-scrollbar-thumb {
    background-color: #BDBDBD;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 3px solid transparent;
    border-right: 2px solid transparent;
  }

  .privacy_box::-webkit-scrollbar-track {
    background-color: #fff;
    border-left: 1px solid var(--black);
  }
}
