/* =============================================
   CF7用スタイル（entryform.css の上書き）
   ============================================= */

/* CF7 form wrapper */
.wpcf7 {
  width: 100%;
}

.wpcf7-form {
  width: 100%;
}

/* CF7が各inputを囲むspan */
.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* 任意項目の必須バッジ非表示 */
.optional-badge {
  opacity: 0;
}

/* CF7 input/textarea - entryform.cssの .form_container td input を継承 */
.form_container td .wpcf7-form-control-wrap input[type="text"],
.form_container td .wpcf7-form-control-wrap input[type="email"],
.form_container td .wpcf7-form-control-wrap input[type="tel"] {
  width: 100%;
  background: #efefef;
  display: block;
  outline: none;
  padding: 10px;
  font-size: max(1vw, 16px);
}

.form_container td .wpcf7-form-control-wrap textarea {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #efefef;
  padding: 10px;
  outline: none;
  resize: none;
  font-size: max(1vw, 16px);
}

/* === 同意チェックボックス（CF7 acceptance） === */
.form_container tr:last-child {
  align-items: center;
}

.form_container tr:last-child td {
  display: flex;
  align-items: center;
}

.form_container tr:last-child td .wpcf7-form-control-wrap {
  display: flex;
  align-items: center;
  width: auto;
}

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

.wpcf7-acceptance .wpcf7-list-item label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* チェックボックス本体 */
.wpcf7-acceptance input[type="checkbox"] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  width: 50px;
  height: 50px;
  background: #efefef;
  border: none;
  flex-shrink: 0;
}

.wpcf7-acceptance input[type="checkbox"]::after {
  content: "";
  display: block;
  position: absolute;
  border-bottom: 5px solid #ff9600;
  border-left: 5px solid #ff9600;
  opacity: 0;
  height: 12px;
  width: 23px;
  transform: rotate(-45deg);
  top: 13px;
  left: 12px;
}

.wpcf7-acceptance input[type="checkbox"]:checked::after {
  opacity: 1;
}

/* チェックボックスのラベルテキスト */
.wpcf7-acceptance .wpcf7-list-item-label {
  font-size: max(1.333vw, 20px);
  font-weight: 600;
  letter-spacing: 0.05em;
  padding-left: 15px;
}

/* === 送信ボタン === */
.wpcf7-form .link_btn_container {
  position: static;
  transform: none;
  margin: 0 auto 9.7%;
}

.wpcf7-form .link_btn_container_inner_item {
  margin: 0 auto;
}

input.wpcf7-submit.link_btn_container_inner_item_main_txt {
  display: block;
  padding: 7% 0;
  background: #000;
  color: #fff;
  font-weight: 600;
  text-align: center;
  border-radius: 200px;
  width: 100%;
  cursor: pointer;
  transition: .3s;
  border: none;
  font-size: max(1.2vw, 18px);
}

input.wpcf7-submit.link_btn_container_inner_item_main_txt:hover {
  background: #ff9600;
}

/* === バリデーション === */
/* 送信ボタン押下前はエラーメッセージ非表示 */
.wpcf7-form:not(.invalid):not(.unaccepted) .wpcf7-not-valid-tip {
  display: none;
}

.wpcf7-form:not(.invalid):not(.unaccepted) .wpcf7-not-valid {
  border-color: transparent;
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: max(0.9vw, 14px);
  margin-top: 5px;
  display: block;
}

/* CF7 レスポンスメッセージ */
.wpcf7-response-output {
  text-align: center;
  font-size: max(1vw, 16px);
  margin: 20px auto !important;
  padding: 15px !important;
}

/* 送信中スピナー */
.wpcf7-spinner {
  display: block;
  margin: 10px auto;
}

/* === レスポンシブ === */
@media screen and (max-width: 767px) {
  .optional-badge {
    display: none;
  }

  .wpcf7-acceptance input[type="checkbox"] {
    width: 30px;
    height: 30px;
  }

  .wpcf7-acceptance input[type="checkbox"]::after {
    border-bottom: 3px solid #ff9600;
    border-left: 3px solid #ff9600;
    height: 6px;
    width: 16px;
    top: 10px;
    left: 7px;
  }

  .form_container tr:last-child td {
    justify-content: center;
    margin-top: 20px;
  }

  .link_btn_container_inner_item {
    width: 70%;
  }
}
