/*
 * 体験申込（パターン4）の段階の表示（resources/views/user/calendar_sample/partials/trial_steps.blade.php）。
 * 申込画面（user_style.css と一緒に読む）と申込完了の画面（pattern4/layout）の両方で読むため、独立したファイルにした。
 * 2026-11-27 dejam の最適化の案の見せ方を取り込み、段階の数は実際の流れ（4つ）に合わせた。
 */
.trial-steps {
  --trial-steps-blue: #1474e8;
  --trial-steps-blue-light: #dcecff;
  --trial-steps-muted: #6b7483;
  --trial-steps-line: #dce3ed;
  width: 100%;
  padding: 16px 20px;
  border-bottom: 1px solid #e8edf5;
  background: #fff;
  box-sizing: border-box;
}

.trial-steps-list {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.trial-steps-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--trial-steps-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

/* 段階と段階をつなぐ線 */
.trial-steps-item + .trial-steps-item::before {
  content: "";
  flex: none;
  width: 64px;
  height: 2px;
  margin: 0 8px;
  background: var(--trial-steps-line);
}

.trial-steps-dot {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e5e9ef;
  color: #4f5868;
  font-size: 14px;
}

.trial-steps-check {
  display: none;
  font-size: 12px;
}

.trial-steps-item.is-active {
  color: var(--trial-steps-blue);
}

.trial-steps-item.is-active .trial-steps-dot {
  background: var(--trial-steps-blue);
  color: #fff;
}

.trial-steps-item.is-done .trial-steps-dot {
  background: var(--trial-steps-blue-light);
  color: var(--trial-steps-blue);
}

.trial-steps-item.is-done .trial-steps-number {
  display: none;
}

.trial-steps-item.is-done .trial-steps-check {
  display: inline;
}

.trial-steps-item.is-done + .trial-steps-item::before {
  background: var(--trial-steps-blue);
}

@media (max-width: 991.98px) {
  .trial-steps-item + .trial-steps-item::before {
    width: 24px;
  }
}

/* スマホ：丸い数字の下に段階名を置き、4つを均等に並べる */
@media (max-width: 767.98px) {
  .trial-steps {
    padding: 10px 8px;
  }

  .trial-steps-list {
    align-items: flex-start;
  }

  .trial-steps-item {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    font-size: 10px;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
  }

  .trial-steps-item + .trial-steps-item::before {
    position: absolute;
    top: 11px;
    right: calc(50% + 16px);
    width: calc(100% - 32px);
    margin: 0;
  }

  .trial-steps-dot {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}
