/* =============================================
   マルチステップフォーム スタイル
   ============================================= */

/* ----- 変数 ----- */
:root {
  --form-primary: #1cae5d;
  --form-primary-light: rgba(79, 247, 114, 0.1);
  --form-primary-dark: #05883f;
  --form-text: #333;
  --form-text-light: #888;
  --form-border: #ddd;
  --form-bg: #fff;
  --form-radius: 10px;
  --form-error: #e74c3c;
  --form-success: #27ae60;
}

/* ----- ステップフォーム全体 ----- */
.step-form-section {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.step-form-wrapper {
  width: 100%;
}

/* ----- コンパクトヘッダー（ステップ2以降） ----- */

#compact-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.05em;
}

/* =============================================
   プログレスバー
   ============================================= */
.step-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 8px;
  position: relative;
  margin-bottom: 8px;
}

.step-progress-bar .progress-line {
  position: absolute;
  top: 42px;
  left: 15%;
  right: 15%;
  height: 3px;
  background-color: var(--form-border);
  z-index: 0;
}

.step-progress-bar .progress-fill {
  height: 100%;
  background-color: var(--form-primary);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 2px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  z-index: 1;
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.4s ease;
  border: 3px solid #e0e0e0;
}

.step-label {
  margin-top: 6px;
  font-size: 11px;
  color: #999;
  transition: color 0.4s ease;
  font-weight: 500;
  white-space: nowrap;
}

/* アクティブ */
.step-item.active .step-number {
  background-color: var(--form-primary);
  color: #fff;
  border-color: var(--form-primary);
  box-shadow: 0 0 0 4px var(--form-primary-light);
}

.step-item.active .step-label {
  color: var(--form-primary-dark);
  font-weight: 700;
}

/* 完了 */
.step-item.completed .step-number {
  background-color: var(--form-primary);
  color: #fff;
  border-color: var(--form-primary);
}

.step-item.completed .step-number::after {
  content: '✓';
  font-size: 14px;
}

.step-item.completed .step-number span {
  display: none;
}

.step-item.completed .step-label {
  color: var(--form-primary-dark);
}
.option-card.wpcf7-list-item{
  margin-left: 0;
}

/* =============================================
   フォームステップ
   ============================================= */
.form-step {
  display: none;
  padding: 24px 0;
}

.form-step[data-step="1"] {
  display: block;
}

.form-step__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--form-text);
  margin: 0 0 24px;
  text-align: center;
  line-height: 1.6;
}

/* ----- ステップ遷移アニメーション ----- */
.step-enter {
  animation: stepFadeIn 0.4s ease forwards;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- シェイクアニメーション（エラー時） ----- */
.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* =============================================
   オプションカード（ラジオ / チェックボックス共通）
   ============================================= */
.radio-card-group,
.checkbox-card-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CF7 wrapperのリセット */
.radio-card-group .wpcf7-radio,
.checkbox-card-group .wpcf7-checkbox {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  display: flex !important;
  align-items: center;
  padding: 16px 20px;
  border: 2px solid var(--form-border);
  border-radius: var(--form-radius);
  background-color: var(--form-bg);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  user-select: none;
}

.option-card label {
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
  gap: 12px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--form-text);
}

/* デフォルトのラジオ/チェックを非表示 */
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* カスタムラジオ（丸） */
.radio-card label::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--form-border);
  border-radius: 50%;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.radio-card.active label::before {
  border-color: var(--form-primary);
  border-width: 6px;
}

/* カスタムチェックボックス（角丸四角） */
.checkbox-card label::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--form-border);
  border-radius: 4px;
  transition: all 0.25s ease;
  box-sizing: border-box;
  position: relative;
}

.checkbox-card.active label::before {
  background-color: var(--form-primary);
  border-color: var(--form-primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3 4.3l-7 7-3.6-3.6 1.4-1.4 2.2 2.2 5.6-5.6z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

/* アクティブ状態 */
.option-card.active {
  border-color: var(--form-primary);
  background-color: var(--form-primary-light);
  color: var(--form-primary-dark);
}

.option-card.active label .wpcf7-list-item-label {
  color: var(--form-primary-dark);
}

/* ホバー */
.option-card:hover {
  border-color: var(--form-primary);
  box-shadow: 0 2px 8px rgba(79, 195, 247, 0.15);
}

/* パルスアニメーション */
.option-card.pulse {
  animation: cardPulse 0.3s ease;
}

@keyframes cardPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* =============================================
   フォームフィールド
   ============================================= */
.form-field {
  margin-bottom: 20px;
  position: relative;
}

#prefecture-field {
  z-index: 20;
}

#city-field {
  z-index: 10;
}

#address-field {
  z-index: 1;
}

.form-field label.field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--form-text);
  margin-bottom: 8px;
}

.form-field label.field-label .required {
  color: var(--form-error);
  font-size: 12px;
  margin-left: 4px;
}

/* テキスト / TEL / EMAIL入力 */
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--form-border);
  border-radius: var(--form-radius);
  font-size: 15px;
  color: var(--form-text);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  background-color: var(--form-bg);
  box-sizing: border-box;
  font-family: inherit;
}

.form-field input[type="text"]:focus,
.form-field input[type="tel"]:focus,
.form-field input[type="email"]:focus {
  border-color: var(--form-primary);
  box-shadow: 0 0 0 3px var(--form-primary-light);
}

.form-field input::placeholder {
  color: #bbb;
}

/* =============================================
   カスタムセレクトボックス
   ============================================= */
.custom-select-wrapper {
  position: relative;
}

.custom-select-wrapper select {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 2px solid var(--form-border);
  border-radius: var(--form-radius);
  font-size: 15px;
  color: var(--form-text);
  background-color: var(--form-bg);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
}

.custom-select-wrapper select:focus {
  border-color: var(--form-primary);
  box-shadow: 0 0 0 3px var(--form-primary-light);
}

.custom-select-wrapper::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #999;
  pointer-events: none;
  transition: border-color 0.25s ease;
}

.custom-select-wrapper.focused::after {
  border-top-color: var(--form-primary);
}

/* セレクトのプレースホルダー色 */
.custom-select-wrapper select option[value=""] {
  color: #bbb;
}

.custom-select-wrapper select:invalid {
  color: #bbb;
}

/* =============================================
   カスタムラジオドロップダウン（都道府県・市区町村共通）
   ============================================= */
.custom-radio-dropdown {
  position: relative;
  width: 100%;
}

.custom-radio-dropdown__trigger {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 2px solid var(--form-border);
  border-radius: var(--form-radius);
  font-size: 15px;
  color: #bbb;
  background-color: var(--form-bg);
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.custom-radio-dropdown__trigger.has-value {
  color: var(--form-text);
}

.custom-radio-dropdown.open .custom-radio-dropdown__trigger {
  border-color: var(--form-primary);
  box-shadow: 0 0 0 3px var(--form-primary-light);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-radio-dropdown__arrow {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.custom-radio-dropdown.open .custom-radio-dropdown__arrow {
  transform: rotate(180deg);
}

.custom-radio-dropdown__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--form-bg);
  border: 2px solid var(--form-primary);
  border-top: none;
  border-bottom-left-radius: var(--form-radius);
  border-bottom-right-radius: var(--form-radius);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.custom-radio-dropdown__scroll {
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.custom-radio-dropdown__scroll::-webkit-scrollbar {
  width: 6px;
}

.custom-radio-dropdown__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-radio-dropdown__scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* 各アイテム */
.custom-radio-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #eee;
  user-select: none;
}

.custom-radio-dropdown__item:last-child {
  border-bottom: none;
}

.custom-radio-dropdown__item:hover {
  background-color: #f8f8f8;
}

.custom-radio-dropdown__item:active {
  background-color: #f0f0f0;
}

.custom-radio-dropdown__item-label {
  font-size: 15px;
  color: var(--form-text);
  font-weight: 500;
}

/* ラジオ丸 */
.custom-radio-dropdown__item-circle {
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

/* 選択済み */
.custom-radio-dropdown__item.active {
  background-color: var(--form-primary-light);
}

.custom-radio-dropdown__item.active .custom-radio-dropdown__item-label {
  color: var(--form-primary-dark);
  font-weight: 600;
}

.custom-radio-dropdown__item.active .custom-radio-dropdown__item-circle {
  border-color: var(--form-primary);
  border-width: 6px;
}

/* =============================================
   対象外メッセージ
   ============================================= */
#out-of-area-message {
  display: none;
  padding: 16px;
  background-color: #fff3e0;
  border: 2px solid #ff9800;
  border-radius: var(--form-radius);
  margin-bottom: 16px;
}

#out-of-area-message p {
  margin: 0;
  color: #e65100;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* =============================================
   エラーメッセージ
   ============================================= */
.form-error-message {
  color: var(--form-error);
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

/* CF7デフォルトエラー非表示 */
.wpcf7-not-valid-tip {
  color: var(--form-error);
  font-size: 13px;
  margin-top: 6px;
}

.wpcf7-response-output {
  display: none !important;
}

/* =============================================
   ボタン
   ============================================= */
.form-step__actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn-next,
.btn-submit {
  flex: 1;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--form-primary), var(--form-primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--form-radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
  font-family: inherit;
}

.btn-next:hover,
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 195, 247, 0.4);
}

.btn-next:active,
.btn-submit:active {
  transform: translateY(0);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-prev {
  padding: 16px 24px;
  background-color: transparent;
  color: var(--form-text-light);
  border: 2px solid var(--form-border);
  border-radius: var(--form-radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-prev:hover {
  border-color: #bbb;
  color: var(--form-text);
}

/* CF7 submitボタン上書き */
.form-step .wpcf7-submit {
  flex: 1;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--form-primary), var(--form-primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--form-radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
  font-family: inherit;
  width: 100%;
}

.form-step .wpcf7-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 195, 247, 0.4);
}

/* =============================================
   同意チェックボックス
   ============================================= */
.form-field--acceptance {
  margin-top: 24px;
}

.form-field--acceptance .wpcf7-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-field--acceptance .wpcf7-acceptance input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--form-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-field--acceptance .wpcf7-acceptance .wpcf7-list-item-label {
  font-size: 13px;
  color: var(--form-text);
  line-height: 1.6;
}

.form-field--acceptance a {
  color: var(--form-primary-dark);
  text-decoration: underline;
}

/* =============================================
   サンクスページ
   ============================================= */
.thanks-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--form-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: thanksPopIn 0.5s ease;
}

.thanks-icon svg {
  width: 40px;
  height: 40px;
  color: var(--form-primary);
}

@keyframes thanksPopIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* =============================================
   CF7非表示フィールド
   ============================================= */
.cf7-hidden-field {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 480px) {
  .step-progress-bar {
    padding: 20px 8px 8px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .step-label {
    font-size: 10px;
  }

  .form-step__title {
    font-size: 16px;
  }

  .option-card {
    padding: 14px 16px;
  }

  .option-card label {
    font-size: 14px;
  }

  .form-step__actions {
    flex-direction: column-reverse;
  }

  .btn-prev {
    text-align: center;
  }
}

/* =============================================
   CF7ローディングスピナー調整
   ============================================= */
.wpcf7-spinner {
  display: none;
}

.wpcf7 form.submitting .wpcf7-spinner {
  display: inline-block;
}
.wpcf7-acceptance label{
  display: flex;
  align-items: center;
  gap: 4px;
}
.wpcf7-spinner{
  display: none !important;
}