/**
 * checkout-steps.css
 * チェックアウトフローのステップインジケーター（プログレスバー）スタイル
 *
 * 【使用ページ】
 * - cart.html（Step 1）
 * - checkout-info.html（Step 2）
 * - checkout-confirm.html（Step 3）
 * - thanks.html（Step 4）
 *
 * 【クラス名規則】
 * - BEM形式: .checkout-steps（ブロック）、__item（要素）、--active/--completed（修飾子）
 * - 既存クラスとの競合なし（プレフィックス checkout- で名前空間を分離）
 */

/* ========== ステップインジケーター コンテナ ========== */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 20px auto 30px;
    padding: 0 10px;
    position: relative;
}

/* ステップ間の接続線（背景として描画） */
.checkout-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #d7dee2;
    z-index: 0;
}

/* ========== 各ステップアイテム ========== */
.checkout-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* ステップ番号の丸い数字（疑似要素で描画） */
.checkout-steps__item::before {
    content: attr(data-step);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #d7dee2;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ステップラベルテキスト */
.checkout-steps__item span {
    display: block;
    white-space: nowrap;
}

/* ========== 現在のステップ（アクティブ状態） ========== */
.checkout-steps__item--active {
    color: #2196f3;
    font-weight: bold;
}

.checkout-steps__item--active::before {
    background: #2196f3;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
}

/* ========== 完了済みのステップ ========== */
.checkout-steps__item--completed {
    color: #4caf50;
}

.checkout-steps__item--completed::before {
    background: #4caf50;
    color: #fff;
    /* チェックマークを表示（数字の代わりに✓） */
    content: '✓';
}

/* ========== レスポンシブ対応（モバイル） ========== */
@media (max-width: 500px) {
    .checkout-steps {
        flex-wrap: nowrap;
        padding: 0 5px;
        margin: 15px auto 20px;
    }

    .checkout-steps::before {
        left: 30px;
        right: 30px;
    }

    .checkout-steps__item {
        font-size: 10px;
    }

    .checkout-steps__item::before {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-bottom: 5px;
    }

    .checkout-steps__item span {
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ========== カート画面の「次へ進む」ボタン追加スタイル ========== */
.checkout-next-button {
    margin-top: 30px;
    text-align: center;
}

.checkout-next-button .c-button--primary {
    text-decoration: none;
}