/* display-stepper-1.css — ステッパー デモ専用スタイル */

/* ===== デモコンテナ調整 ===== */
.demo-container {
  padding: 32px 24px;
}

.stp-root {
  max-width: 540px;
  margin: 0 auto;
}

/* ===== ステップインジケーター ===== */
.stp-indicator {
  display: flex;
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
}

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

/* ステップ間の接続ライン
   right: 50% + width: 100% で「前のステップの中心」から「自分の中心」まで引く */
.stp-item + .stp-item::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: #E5E7EB;
  z-index: 0;
}

/* 完了済みステップの後ろのラインを青にする */
.stp-item.is-done + .stp-item::before {
  background: #2563EB;
}

/* ステップの丸（ドット） */
.stp-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #E5E7EB;
  color: #9AA5B4;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

/* 現在のステップ */
.stp-item.is-active .stp-dot {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}

/* 完了済みのステップ */
.stp-item.is-done .stp-dot {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}

/* ステップラベル */
.stp-label {
  font-size: 11px;
  color: #9AA5B4;
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
}

.stp-item.is-active .stp-label {
  color: #2563EB;
  font-weight: 700;
}

.stp-item.is-done .stp-label {
  color: #5A6A7A;
}

/* ===== ステップコンテンツ ===== */
.stp-step-title {
  font-size: 17px;
  font-weight: 700;
  color: #1A2332;
  margin: 0 0 8px;
}

.stp-step-desc {
  font-size: 14px;
  color: #5A6A7A;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* ===== フィールドセット ===== */
.stp-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stp-choice-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  color: #1A2332;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.stp-choice-label:hover {
  border-color: #2563EB;
  background: #F0F5FF;
}

.stp-choice-label input {
  accent-color: #2563EB;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== テキストエリア ===== */
.stp-textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  font-family: sans-serif;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 16px;
  color: #1A2332;
  transition: border-color 0.15s;
}

.stp-textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== エラーメッセージ ===== */
.stp-error {
  color: #DC2626;
  font-size: 13px;
  margin: -8px 0 12px;
}

/* ===== ナビゲーションボタン ===== */
.stp-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.stp-btn-primary {
  padding: 10px 24px;
  background: #2563EB;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.stp-btn-primary:hover {
  background: #1D4ED8;
}

.stp-btn-secondary {
  padding: 10px 24px;
  background: #fff;
  color: #5A6A7A;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  font-size: 14px;
  font-family: sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.stp-btn-secondary:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* ===== 完了画面 ===== */
.stp-complete-icon {
  width: 56px;
  height: 56px;
  background: #22C55E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.stp-complete-message {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #1A2332;
  margin: 0 0 24px;
}

/* ===== 回答確認 ===== */
.stp-confirm {
  background: #F4F6F9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.stp-confirm-item {
  margin-bottom: 16px;
}

.stp-confirm-item:last-child {
  margin-bottom: 0;
}

.stp-confirm-label {
  font-size: 11px;
  font-weight: 700;
  color: #5A6A7A;
  margin: 0 0 3px;
}

.stp-confirm-value {
  font-size: 14px;
  color: #1A2332;
  margin: 0;
}

/* ===== リセットボタン ===== */
.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* ===== アクセシビリティ ===== */
.stp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== スマホ対応 ===== */
@media (max-width: 480px) {
  .demo-container {
    padding: 24px 16px;
  }

  /* スマホではラベルを隠してドットのみ表示 */
  .stp-label {
    display: none;
  }

  .stp-dot {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .stp-item + .stp-item::before {
    top: 12px;
  }
}
