/* =================== centerware · แถบความคืบหน้า + ไทม์ไลน์ ==================
   ใช้ร่วมกันทั้งหน้าร้าน (assets/css/timeline.css)
   และหลังบ้าน (../assets/css/timeline.css)
   ========================================================================= */

:root {
    --cw-tl-red: #e31937;
    --cw-tl-line: #e5e7eb;
    --cw-tl-muted: #9ca3af;
}

/* ------------------------------------------------- แถบความคืบหน้า 5 ขั้น */
.cw-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: .25rem 0;
}

.cw-step {
    flex: 1 1 0;
    min-width: 92px;
    position: relative;
    text-align: center;
    padding: 0 .25rem;
}

/* เส้นเชื่อมระหว่างขั้น */
.cw-step::before,
.cw-step::after {
    content: '';
    position: absolute;
    top: 21px;
    height: 3px;
    background: var(--cw-tl-line);
    z-index: 0;
}

.cw-step::before { left: 0; right: 50%; }
.cw-step::after  { left: 50%; right: 0; }

.cw-step:first-child::before,
.cw-step:last-child::after { display: none; }

.cw-step__dot {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    margin: 0 auto .5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 3px solid var(--cw-tl-line);
    color: var(--cw-tl-muted);
    font-size: 1rem;
    transition: all .2s ease;
}

.cw-step__label {
    font-size: .8rem;
    line-height: 1.35;
    color: var(--cw-tl-muted);
    font-weight: 500;
}

/* ผ่านมาแล้ว */
.cw-step--done .cw-step__dot {
    background: #059669;
    border-color: #059669;
    color: #fff;
}
.cw-step--done::before,
.cw-step--done::after { background: #059669; }
.cw-step--done .cw-step__label { color: #047857; }

/* ขั้นปัจจุบัน */
.cw-step--current .cw-step__dot {
    background: var(--cw-tl-red);
    border-color: var(--cw-tl-red);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(227, 25, 55, .16);
}
.cw-step--current::before { background: #059669; }
.cw-step--current .cw-step__label {
    color: var(--cw-tl-red);
    font-weight: 700;
}

/* ยังไม่ถึง */
.cw-step--todo .cw-step__dot { background: #f9fafb; }

/* ------------------------------------------------------------- ไทม์ไลน์ */
.cw-timeline {
    position: relative;
    padding-left: 6px;
}

.cw-tl-item {
    position: relative;
    display: flex;
    gap: .9rem;
    padding-bottom: 1.15rem;
}

/* เส้นแนวตั้งเชื่อมจุด */
.cw-tl-item::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: var(--cw-tl-line);
}
.cw-tl-item:last-child::before { display: none; }
.cw-tl-item:last-child { padding-bottom: 0; }

.cw-tl-dot {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    position: relative;
    z-index: 1;
}

.cw-tl-body { padding-top: .15rem; min-width: 0 }

.cw-tl-title {
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.3;
}

.cw-tl-msg {
    font-size: .9rem;
    color: #4b5563;
    margin-top: .1rem;
    word-break: break-word;
}

.cw-tl-meta {
    font-size: .78rem;
    color: var(--cw-tl-muted);
    margin-top: .2rem;
}

/* --------------------------------------------------------------- มือถือ */
@media (max-width: 575.98px) {
    .cw-step { min-width: 78px }
    .cw-step__dot { width: 38px; height: 38px; font-size: .85rem }
    .cw-step::before, .cw-step::after { top: 18px }
    .cw-step__label { font-size: .72rem }
}
