.contact-form-wrap .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-form-wrap .form-section {
  display: flex;
  flex-direction: column;
}

.contact-form-wrap .form-label-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.contact-form-wrap .form-label-text {
  font-weight: 700;
  color: #00476A;
  letter-spacing: 0.05em;
  font-size: 0.9375rem;
}

.contact-form-wrap .badge-required {
  background: #00476A;
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.contact-form-wrap .badge-optional {
  background: #9ca3af;
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* テキスト入力 */
.contact-form-wrap .wpcf7-form input[type="text"],
.contact-form-wrap .wpcf7-form input[type="email"],
.contact-form-wrap .wpcf7-form input[type="tel"] {
  width: 100%;
  background: #fff;
  border: none;
  padding: 1rem 1.25rem;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 0.875rem;
  color: #1f2937;
  outline: none;
  transition: box-shadow 0.2s;
}

.contact-form-wrap .wpcf7-form input[type="text"]:focus,
.contact-form-wrap .wpcf7-form input[type="email"]:focus,
.contact-form-wrap .wpcf7-form input[type="tel"]:focus {
  box-shadow: 0 0 0 2px #00476A;
}

/* テキストエリア */
.contact-form-wrap .wpcf7-form textarea {
  width: 100%;
  background: #fff;
  border: none;
  padding: 1.25rem;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 0.875rem;
  color: #1f2937;
  outline: none;
  resize: vertical;
  min-height: 10rem;
  transition: box-shadow 0.2s;
}

.contact-form-wrap .wpcf7-form textarea:focus {
  box-shadow: 0 0 0 2px #00476A;
}

/* ラジオボタン・チェックボックス */
.contact-form-wrap .wpcf7-radio,
.contact-form-wrap .wpcf7-checkbox {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form-wrap .wpcf7-radio .wpcf7-list-item label,
.contact-form-wrap .wpcf7-checkbox .wpcf7-list-item label,
.contact-form-wrap .wpcf7-acceptance .wpcf7-list-item label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;

}

.contact-form-wrap .wpcf7-list-item {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.contact-form-wrap .wpcf7-list-item label {
  font-weight: 400 !important;
  color: #374151 !important;
  font-size: 0.875rem !important;
  line-height: 1.7;
  cursor: pointer;
  margin-bottom: 0 !important;
  transition: color 0.2s;
}

.contact-form-wrap .wpcf7-list-item label:hover {
  color: #00476A !important;
}

.contact-form-wrap .wpcf7-form input[type="radio"],
.contact-form-wrap .wpcf7-form input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #00476A;
  cursor: pointer;
  flex-shrink: 0;
}

/* 日時入力 */
.contact-form-wrap .datetime-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-form-wrap .datetime-row:last-child {
  margin-bottom: 0;
}

.contact-form-wrap .datetime-label {
  font-size: 0.875rem;
  color: #4b5563;
  width: 4rem;
  flex-shrink: 0;
  text-align: right;
}

.contact-form-wrap .datetime-inputs {
  display: flex;
  flex: 1;
  gap: 1rem;
}

.contact-form-wrap .datetime-field {
  position: relative;
  flex: 1;
}

.contact-form-wrap .datetime-field input {
  padding-right: 3rem !important;
}

.contact-form-wrap .datetime-icon {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3rem;
  background: #00476A;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* 同意チェックボックス */
.contact-form-wrap .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}

.contact-form-wrap .wpcf7-acceptance label {
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  color: #374151 !important;
}

/* 送信ボタン */
.contact-form-wrap .wpcf7-form input[type="submit"] {
  background-color: #f2ece5;
  /* 1つ目: 矢印アイコン(SVG)、2つ目: 縦の区切り線(1pxのグラデーション) */
  background-image:
    url("data:image/svg+xml,%3Csvg width='24' height='12' viewBox='0 0 24 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 9H22M15 2L23 9' stroke='%23C5A059' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(to right, rgba(197, 160, 89, 0.3) 1px, transparent 1px);
  background-repeat: no-repeat, no-repeat;
  /* 矢印は右端から18px、縦線は右端から60pxの位置に固定 */
  background-position: calc(100% - 18px) center, calc(100% - 60px) center;
  background-size: 24px 12px, 1px 100%;

  color: #C5A059;
  border: 1px solid rgba(197, 160, 89, 0.3);
  font-weight: 700;
  font-size: 0.875rem;
  /* 右側のアイコンと線の領域を確保するため、右のpaddingのみ「5rem(約80px)」と大きく設定 */
  padding: 1rem 5rem 1rem 2.5rem;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.1em;
  /* 背景色と矢印が動くアニメーションを設定 */
  transition: background-color 0.2s, background-position 0.3s;
  width: fit-content;
}

/* ホバー時 */
.contact-form-wrap .wpcf7-form input[type="submit"]:hover {
  background-color: #e8dccb;
  /* 矢印の位置だけを少し右にずらしてアニメーションさせる */
  background-position: calc(100% - 12px) center, calc(100% - 60px) center;
}

/* バリデーション・レスポンス */
.contact-form-wrap .wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.375rem;
}

.contact-form-wrap .wpcf7-response-output {
  border: 1px solid #00476A;
  padding: 1rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .contact-form-wrap .datetime-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-form-wrap .datetime-label {
    text-align: left;
    width: auto;
  }

  .contact-form-wrap .datetime-inputs {
    flex-direction: column;
    width: 100%;
  }
}

/* 丸いチェックボックス（ラジオボタン風） */
.how-to-know-check {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1px solid #9ca3af;
  /* Tailwindの gray-400 相当 */
  border-radius: 9999px;
  background-color: #ffffff;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.how-to-know-check:checked {
  background-color: #ffffff;
  /* 設定されている navy の色 */
  border-color: #00476A;
  background-size: 25px 25px;
  /* 大きくしたい場合は width と height を調整してください */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%2300476A' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3.5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

/* チェックボックスをラジオボタンと同じ見た目（丸型）にするカスタムスタイル */
.checkbox-as-radio .wpcf7-list-item {
  display: block;
}
.checkbox-as-radio .wpcf7-list-item:last-child {
  margin-bottom: 0;
}
.checkbox-as-radio label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}
.checkbox-as-radio input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid #9ca3af;
  border-radius: 50%; /* 丸くしてラジオボタン風に */
  background-color: #fff;
  flex-shrink: 0;
  margin-top: 0.25rem;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}
.checkbox-as-radio input[type="checkbox"]:checked {
  background-color: #fff;
  border-color: #00476A;
}
.checkbox-as-radio input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #00476A; /* 選択時の内側のネイビー丸 */
}
.checkbox-as-radio .wpcf7-list-item-label {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.625;
  transition: color 0.2s ease;
}
.checkbox-as-radio label:hover .wpcf7-list-item-label {
  color: #00476A; /* hover時の色変化 */
}

/* CF7のチェックボックス必須エラー文言を「選択してください。」にCSSで書き換え */
.checkbox-as-radio ~ .wpcf7-not-valid-tip {
  font-size: 0 !important;
  line-height: 0 !important;
}
.checkbox-as-radio ~ .wpcf7-not-valid-tip::before {
  content: "選択してください。";
  font-size: 0.875rem; /* text-sm相当 */
  line-height: 1.5;
}