/* フォーム固有のスタイル */
.contact-wrapper {
  max-width: 840px;
  margin: 40px auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #e3e9f2;
}

/* 入力フローのステップ表示 */
.contact-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  list-style: none;
  padding: 0;
  gap: 20px;
}
.contact-steps li {
  font-weight: bold;
  color: #999;
  position: relative;
}
.contact-steps li.current {
  color: #007bff;
}
.contact-steps li:not(:last-child)::after {
  content: "▶";
  margin-left: 20px;
  color: #ddd;
  font-size: 0.8em;
}

/* フォーム要素レイアウト */
.form-group {
  margin-bottom: 24px;
  border-bottom: 1px dashed #eee;
  padding-bottom: 24px;
}
.form-group:last-of-type {
  border-bottom: none;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: #0b3570; /* 見出し色に合わせる */
}

/* 必須・任意バッジ */
.label-required {
  background: #d32f2f;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  font-weight: normal;
}
.label-optional {
  background: #6c757d;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  font-weight: normal;
}

/* 入力フィールド */
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dfe6f2;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fcfcfc;
}
.form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
  background: #fff;
}
textarea.form-control {
  resize: vertical;
  min-height: 180px;
}

/* ラジオボタン・チェックボックス */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}
.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

/* プライバシーポリシー同意エリア */
.privacy-area {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 20px;
  border-radius: 8px;
  margin-top: 10px;
}
.privacy-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}
.privacy-link {
  color: #007bff;
  text-decoration: underline;
}

/* エラーメッセージ */
.error-list {
  background: #fdf2f2;
  border: 1px solid #f8d7da;
  color: #d32f2f;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  list-style: none;
}
.error-list li {
  margin-bottom: 5px;
  padding-left: 1.2em;
  position: relative;
}
.error-list li::before {
  content: "・";
  position: absolute;
  left: 0;
}

/* 確認画面用テーブル */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  border: 1px solid #dfe6f2;
}
.confirm-table th, .confirm-table td {
  padding: 16px;
  border-bottom: 1px solid #dfe6f2;
  text-align: left;
  vertical-align: top;
}
.confirm-table th {
  width: 30%;
  background: #f1f5fa;
  color: #003366;
  font-weight: 700;
  white-space: nowrap;
}

/* ボタンエリア */
.form-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}
.btn-submit {
  background: linear-gradient(180deg, #007bff, #0056b3);
  color: #fff;
  border: none;
  padding: 16px 60px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}
.btn-back {
  background: #fff;
  color: #666;
  border: 1px solid #ccc;
  padding: 16px 60px;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.btn-back:hover {
  background: #f8f8f8;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .contact-wrapper {
    padding: 20px;
    margin: 20px auto;
  }
  .confirm-table th, .confirm-table td {
    display: block;
    width: 100%;
  }
  .confirm-table th {
    border-bottom: none;
    padding-bottom: 5px;
    background: transparent;
  }
  .confirm-table td {
    padding-top: 0;
    padding-bottom: 20px;
  }
  .form-actions {
    flex-direction: column-reverse;
    gap: 15px;
  }
  .btn-submit, .btn-back {
    width: 100%;
    text-align: center;
    padding: 14px 0;
  }
}