@charset "UTF-8";
/* CSS Document */
/* フローチャート用のCSS */

/* =========================
   基本
========================= */
.flowchart-info {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  color: #555;
}

.flowchart {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: nowrap;
  width: 100%;
  overflow: auto;
  padding-right: 5px;
  padding-left: 5px;
}

/* =========================
   ステップ本体
========================= */
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: calc(100% / 5 - 10px);
  padding: 5px;
  min-height: auto;
  overflow: hidden;
  cursor: pointer;
  text-align: center;

  background-color: #f9f9f9;
  border: 1px solid #aaa;
  border-left: 6px solid transparent;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
  background-color: #f0f4f8;
}

.step.active {
  background-color: inherit;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  min-height: auto;
}

/* =========================
   ヘッダー
========================= */
.step-header {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.step-header h3 {
  flex-grow: 1;
  margin: 0;
  text-align: center;
}

.toggle-icon {
  margin-left: auto;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.step.active .toggle-icon {
  transform: rotate(180deg);
}

/* =========================
   STEP番号
========================= */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  color: white;
  background-color: #777;
}

/* 色分け */
.step:nth-child(1) .step-number { background-color: #009fe3; }
.step:nth-child(2) .step-number { background-color: #f4a300; }
.step:nth-child(3) .step-number { background-color: #00558b; }
.step:nth-child(4) .step-number { background-color: #d54787; }
.step:nth-child(5) .step-number { background-color: #007934; }

.step:nth-child(1) { border-left-color: #009fe3; }
.step:nth-child(2) { border-left-color: #f4a300; }
.step:nth-child(3) { border-left-color: #00558b; }
.step:nth-child(4) { border-left-color: #d54787; }
.step:nth-child(5) { border-left-color: #007934; }

/* =========================
   コンテンツ開閉
========================= */
.step-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.step.active .step-content {
  max-height: 200px;
  min-height: 0;
}

/* =========================
   矢印・ボタン
========================= */
.arrow::after {
  color: #555;
}

button {
  background-color: #888;
  color: white;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.toggle-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.toggle-open,
.toggle-close {
  padding: 10px 20px;
  background-color: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.toggle-open:hover,
.toggle-close:hover {
  background-color: #e38e00;
}

/* =========================
   スマホ
========================= */
@media (max-width: 768px) {
  .flowchart {
    flex-direction: column;
    align-items: center;
  }

  .step {
    width: 90%;
    max-width: 500px;
    margin-bottom: 5px;
    padding: 15px;
    border: 6px solid var(--color-border);
    border-left-width: 6px;
    border-radius: 10px;
    background-color: #f9f9f9;
  }

  /* 左色帯を維持 */
  .step:nth-child(1) { border-left-color: #009fe3; }
  .step:nth-child(2) { border-left-color: #f4a300; }
  .step:nth-child(3) { border-left-color: #00558b; }
  .step:nth-child(4) { border-left-color: #d54787; }
  .step:nth-child(5) { border-left-color: #007934; }

  .step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .step-number {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
      
    width: 50px;   /* ← サイズ固定 */
    height: 50px;  /* ← サイズ固定 */
    border-radius: 50%;
      
    text-align: center;
    flex-direction: column;
  }

  .step-header h3 {
    margin: 0;
    flex-grow: 1;
  }

  .step-content {
    margin-left: calc(50px + 10px);
    padding-top: 8px;
    padding-bottom: 0;
    margin-bottom: 0;
    max-height: 0;
    overflow: hidden;
    text-align: left;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  }

  .step.active .step-content {
    max-height: 300px;
    min-height: 0;
    padding-bottom: 0;
  }
}