/* Contact Form 7 カスタムCSS */

/* フォーム全体 */
#top-contact .wpcf7 {
  width: 100%;
}

#top-contact .wpcf7-form {
  width: 100%;
}

/* テキスト・メール・テキストエリア入力 */
#top-contact .wpcf7-form-control.wpcf7-text,
#top-contact .wpcf7-form-control.wpcf7-email,
#top-contact .wpcf7-form-control.wpcf7-tel,
#top-contact .wpcf7-form-control.wpcf7-textarea {
  display: block;
  width: 100%;
  border: 1px solid #000;
  padding: 5px 15px;
  margin-top: 2px;
}

#top-contact .wpcf7-form-control.wpcf7-textarea {
  height: 200px;
}

#top-contact .wpcf7-form-control.wpcf7-text.zip,
#top-contact .wpcf7-form-control.wpcf7-text.tel {
  width: 145px;
}

#top-contact .wpcf7-form-control.wpcf7-text.address,
#top-contact .wpcf7-form-control.wpcf7-text.email {
  width: 460px;
}

/* プレースホルダー */
#top-contact .wpcf7-form-control::placeholder {
  letter-spacing: 0.12em;
  color: #c3c3c3;
}

#top-contact .wpcf7-form-control.wpcf7-textarea::placeholder {
  letter-spacing: 0;
}

/* 入力後の色 */
#top-contact .wpcf7-form-control:not(:placeholder-shown) {
  color: #000;
}

/* ラジオボタン */
#top-contact .wpcf7-form-control.wpcf7-radio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 5px;
}

#top-contact .group--gender .wpcf7-form-control.wpcf7-radio {
  display: flex;
  gap: 24px;
  margin-top: 18px;
}

#top-contact .wpcf7-radio .wpcf7-list-item {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
}

#top-contact .wpcf7-radio input[type="radio"] {
  display: none;
}

#top-contact .wpcf7-radio .wpcf7-list-item-label {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.12em;
  padding-left: 28px;
  cursor: pointer;
}

#top-contact .wpcf7-radio .wpcf7-list-item-label::before {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 20px;
  border: 1px solid #000;
  border-radius: 50%;
}

#top-contact .wpcf7-radio input[type="radio"]:checked+.wpcf7-list-item-label::after {
  content: "";
  position: absolute;
  left: 6px;
  width: 8px;
  height: 8px;
  background: #0068B6;
  border-radius: 50%;
}

/* セレクトボックス */
#top-contact .wpcf7-form-control.wpcf7-select {
  width: 100%;
  border: 1px solid #000;
  appearance: none;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #c3c3c3;
  background: #fff;
  border-radius: 0;
  padding: 5px 12px;
  margin-top: 2px;
}

#top-contact .wpcf7-form-control.wpcf7-select:valid:not(:placeholder-shown) {
  color: #c3c3c3;
}

/* チェックボックス（acceptance） */
#top-contact .wpcf7-acceptance input[type="checkbox"] {
  display: none;
}

#top-contact .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}

#top-contact .wpcf7-acceptance .wpcf7-list-item-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  padding-left: 32px;
  cursor: pointer;
}

#top-contact .wpcf7-acceptance .wpcf7-list-item-label::before {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 50%;
}

#top-contact .wpcf7-acceptance input[type="checkbox"]:checked+.wpcf7-list-item-label::after {
  content: "";
  position: absolute;
  left: 5px;
  width: 10px;
  height: 10px;
  background: #0068B6;
  border-radius: 50%;
}

/* 送信ボタン */
#top-contact .wpcf7-form-control.wpcf7-submit {
  display: block;
  display: inline-block;
  width: 100%;
  background: #0068B6;
  border-radius: 35px;
  border: none;
  padding: 26.5px 20px 29.5px;
  text-align: center;
  transition: 0.3s ease-in-out;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.075em;
  color: #fff;
  cursor: pointer;
}

#top-contact .group--btn:hover .wpcf7-submit {
  background: #f4a000;
}

#top-contact .group--btn {
  position: relative;
}

#top-contact .group--btn::before {
  content: "";
  width: 12px;
  height: 22px;
  position: absolute;
  top: calc(50% - 15px);
  right: 60px;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  background: #f4a000;
  -webkit-clip-path: polygon(0 0, 0% 100%, 100% 50%);
  clip-path: polygon(0 0, 0% 100%, 100% 50%);
  -webkit-transition: 0.3s ease-in-out;
  transition: 0.3s ease-in-out;
}

#top-contact .group--btn:hover::before {
  background: #0068B6;
}

/* バリデーションエラー */
#top-contact .group--btn .wpcf7-submit:disabled {
  cursor: not-allowed;
}

#top-contact .group--birthday .wpcf7-not-valid-tip {
  position: absolute;
}

#top-contact .wpcf7-not-valid-tip {
  font-size: 10px;
  line-height: 1;
  color: #ec6e1e;
  margin-top: 3px;
}

#top-contact .wpcf7-form-control.wpcf7-not-valid {
  border-color: #ec6e1e;
}

/* 送信結果メッセージ */
#top-contact .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
}

#top-contact .wpcf7-validation-errors {
  background: #ffebee;
  border: 1px solid #ec6e1e;
  color: #ec6e1e;
}

#top-contact .wpcf7-mail-sent-ok {
  background: #e8f5e9;
  border: 1px solid #4caf50;
  color: #4caf50;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {

  #top-contact .wpcf7-form-control.wpcf7-text,
  #top-contact .wpcf7-form-control.wpcf7-email,
  #top-contact .wpcf7-form-control.wpcf7-tel,
  #top-contact .wpcf7-form-control.wpcf7-textarea {
    width: 97%;
    padding: 1.33vw 3.2vw;
    border-radius: 0;
    margin-top: 0;
  }

  #top-contact .wpcf7-form-control.wpcf7-text.zip,
  #top-contact .wpcf7-form-control.wpcf7-text.tel {
    width: 38.67vw;
  }

  #top-contact .wpcf7-form-control.wpcf7-text.address,
  #top-contact .wpcf7-form-control.wpcf7-text.email {
    width: 97%;
  }

  #top-contact .wpcf7-form-control.wpcf7-textarea {
    height: 53.33vw;
  }

  #top-contact .wpcf7-radio .wpcf7-list-item-label {
    font-size: 4.27vw;
    gap: 2.13vw;
    padding-left: 7.47vw;
  }

  #top-contact .wpcf7-radio .wpcf7-list-item-label::before {
    width: 5.07vw;
    height: 5.07vw;
  }

  #top-contact .wpcf7-radio input[type="radio"]:checked+.wpcf7-list-item-label::after {
    left: 1.6vw;
    width: 1.87vw;
    height: 1.87vw;
  }

  #top-contact .wpcf7-form-control.wpcf7-radio {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.6vw;
    margin-top: 0;
  }

  #top-contact .group--gender .wpcf7-form-control.wpcf7-radio {
    gap: 6.4vw;
    margin-top: 5vw;
  }

  #top-contact .wpcf7-form-control.wpcf7-select {
    font-size: 4.27vw;
    padding: 1.1vw 3.2vw;
    margin-top: 0;
  }

  #top-contact .wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 4.27vw;
    padding-left: 7vw;
  }

  #top-contact .wpcf7-acceptance .wpcf7-list-item-label::before {
    width: 5.07vw;
    height: 5.07vw;
    margin-right: 1.33vw;
  }

  #top-contact .wpcf7-acceptance input[type="checkbox"]:checked+.wpcf7-list-item-label::after {
    left: 1.6vw;
    width: 1.87vw;
    height: 1.87vw;
  }

  #top-contact .wpcf7-form-control.wpcf7-submit {
    font-size: 4.27vw;
    border-radius: 9.33vw;
    padding: 7.1vw 10vw 7.3vw 5.33vw;
  }

  #top-contact .group--btn:hover .wpcf7-submit {
    background: #0068B6;
  }

  #top-contact .group--btn::before {
    width: 3.2vw;
    height: 5.87vw;
    top: calc(50% - 4vw);
    right: 16vw;
  }

  #top-contact .group--btn:hover::before {
    background: #f4a000;
  }

  #top-contact .wpcf7-not-valid-tip {
    font-size: 3vw;
    margin-top: 1vw;
  }
}

/* セレクトボックスのプレースホルダーをカスタマイズ */
#top-contact .group--birthday select[name="birth_year"] option:first-child::before {
  content: "0000";
}

#top-contact .group--birthday select[name="birth_month"] option:first-child::before {
  content: "00";
}

#top-contact .group--birthday select[name="birth_day"] option:first-child::before {
  content: "00";
}

/* プレースホルダー表示用のJavaScript代替CSS */
#top-contact select[name="birth_year"]:invalid,
#top-contact select[name="birth_year"]:required:invalid {
  color: #c3c3c3;
}

#top-contact select[name="birth_month"]:invalid,
#top-contact select[name="birth_month"]:required:invalid {
  color: #c3c3c3;
}

#top-contact select[name="birth_day"]:invalid,
#top-contact select[name="birth_day"]:required:invalid {
  color: #c3c3c3;
}