﻿/* =========================================
   共通の枠組み・リスト初期化
========================================= */
.cs-timeline-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2em;
    padding: 20px 16px;
}

.cs-timeline-list {
    list-style: none; /* デフォルトのリストマークを消去 */
    padding: 0;
    margin: 0;
}

/* =========================================
   各ステップ項目と「縦の繋ぎ線」
========================================= */
.cs-timeline-item {
    position: relative;
    /* 左側に丸アイコンと線を配置するための余白（パディング） */
    padding-left: 56px; 
    /* 次のステップとの縦の余白 */
    padding-bottom: 48px; 
}

/* 最後のステップは下の余白をなくす */
.cs-timeline-item:last-child {
    padding-bottom: 0;
}

/* ▼ 魔法のコード：疑似要素で各ステップを繋ぐ縦線を描く ▼ */
.cs-timeline-item::before {
    content: '';
    position: absolute;
    /* 丸アイコンの真下からスタートさせる（アイコンのサイズ32pxに合わせて調整） */
    top: 32px; 
    /* 左端から15pxの位置（丸アイコンの中央）に線を引く */
    left: 15px; 
    width: 2px;
    /* 丸アイコンの分（32px）を引いた高さまで線を伸ばす */
    height: calc(100% - 32px); 
    background-color: #e2e8f0; /* 未完了のグレー線 */
    z-index: 1;
}

/* 最後のステップには下へ伸びる線を引かない */
.cs-timeline-item:last-child::before {
    display: none;
}

/* =========================================
   丸いノード（ステップ番号）
========================================= */
.cs-timeline-node {
    position: absolute;
    top: 0;
    left: 0; /* padding-leftで空けたスペースの左上に絶対配置 */
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    z-index: 2; /* 縦線より上に表示 */
    box-sizing: border-box; /* ボーダー追加時にサイズが変わるのを防ぐ */
    transition: all 0.3s ease;
}
.cs-timeline-node {
    color: transparent;
}
/* =========================================
   コンテンツ（日付・タイトル・説明文）
========================================= */
.cs-timeline-content {
    /* 丸アイコンの高さの中央付近とテキストの上部を揃えるための微調整 */
    padding-top: 2px;
}

.cs-timeline-date {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}

.cs-timeline-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.4;
}

.cs-timeline-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   ステータス別のスタイル変化（完了・現在地）
========================================= */

/* ▼ 完了済（is-completed）のスタイル ▼ */
.cs-timeline-item.is-completed .cs-timeline-node {
    background-color: #2589d0; /* ブルー */
    color: #ffffff;
}
.cs-timeline-item.is-completed::before {
    background-color: #2589d0; /* 下へ続く縦線もブルーに塗る */
}

/* ▼ 現在地（is-active）のスタイル ▼ */
.cs-timeline-item.is-active .cs-timeline-node {
    background-color: #ffffff;
    border: 3px solid #2589d0; /* 枠線をブルーに */
    color: #2589d0;
    box-shadow: 0 4px 12px rgba(37, 137, 208, 0.2);
}
.cs-timeline-item.is-active .cs-timeline-title {
    color: #2589d0; /* タイトルもアクセントカラーにして強調 */
}

/* =========================================
   レスポンシブ対応（スマホ表示時）
========================================= */
@media screen and (max-width: 640px) {
    .cs-timeline-item {
        padding-left: 44px; /* スマホでは左の余白を少し狭くする */
        padding-bottom: 36px;
    }
    .cs-timeline-node {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .cs-timeline-item::before {
        top: 28px;
        left: 13px; /* 28pxの半分(14px)から線の太さ(2px)の半分(1px)を引いた位置 */
        height: calc(100% - 28px);
    }
    .cs-timeline-title {
        font-size: 1rem;
    }
    .cs-timeline-desc {
        font-size: 0.9rem;
    }
}