form {
  width: calc(800 / 1160 * 100%);
  margin: auto;
}

input[type="checkbox"] {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid #000;
  vertical-align: -2px;
}

input[type="checkbox"]:checked:before {
  position: absolute;
  top: 1px;
  left: 4px;
  transform: rotate(50deg);
  width: 4px;
  height: 8px;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  content: '';
}

.form_item .head_box {
  margin-bottom: 14px;
  width: 100%;
  display: flex;
  align-items: center;
}

.form_item .element_box {
  margin-bottom: 30px;
}

.form_item .head_box p.head {
  font-weight: bold;
}

.form_item .head_box p.must {
  font-weight: 500;
  margin-left: 13px;
  color: #FF0D0D;
}

.form_item .element_box p.errors {
  color: #dc0000;
  margin-top: 5px;
}

.input_wrap {
  width: 100%;
}

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

.submit_btn {
  width: calc(285 / 800 * 100%);
  padding: 16px 0;
  background-color: #164DDB;
  text-align: center;
  display: block;
  border-radius: 10px;
  margin: 30px auto 0;
  cursor: pointer;
  transition: all 0.3s;
  color: #ffffff;
}

.submit_btn:hover {
  opacity: 0.7;
}

.input_item.text, .input_item.textarea {
  border: 1px solid #DCDCDC;
  width: 100%;
  padding: 12px 13px;
}

.input_item.half {
  width: 48%;
}

.input_item.textarea {
  height: 240px;
  resize: none;
}

.form_accept {
  text-align: center;
  font-weight: 500;
  line-height: calc(30 / 16);
  margin-top: 56px;
}

.form_accept a {
  color: #0A4DFB;
}

.file-input-wrapper {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.file-input-wrapper.has-file {
  align-items: flex-start;
}

.file_name_preview {
  text-align: center;
}

.file-input-wrapper input[type="file"] {
  display: none;
}
.file-input-button {
  color: #fff;
  line-height: calc(30 / 14);
  font-family: "Roboto", sans-serif;
  background-color: #164DDB;
  border-radius: 5px;
  padding: 4px 10px;
  margin-right: 12px;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s;
}
.file-input-button:hover {
  opacity: 0.7;
}
.file-name {
  font-family: "Roboto", sans-serif;
  line-height: calc(30 / 14);
}

.file-input-wrapper.has-file .file-name {
  display: inline-block;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
}

.radio-item input[type="radio"],
.form_item.inquiry_type input[type="radio"] {
  display: none;
}

.radio-item label,
.form_item.inquiry_type label {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  display: inline-block;
  margin-right: 15px;
}

.radio-item label::before,
.form_item.inquiry_type label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 1px solid #000000;
  border-radius: 50%;
  box-sizing: border-box;
}

.radio-item label:hover::before,
.form_item.inquiry_type label:hover::before {
  border-color: #164DDB;
}

.form_item.inquiry_type input[type="radio"]:checked + label::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: #164DDB;
  border-radius: 50%;
}

.form_item.inquiry_type input[type="radio"]:checked + label::before {
  border-color: #164DDB;
}

/* フォーカス時のスタイル */
.form_item.inquiry_type input[type="radio"]:focus + label::before {
  box-shadow: 0 0 0 3px rgba(22, 77, 219, 0.3);
}

.address-field {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-bottom: 21px;
}
.p-postal-code, .prefecture {
  border: 1px solid #DCDCDC;
  background-color: #fff;
  color: #000000;
  width: calc(357 / 800 * 100%);
  padding: 12px 13px;
}
.search_address {
  background-color: #fff;
  color: #222222;
  padding: 9px 10px;
  border: 1px solid #222222;
  cursor: pointer;
  transition: all 0.3s;
}
.search_address:hover {
  background-color: #164DDB;
  color: #fff;
  border-color: #164DDB;
}
.city-street, .building-name, .postal_code {
  border: 1px solid #DCDCDC;
  flex: 1;
  padding: 12px 13px;
}
.form_note {
  line-height: calc(22 / 14);
  font-family: "Roboto", sans-serif;
  margin-bottom: 30px;
}
.inquiry_type .element_box{
  background-color: #F5F5F5;
  padding: 25px calc(36 / 800 * 100%);
}

/* 画像プレビューのスタイル */
.image-preview {
  width: 47%;
  max-height: 100px;
  /* text-align: center; */
}

.image-preview img {
  max-height: 100px;
  object-fit: contain;
}

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

@media screen and (max-width: 768px) and (min-width: 480px) {
  .form_item .head_box p.head {
    font-size: 32px;
  }

  .form_item .head_box p.must {
    font-size: 24px;
  }

  .submit_btn {
    font-size: 24px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 32px;
  }

  .form_accept {
    font-size: 24px;
  }

  .file-input-button,
  .file-name {
    font-size: 24px;
  }

  .form_item .radio-item input[type="radio"] + label,
  .form_item.inquiry_type input[type="radio"] + label {
    font-size: 24px;
  }

  .radio-item {
    width: 50%;
  }

  .form_note {
    font-size: 24px;
  }
  .search_address {
    font-size: 32px;
  }

  .address-field label {
    font-size: 32px;
  }
}

@media screen and (max-width: 480px) {
  form {
    width: 100%;
    padding: 0 20px;
  }

  .form_item .head_box {
    margin-bottom: 10px;
  }

  .form_item .element_box {
    margin-bottom: 20px;
  }

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

  .form_item .head_box p.must {
    font-size: 12px;
  }

  .submit_btn {
    width: 100%;
    margin-top: 40px;
    padding: 12px 0;
    font-size: 16px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 14px;
    border-radius: 0;
    padding: 10px;
  }

  .form_accept {
    font-size: 14px;
    margin-top: 30px;
  }

  .file-input-button,
  .file-name {
    font-size: 12px;
  }

  .form_item .radio-item input[type="radio"] + label,
  .form_item.inquiry_type input[type="radio"] + label {
    font-size: 14px;
    padding-left: 30px;
  }

  .address-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .p-postal-code,
  .prefecture {
    width: 100%;
  }

  .search_address {
    width: 50%;
    margin-top: 10px;
  }

  .form_note {
    font-size: 12px;
  }

  .inquiry_type .element_box {
    padding: 15px;
  }

  .form_item.inquiry_type label {
    font-size: 14px;
    padding-left: 20px;
    margin-right: 10px;
  }

  .city-street, .building-name, .postal_code {
    width: 100%;
  }

  .submit_btn {
    margin-top: 40px;
  }
}

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

.preview-container img {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
}

.pdf-preview {
  text-align: center;
}

.pdf-preview img {
  width: 50px;
  height: 50px;
}

.pdf-preview p {
  margin: 0;
}