/* ステップフォーム用スタイル */

p{
  font-size: 16px !important;
}

/* FVセクションの三角形アニメーション */
.register-fv {
  position: relative;
}

.register-fv::before,
.register-fv::after {
  content: '';
  position: absolute;
  bottom:15px;
  width: 0;
  height: 0;
  border-style: solid;
  z-index: 1;
  transition: transform 0.1s ease-out;
}

.register-fv::before {
  left: 10px;
  border-width: 10px 10px 0 10px;
  border-color: #FFD700 transparent transparent transparent;
}

.register-fv::after {
  right: 10px;
  border-width: 10px 10px 0 10px;
  border-color: #FFD700 transparent transparent transparent;
}
.step-form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.register-form-section {
  width: 100%;
  padding: 0 5%;
  margin-top: 0;
}

.form-header{
  width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 24px auto 0;
}

.form-header p{
  font-size: 16px;
  font-weight: bold;
  color: #565656;
}

/* ステップインジケーター */
.step-indicators {
  width: 100%;
  display: flex;
  justify-content: space-between;
  position: relative;
  padding-bottom: 20px;
}

.step-indicators::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e0e0e0;
  z-index: 0;
}

.step-indicator-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 40px;
}

.step-indicator {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.step-label {
  font-size: 12px;
  font-weight: bold;
  color: #565656;
  text-align: center;
  white-space: nowrap;
  margin-top: 4px;
  transition: color 0.3s ease;
}

.step-indicator.active ~ .step-label,
.step-indicator.current ~ .step-label {
  color: #E1894E;
  font-weight: bold;
}

.step-indicator.completed ~ .step-label {
  color: #22C100;
}

.step-indicator.active {
  background-color: #E1894E;
  color: #fff;
}

.step-indicator.completed {
  background-color: #22C100;
  color: #fff;
}

.step-indicator.current {
  background-color: #E1894E;
  color: #fff;
  transform: scale(1.1);
}

/* ステップフィールドグループ */
.step-field-group {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-field-group.active {
  display: block;
}

.step-field-group.hidden {
  display: none;
}

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

/* ステップタイトル */
.step-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.step-description {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
  text-align: center;
}

/* CF7フォームのスタイル調整 */
.cf7-step-form .wpcf7-form {
  margin: 0;
}

.cf7-step-form .wpcf7-form-control-wrap {
  margin-bottom: 20px;
}

/* ステップフィールドグループ内のスタイル */
.step-field-group .step-title {
  font-size: 20px;
  margin-top: 0;
}

.step-field-group .step-description {
  margin-bottom: 20px;
}

.cf7-step-form label {
  display: block;
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}

.cf7-step-form .required {
  color: #ff0000;
  margin-left: 4px;
}

.cf7-step-form input[type="text"],
.cf7-step-form input[type="email"],
.cf7-step-form input[type="tel"],
.cf7-step-form input[type="number"],
.cf7-step-form select,
.cf7-step-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px; /* iOSの自動ズームを防ぐため16px以上 */
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.step-field-group p{
  font-size: 16px !important;
}

.cf7-step-form input[type="text"]:focus,
.cf7-step-form input[type="email"]:focus,
.cf7-step-form input[type="tel"]:focus,
.cf7-step-form input[type="number"]:focus,
.cf7-step-form select:focus,
.cf7-step-form textarea:focus {
  outline: none;
  border-color: #E1894E;
}

.cf7-step-form input.error,
.cf7-step-form select.error,
.cf7-step-form textarea.error {
  border-color: #ff0000;
}

.cf7-step-form .error-message {
  display: block;
  color: #ff0000;
  font-size: 0.85rem;
  margin-top: 4px;
}

.cf7-step-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ラジオボタンをボタン式に変更 */
.cf7-step-form .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cf7-step-form .wpcf7-radio .wpcf7-list-item {
  margin: 0;
  flex: 1;
  min-width: 120px;
}

.cf7-step-form .wpcf7-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cf7-step-form .wpcf7-radio .wpcf7-list-item label {
  display: block;
  padding: 16px 24px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  position: relative;
}

.cf7-step-form .wpcf7-radio .wpcf7-list-item label:hover {
  border-color: #E1894E;
  background-color: #fff5f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(225, 137, 78, 0.2);
}

/* 選択状態のスタイル */
.cf7-step-form .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label,
.cf7-step-form .wpcf7-radio input[type="radio"]:checked ~ .wpcf7-list-item-label {
  border-color: #E1894E;
  background-color: #E1894E;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 137, 78, 0.3);
}

/* label内にinputがある場合のスタイル（:has()対応ブラウザ用） */
.cf7-step-form .wpcf7-radio .wpcf7-list-item:has(input[type="radio"]:checked) label {
  border-color: #E1894E;
  background-color: #E1894E;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 137, 78, 0.3);
}

/* JavaScriptで追加されるselectedクラス用（:has()非対応ブラウザ用） */
.cf7-step-form .wpcf7-radio .wpcf7-list-item.selected label {
  border-color: #E1894E;
  background-color: #E1894E;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 137, 78, 0.3);
}

.cf7-step-form .wpcf7-radio input[type="radio"]:focus + .wpcf7-list-item-label,
.cf7-step-form .wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:focus) {
  outline: 2px solid #E1894E;
  outline-offset: 2px;
}

/* エラー状態のラジオボタン */
.cf7-step-form .wpcf7-radio.error .wpcf7-list-item label {
  border-color: #ff0000;
  background-color: #fff5f5;
}

.cf7-step-form .wpcf7-radio.error .wpcf7-list-item:has(input[type="radio"]:checked) label,
.cf7-step-form .wpcf7-radio.error .wpcf7-list-item.selected label {
  border-color: #ff0000;
  background-color: #ff0000;
  color: #fff;
}

/* CF7の送信ボタン */
.cf7-submit-button {
  display: none;
}

/* ボタンエリア */
.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 10px;
}

.step-prev,
.step-next,
.step-submit {
  padding: 14px 30px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
}

.wpcf7-number{
  width: 80% !important;
  height: 40px !important;
  border: 1px solid #ddd !important;
  font-size: 16px !important; /* iOSの自動ズームを防ぐため16px以上 */
}

.step-prev {
  background-color: #f5f5f5;
  color: #333;
}

.step-prev:hover {
  background-color: #e0e0e0;
}

.step-next {
  background-color: #E1894E;
  color: #fff;
}

.step-next:hover {
  background-color: #d67a3d;
}

/* CF7の送信ボタンはJavaScriptで制御 */
.cf7-submit-button {
  background-color: #22C100;
  color: #fff;
  text-align: center;
  width: 100%;
  padding: 14px 30px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 4px;
}

.cf7-submit-button:hover {
  background-color: #1ba800;
}

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

/* 確認表示（ステップ5） */
.confirmation-display {
  background-color: #f9f9f9;
  border: 2px solid #E1894E;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0 30px;
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.confirmation-item:last-child {
  border-bottom: none;
}

.confirmation-label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.confirmation-value {
  font-size: 18px;
  font-weight: bold;
  color: #E1894E;
}

/* ローディング画面 */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
  color: #fff;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.wpcf7-select,
.wpcf7-number{
  background-color: #fff !important;
}

/* サンクスページ（ステップ6） */
.thanks-step {
  text-align: center;
  padding: 40px 0px;
}

.thanks-content {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.thanks-content img {
  width: 50%;
  height: auto;
}

.thanks-title {
  font-size: 28px;
  font-weight: bold;
  color: #E1894E;
  margin-bottom: 24px;
}

.thanks-message {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
  margin-bottom: 16px;
}

.thanks-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}

.thanks-button-area {
  margin-top: 32px;
}

.line-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #06C755;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 18px 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.line-add-button:hover {
  background-color: #05B84A;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.4);
}

.line-add-button:active {
  transform: translateY(0);
}

.line-add-icon {
  font-size: 24px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .step-form-container {
    padding: 64px 0px 15px;
  }

  .step-prev,
  .step-next,
  .step-submit {
    text-align: center;
    width: 100%;
  }

  /* モバイルでのラジオボタン（ボタン式） */
  .cf7-step-form .wpcf7-radio .wpcf7-list-item {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .cf7-step-form .wpcf7-radio label {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  /* モバイルでのサンクスページ */
  .thanks-title {
    font-size: 24px;
  }

  .thanks-message {
    font-size: 18px;
  }

  .thanks-description {
    font-size: 14px;
  }

  .line-add-button {
    font-size: 22px;
    padding: 32px 0px;
    width: 100%;
    max-width: 370px;
  }
}
