/**
 * お問い合わせフォーム（contact/index）専用: ステップ表示・バリデーション・送信ボタンローディング。
 */

.step-section {
  display: none;
  animation: fadeInContact 0.5s ease-out forwards;
}
.step-section.active {
  display: block;
}
@keyframes fadeInContact {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-step {
  position: relative;
  flex: 1;
  text-align: center;
}
.progress-step::after {
  content: '';
  position: absolute;
  top: 15px;
  right: -50%;
  width: 100%;
  height: 2px;
  background-color: #e5e5e5;
  z-index: 1;
}
.progress-step:last-child::after {
  display: none;
}
.progress-step.completed::after,
.progress-step.active::after {
  background-color: #7a9082;
}
.step-circle {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e5e5e5;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  transition: background-color 0.3s;
}
.active .step-circle,
.completed .step-circle {
  background-color: #7a9082;
}

.form-group {
  margin-bottom: 2rem;
}
.field-required {
  background-color: #c66e54;
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 8px;
}
.field-optional {
  background-color: #999999;
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 8px;
}

input[type='text'],
input[type='tel'],
input[type='email'],
select,
textarea {
  width: 100%;
  border: 1px solid #e5e5e5;
  padding: 12px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #7a9082;
}

.error-input {
  border-color: #c66e54 !important;
  background-color: #fff5f2;
}
.error-text {
  color: #c66e54;
  font-size: 12px;
  font-weight: bold;
  margin-top: 4px;
  display: none;
}
.error-visible {
  display: block;
}

input[type='radio'],
input[type='checkbox'] {
  accent-color: #7a9082;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
  color: transparent !important;
}
.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinContact 0.8s linear infinite;
}
@keyframes spinContact {
  to {
    transform: rotate(360deg);
  }
}
