/* ==========================================================
   Modern Form Styles for Smile Job (Register / Contact)
========================================================== */

.modern-form-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto 60px;
  font-family: "Noto Sans JP", sans-serif;
  color: #333;
}

@media (max-width: 768px) {
  .modern-form-wrapper {
    padding: 20px;
  }
}

/* --- Progress Bar --- */
.form-progress {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 60px; margin-top: 23px;
  padding: 0 20px;
}
.form-progress::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: #e0e0e0;
  z-index: 1;
}
.progress-step {
  position: relative;
  z-index: 2;
  width: 50px;
  height: 50px;
  background: #e0e0e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
  font-size: 1.35rem;
  transition: all 0.3s ease;
}
.progress-step .label {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 1.05rem; /* 文字を大きく */
  color: #666;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.05em;
}
.progress-step.active {
  background: #3498db;
  box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.2);
}
.progress-step.active .label {
  color: #3498db;
  font-weight: bold;
}

/* --- Step Title --- */
.step-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 45px;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 15px;
}
.step-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: #e67e22;
}
.step-title span {
  font-size: 1.6rem;
  display: block;
  margin-top: 10px;
}
.step-note {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 25px;
}

/* --- Form Groups & Labels --- */
.form-group {
  margin-bottom: 45px;
}
.required-badge, .optional-badge {
  display: block;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}
.required-badge::after {
  content: "必須";
  background: #e74c3c;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 10px;
}
.optional-badge::after {
  content: "任意";
  background: #95a5a6;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 10px;
}
.form-group .note {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-left: 10px;
  font-weight: normal;
}

/* --- Inputs (Text, Email, Tel, etc) --- */
.modern-input {
  width: 100%;
  padding: 20px 24px; font-size: 1.05rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fdfdfd;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.modern-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
  background: #fff;
}
textarea.modern-input {
  min-height: 150px;
  resize: vertical;
}

/* Flex input (Age) */
.flex-input {
  display: flex;
  align-items: center;
}
.flex-input input {
  width: 120px;
  margin-right: 15px;
}

/* --- Checkbox & Radio Buttons (Card UI) --- */
/* Grid layout targeting CF7's internal wrapper */
.input-grid .wpcf7-form-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px; /* 余白を大きく */
  width: 100%;
}
.input-grid.small-grid .wpcf7-form-control {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .input-grid .wpcf7-form-control {
    grid-template-columns: 1fr; /* スマホは1列 */
    gap: 16px;
  }
}

.wpcf7-list-item {
  margin: 0 !important;
  display: block;
}

.input-grid .wpcf7-list-item-label {
  display: flex;
  align-items: center;
  padding: 20px 24px; font-size: 1.05rem;
  background: #f9f9f9;
  border: 2px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  height: 100%;
  position: relative;
}
.input-grid .wpcf7-list-item-label:hover {
  background: #f0f7fb;
  border-color: #bbdcf2;
}

/* 実際のチェックボックス・ラジオボタンは隠す */
.input-grid input[type="radio"],
.input-grid input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* チェック時のスタイル */
.input-grid input[type="radio"]:checked + .wpcf7-list-item-label,
.input-grid input[type="checkbox"]:checked + .wpcf7-list-item-label {
  background: #fff;
  border-color: #e67e22;
  box-shadow: 0 4px 10px rgba(230, 126, 34, 0.15);
  color: #e67e22;
}
.input-grid input[type="radio"]:checked + .wpcf7-list-item-label::after,
.input-grid input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
  content: "✔";
  position: absolute;
  right: 15px;
  color: #e67e22;
  font-weight: bold;
}

/* --- Buttons --- */
/* --- Buttons --- */
.step-actions {
  margin-top: 60px; /* 上の余白をさらに拡大 */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px; /* ボタン間の余白 */
  flex-wrap: wrap; /* CF7のpタグ対策 */
}

/* CF7が挿入する p や br を無効化・調整 */
.step-actions p {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 100%;
  margin: 0;
}
.step-actions br {
  display: none;
}

/* PCではセンターで横1列並び */
@media (min-width: 769px) {
  .step-actions, .step-actions p {
    flex-direction: row;
  }
  .btn-next, .btn-submit, .btn-prev {
    min-width: 240px;
  }
}

/* スマホでは縦並びに */
@media (max-width: 768px) {
  .step-actions, .step-actions p {
    flex-direction: column;
    gap: 20px;
  }
  .btn-next, .btn-submit, .btn-prev {
    width: 100%;
  }
  .btn-prev {
    order: 2;
  }
  .btn-next, .btn-submit {
    order: 1;
  }
}

.btn-next, .btn-submit, .btn-prev {
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.btn-next, .btn-submit {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}
.btn-next:hover, .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}
.btn-prev {
  background: #f1f1f1;
  color: #666;
}
.btn-prev:hover {
  background: #e4e4e4;
  color: #333;
}

/* --- Policy --- */
.policy-agreement {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 0.95rem;
  color: #666;
}
.policy-agreement a {
  color: #3498db;
  text-decoration: underline;
}


/* --- Error Styles --- */
.has-error {
  border-color: #e74c3c !important;
  background: #fdf2f1 !important;
}
.wpcf7-form-control-wrap.has-error .wpcf7-list-item-label {
  border-color: #e74c3c !important;
  background: #fdf2f1 !important;
  color: #c0392b !important;
}

/* --- Form Main Heading (Centered & Larger) --- */
.form-main-heading {
  text-align: center;
  margin-bottom: 35px;
}
.form-main-heading h2 {
  font-size: 2.2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.3;
}
.form-main-heading p {
  font-size: 1.15rem;
  color: #666;
  margin: 0;
}

@media (max-width: 768px) {
  .form-main-heading h2 {
    font-size: 1.6rem;
  }
  .form-main-heading p {
    font-size: 0.95rem;
  }
}
