/* Contact Form 7 カスタムスタイル - 元のデザインをそのまま適用 */

.wpcf7-spinner {
  display: none;
}

/* 必須マーク */
.wpcf7 :is(label, legend) .required {
  color: #3ce2ee;
  font-weight: 300;
}

/* ラベルとレジェンド */
.wpcf7 label,
.wpcf7 fieldset legend {
  display: block;
  font-weight: 600;
}

/* フォーム要素の間隔 */
form > :is(fieldset, label, div) + :is(fieldset, label, div) {
  margin-top: 32px;
}

/* 入力フィールド */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"] {
  width: 100%;
  height: 60px;
  padding: 8px 16px;
  margin-top: 8px;
}

/* テキストエリア */
.wpcf7 textarea {
  width: 100%;
  height: 150px;
  padding: 10px;
  margin-top: 8px;
  resize: vertical;
}

/* フィールドセット */
.wpcf7 fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  margin-top: 40px;
}

/* ラジオボタングループ */
.wpcf7 .radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  cursor: pointer;
  font-weight: normal;
  margin-top: 0;
}

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

.wpcf7 .radio-group .custom-radio {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid #aaa;
  border-radius: 50%;
  background: white;
  position: relative;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

/* 選択されていない時は中の丸を非表示 */
.wpcf7 .radio-group .custom-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

/* 選択時だけ塗りつぶし＋内側白丸 */
.wpcf7 .radio-group input[type="radio"]:checked ~ .custom-radio {
  background: #3ce2ee;
  border: none;
}

.wpcf7 .radio-group input[type="radio"]:checked ~ .custom-radio::after {
  width: 12px;
  height: 12px;
  background: white;
}

/* プライバシーセクション */
.wpcf7 .privacy-section {
  padding-bottom: 40px;
}

.wpcf7 .privacy-section h2 {
  font-weight: 600;
}

.wpcf7 .privacy-box {
  height: 150px;
  padding: 16px 24px;
  margin-top: 8px;
  background: #d1d1d6;
  color: #000;
  overflow-y: auto;
}

/* プライバシーチェック */
.wpcf7 .privacy-check {
  margin-top: 32px;
  text-align: center;
  cursor: pointer;
  position: relative;
}

/* Contact Form 7の既存の疑似要素チェックボックスをカスタマイズ */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-right: 8px;
  vertical-align: middle;
}

/* チェック時のスタイル（CF7のinput:checkedと連動） */
.wpcf7
  .wpcf7-acceptance
  input[type="checkbox"]:checked
  + .wpcf7-list-item
  label::before,
.privacy-check-checked .wpcf7-acceptance .wpcf7-list-item label::before {
  background: #3ce2ee;
  border: none;
}

/* チェックマーク */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item label::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: translate(0, -60%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* チェック時のチェックマーク表示 */
.wpcf7
  .wpcf7-acceptance
  input[type="checkbox"]:checked
  + .wpcf7-list-item
  label::after,
.privacy-check-checked .wpcf7-acceptance .wpcf7-list-item label::after {
  opacity: 1;
}

.wpcf7 .privacy-check label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: normal;
  margin: 0;
}

.wpcf7 .privacy-check label .underline {
  text-decoration: underline;
}

/* プライバシーポリシーリンクのスタイル */
.wpcf7 .privacy-check a {
  position: relative;
  z-index: 10;
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
}

.wpcf7 .privacy-check a:hover {
  color: #3ce2ee;
}

.wpcf7 .privacy-check input[type="checkbox"] {
  display: none;
}

/* カスタムチェックボックス */
.wpcf7 .privacy-check .custom-check {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #ccc;
  transition:
    background 0.3s ease,
    border 0.3s ease;
  flex-shrink: 0;
}

/* チェックが入ったとき */
.privacy-check-checked .custom-check,
.wpcf7 .wpcf7-acceptance input[type="checkbox"]:checked ~ .custom-check {
  background: #3ce2ee !important;
  border: none !important;
}

/* チェックマーク */
.wpcf7 .privacy-check .custom-check::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -60%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* チェックマーク表示 */
.privacy-check-checked .custom-check::after,
.wpcf7 .wpcf7-acceptance input[type="checkbox"]:checked ~ .custom-check::after {
  opacity: 1 !important;
}

/* ボタン */
.wpcf7 .btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 240px;
  height: 60px;
  margin: 0;
  padding: 0;
}

.wpcf7 .btn svg path {
  fill: transparent;
  stroke: #3ce2ee;
  stroke-width: 3;
  transition:
    fill 0.3s ease,
    stroke 0.3s ease;
}

.wpcf7 .btn:hover svg path {
  fill: #3ce2ee;
  stroke: transparent;
}

.wpcf7 .btn span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #3ce2ee;
  transition: color 0.3s ease;
}

.wpcf7 .btn:hover span {
  color: #000;
}

.wpcf7 .btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transition: opacity 0.2s ease;
}

.wpcf7 .btn:disabled:hover svg path {
  fill: transparent;
  stroke: #3ce2ee;
}

.wpcf7 .btn:disabled:hover span {
  color: #3ce2ee;
}

/* Contact Form 7専用の調整 */
.wpcf7-list-item {
  margin: 0;
}

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

/* Contact Form 7のラジオフィールドを非表示 */
.wpcf7 span.wpcf7-form-control-wrap[data-name="your-type"] {
  display: none;
}

/* Contact Form 7の同意チェックボックスを非表示（疑似要素は残す） */
.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: -1;
}

/* Contact Form 7のacceptanceラベルのクリックを無効化 */
.wpcf7 .wpcf7-acceptance label {
  pointer-events: none;
  cursor: default;
  position: relative;
}

/* プライバシーポリシーリンクのみ有効化 */
.wpcf7 .wpcf7-acceptance label a {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

/* Contact Form 7のチェックボックスを非表示 */
.wpcf7 input[type="checkbox"][name="your-agree"],
.wpcf7 input[type="checkbox"][name="your-agree[]"] {
  position: absolute;
  opacity: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  z-index: 1;
}

/* CF7のチェックボックスラベルのテキストを非表示 */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label {
  display: none;
}

/* CF7のチェックボックスラベルのスタイル調整 */
.wpcf7 .wpcf7-acceptance label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: normal;
  margin: 0;
}

/* チェックボックスを含むリストアイテム */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
  display: inline-block;
}

/* チェックボックスラベル全体 */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: normal;
  margin: 0;
  position: relative;
}

/* デフォルトのチェックボックスを非表示（アクセシビリティを保持） */
.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* カスタムチェックボックス（疑似要素で作成） */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* チェック時のスタイル */
.wpcf7 .wpcf7-acceptance input[type="checkbox"]:checked ~ label::before,
.wpcf7 .wpcf7-acceptance label input[type="checkbox"]:checked ~ *::before,
.wpcf7 .wpcf7-acceptance label:has(input[type="checkbox"]:checked)::before {
  background: #3ce2ee;
  border-color: #3ce2ee;
}

/* チェックマーク */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item label::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-50%) rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

/* チェック時のチェックマーク表示 */
.wpcf7 .wpcf7-acceptance input[type="checkbox"]:checked ~ label::after,
.wpcf7 .wpcf7-acceptance label input[type="checkbox"]:checked ~ *::after,
.wpcf7 .wpcf7-acceptance label:has(input[type="checkbox"]:checked)::after {
  transform: translateY(-50%) rotate(45deg) scale(1);
}

/* プライバシーポリシーリンク */
.wpcf7 .wpcf7-acceptance a {
  color: inherit;
  text-decoration: underline;
}

/* ラベルテキスト */
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label {
  display: inline;
  font-size: 16px;
  line-height: 1.5;
}

/* JavaScriptで追加されるカスタムチェックボックススタイル */
.wpcf7 .customized label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: normal;
  margin: 0;
}

/* カスタムチェックボックス要素 */
.wpcf7 .custom-checkbox {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #ccc;
  transition:
    background 0.3s ease,
    border 0.3s ease;
  flex-shrink: 0;
}

/* チェックが入ったとき */
.wpcf7 input[type="checkbox"]:checked ~ .custom-checkbox {
  background: #3ce2ee;
  border: none;
}

/* チェックマーク */
.wpcf7 .custom-checkbox::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -60%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

/* プライバシーチェックボックスのコンテナ */
.wpcf7 .privacy-check-cf7 {
  margin-top: 32px;
  text-align: center;
}

/* btn-containerの追加 */
.wpcf7 .btn-container {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* 送信ボタンのカスタマイズ */
.wpcf7 input[type="submit"] {
  display: none;
}

/* カスタムボタンラッパー */
.wpcf7 .custom-submit-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 240px;
  height: 60px;
  margin: 0;
  padding: 0;
}

.wpcf7 .custom-submit-btn svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.wpcf7 .custom-submit-btn svg path {
  fill: transparent;
  stroke: #3ce2ee;
  stroke-width: 3;
  transition:
    fill 0.3s ease,
    stroke 0.3s ease;
}

.wpcf7 .custom-submit-btn:hover svg path {
  fill: #3ce2ee;
  stroke: transparent;
}

.wpcf7 .custom-submit-btn span {
  position: relative;
  z-index: 1;
  color: #3ce2ee;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.wpcf7 .custom-submit-btn:hover span {
  color: #000;
}

/* 無効化状態 */
.wpcf7 .custom-submit-btn:disabled,
.wpcf7 .custom-submit-btn.disabled,
.wpcf7 .custom-submit-btn.submitting {
  opacity: 0.6;
  cursor: not-allowed;
  transition: opacity 0.2s ease;
}

.wpcf7 .custom-submit-btn:disabled svg path,
.wpcf7 .custom-submit-btn.disabled svg path,
.wpcf7 .custom-submit-btn.submitting svg path {
  fill: transparent !important;
  stroke: #3ce2ee !important;
}

.wpcf7 .custom-submit-btn:disabled span,
.wpcf7 .custom-submit-btn.disabled span,
.wpcf7 .custom-submit-btn.submitting span {
  color: #3ce2ee !important;
}

/* 送信中の場合はホバー効果も無効化 */
.wpcf7 .custom-submit-btn.submitting:hover svg path {
  fill: transparent !important;
  stroke: #3ce2ee !important;
}

.wpcf7 .custom-submit-btn.submitting:hover span {
  color: #3ce2ee !important;
}

/* 有効化状態の明確化 */
.wpcf7 .custom-submit-btn:not(:disabled):not(.disabled) {
  opacity: 1;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
  color: #ff3b30;
  font-size: 14px;
  margin-top: 4px;
}

.wpcf7-response-output {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid;
  font-size: 14px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .wpcf7 .btn span,
  .wpcf7-submit {
    font-size: 13px;
  }
}
