/* =======================================================================
   contact Page Styles
======================================================================= */
.contact_box {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  margin-top: 0;
  padding-bottom: 1rem;

  .contact_box_button {
    max-width: 390px;
  }
}

.button__icon--tel {
  font-size: clamp(1.125rem, 1.068rem + 0.24vw, 1.25rem);
  position: relative;
  width: 100%;
  max-width: 390px;

  &:after {
    content: "\f2a0";
    color: #fff;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 1.5rem;
    top: 48%;
    transform: translateY(-50%);
    rotate: -30deg;
  }
}

.contact_container {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 20px;
}

/* title */
.contact_title {
  text-indent: -1em;
  padding-left: 1em;
}

.contact_title::first-letter {
  color: var(--wp--preset--color--custom-blue);
}

.contact_status {
  display: flex;
  justify-content: center;
}

/* =======================================================================
   contact form(共通)
======================================================================= */

/* ローダー */
.wpcf7 .ajax-loader {
  display: block;
  margin: 0 auto;
}

.wp-block-contact-form-7-contact-form-selector {
  display: flex;
  width: 100%;
}

.wpcf7 {
  width: 100%;
  p {
    margin-bottom: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

span.wpcf7-spinner {
  display: none;
}

.wpcf7-not-valid-tip {
  margin-left: 1rem;
}

.contact_form {
  max-width: 800px;
  margin: 0 auto;
}

label {
  font-weight: 600;
}

/* 必須タグ */
.contact_label_must {
  background: #fff;
  border: solid 1px var(--wp--preset--color--custom-blue);
  color: var(--wp--preset--color--custom-blue);
  display: inline-block;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  padding: 0.25rem;
}

/* 送信ボタンのスタイル */
.contact_submit {
  margin: 0 auto;
  width: 100%;
}

.contact_button-submit,
.contact_button-return,
.contact_button-send {
  position: relative;

  &:after {
    color: #fff;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }

  p {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
}

.contact_button-submit {
  width: 100%;
}

.contact_button-submit:after {
  content: "\f054";
}

.contact_button-return:after {
  content: "\f060";
}

.contact_button-send:after {
  content: "\f1d8";
}

input[type="submit"],
input[type="button"] {
  background-color: var(--wp--preset--color--custom-charcoal-gray);
  border: none;
  border-radius: 100vh;
  color: white;
  cursor: pointer;
  font-size: clamp(1.125rem, 1.068rem + 0.24vw, 1.25rem);
  padding: 1rem;
  position: relative;
  text-align: center;
  transition: background-color 0.3s ease;
  width: 100%;

  &:hover {
    background-color: var(--wp--preset--color--custom-blue);
  }
}

.contact_indent {
  padding-left: 3em;
}

/* =======================================================================
   contact form(入力)
======================================================================= */

/* 各項目の下部余白 */
.contact_item {
  margin-bottom: 2.5rem;
}

.contact_center {
  display: flex;
  justify-content: center;
  flex-direction: row;
  width: 100%;
}

/* 入力欄 */
input[type="text"],
input[type="email"],
textarea {
  background-color: #fff;
  border: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 1.25rem;
  margin: 1rem 0 1rem 1rem;
  padding: 0.5rem;
  width: calc(100% - 1rem);
}
textarea.form-control {
  height: 5em;
}

/* チェックボックス */
.contact_checkbox {
  display: flex;
  flex-direction: row;
  column-gap: 4px;
  width: 100%;
  line-height: 1;
  cursor: pointer;
  padding: 1rem 0 1rem 1rem;
}

.wpcf7-checkbox {
  label {
    display: inline-block;
    font-size: 1rem;
    margin-bottom: 1rem;
  }
}

/* =======================================================================
   contact form(確認画面)
======================================================================= */
.contact_check {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  p {
    display: flex;
    align-self: center;
    width: 100%;
  }
  .contact_check_input {
    padding-left: 3em;
  }
}

.contact_check_button {
  display: flex;
  justify-content: space-around;
  margin: 3rem 0 1.5rem;
  width: 100%;
}

.contact_finish {
  min-height: 30vmax;
}

/* 送信完了メッセージ */
.wpcf7-form.sent .wpcf7-response-output {
  display: none;
}
/* =======================================================================
   Media Query
======================================================================= */
/* for Desktop */

@media (min-width: 769px) {
  .contact_checkbox {
    .wpcf7-list-item {
      margin: 0 0 0 1.5em;
      width: calc(33% - 1.5em);

      .wpcf7-list-item-label {
        font-size: 0.8rem;
      }
    }
  }
  .wpcf7-list-item-label {
    width: 100%;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    margin-left: 2.5rem;
  }

  .contact_submit,
  .contact_button-return,
  .contact_button-send {
    width: 45%;
  }

  .contact_container {
    padding: 2.5rem;
  }
}

@media (max-width: 768px) {
  .contact_box {
    padding-right: var(--wp--preset--spacing--50);
  }

  /* チェックボックス */
  .contact_checkbox {
    padding-left: 0;
  }

  .wpcf7-list-item {
    width: 100%;

    .wpcf7-list-item-label {
      font-size: 0.9rem;
    }
  }

  .contact_check_button {
    flex-direction: column;
    flex-wrap: wrap;
  }
}
