/* Shared 4-step order flow — track / orders / admin */
.od-progress {
    padding: 12px 16px 16px;
    border-bottom: 1px solid #eef3f8;
}

.od-progress-track {
    display: grid;
    grid-template-columns: repeat(var(--od-progress-cols, 4), minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.od-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-align: center;
    position: relative;
}

.od-progress-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(50% + 16px);
    right: calc(-50% + 16px);
    height: 2px;
    background: #dce6ef;
    z-index: 0;
    pointer-events: none;
}

.od-progress-step.is-done:not(:last-child)::before {
    background: #1b6b3a;
}

.od-progress-step.is-before-cancel:not(:last-child)::before {
    background: #f0c4c4;
}

.od-progress-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #eef3f8;
    color: #9aacbf;
    border: 2px solid #dde6f0;
    font-size: .75rem;
    position: relative;
    z-index: 1;
}

/* Active step colors based on seller_status */
.od-progress.ss-pending .od-progress-step.is-active .od-progress-dot {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
    animation: od-progress-pulse-orange 2.2s ease-in-out infinite;
}

.od-progress.ss-accepted .od-progress-step.is-active .od-progress-dot {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .14);
    animation: od-progress-pulse-blue 2.2s ease-in-out infinite;
}

.od-progress.ss-shipped .od-progress-step.is-active .od-progress-dot {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
    animation: od-progress-pulse-purple 2.2s ease-in-out infinite;
}

.od-progress.ss-delivered .od-progress-step.is-active .od-progress-dot {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
    animation: od-progress-pulse-green 2.2s ease-in-out infinite;
}

/* Fallback: step-based colors (when seller_status not available) */
.od-progress-step.is-step-1.is-active .od-progress-dot {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
    animation: od-progress-pulse-orange 2.2s ease-in-out infinite;
}

.od-progress-step.is-step-2.is-active .od-progress-dot {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .14);
    animation: od-progress-pulse-blue 2.2s ease-in-out infinite;
}

.od-progress-step.is-step-3.is-active .od-progress-dot {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
    animation: od-progress-pulse-purple 2.2s ease-in-out infinite;
}

.od-progress-step.is-step-4.is-active .od-progress-dot {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
    animation: od-progress-pulse-green 2.2s ease-in-out infinite;
}

.od-progress-step.is-done .od-progress-dot {
    background: #1b6b3a;
    color: #fff;
    border-color: #1b6b3a;
}

.od-progress-step.is-cancel .od-progress-dot {
    background: #a12b2b;
    color: #fff;
    border-color: #a12b2b;
    box-shadow: 0 0 0 4px rgba(161, 43, 43, .12);
}

@keyframes od-progress-pulse-orange {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, .08);
    }
}

@keyframes od-progress-pulse-blue {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, .14);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, .08);
    }
}

@keyframes od-progress-pulse-purple {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(139, 92, 246, .08);
    }
}

@keyframes od-progress-pulse-green {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, .08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .od-progress-step.is-active .od-progress-dot {
        animation: none;
    }
}

.od-progress-body {
    min-width: 0;
    width: 100%;
}

.od-progress-label {
    color: #8aa0b3;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.od-progress-step.is-active .od-progress-label {
    color: #003C71;
    font-weight: 800;
}

/* Keep active step text in sync with the seller-status color. */
.od-progress.ss-pending .od-progress-step.is-active .od-progress-label,
.od-progress.ss-pending .od-progress-step.is-active .od-progress-state {
    color: #f59e0b;
}

.od-progress.ss-accepted .od-progress-step.is-active .od-progress-label,
.od-progress.ss-accepted .od-progress-step.is-active .od-progress-state {
    color: #3b82f6;
}

.od-progress.ss-packing .od-progress-step.is-active .od-progress-label,
.od-progress.ss-packing .od-progress-step.is-active .od-progress-state {
    color: #3b82f6;
}

.od-progress.ss-shipped .od-progress-step.is-active .od-progress-label,
.od-progress.ss-shipped .od-progress-step.is-active .od-progress-state {
    color: #8b5cf6;
}

.od-progress.ss-delivered .od-progress-step.is-active .od-progress-label,
.od-progress.ss-delivered .od-progress-step.is-active .od-progress-state,
.od-progress.ss-done .od-progress-step.is-active .od-progress-label,
.od-progress.ss-done .od-progress-step.is-active .od-progress-state {
    color: #10b981;
}

.od-progress-step.is-done .od-progress-label {
    color: #1b6b3a;
}

.od-progress-step.is-cancel .od-progress-label {
    color: #a12b2b;
    font-weight: 800;
}

.od-progress-state {
    margin-top: 2px;
    color: #9aacbf;
    font-size: .72rem;
    font-weight: 700;
}

.od-progress-step.is-active .od-progress-state {
    color: #003C71;
}

.od-progress-step.is-done .od-progress-state {
    color: #3d7a54;
}

.od-progress-step.is-cancel .od-progress-state {
    color: #a12b2b;
}

.od-progress-when {
    display: block;
    margin-top: 4px;
    color: #6b7c8d;
    font-size: .72rem;
    line-height: 1.4;
}

.od-progress-hint {
    margin: 6px 0 0;
    color: #5a7084;
    font-size: .75rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.od-progress-hint.is-cancel-reason {
    color: #a12b2b;
    font-weight: 600;
}

.od-progress-note {
    color: #5a7084;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    overflow-wrap: anywhere;
}

.od-progress-ship {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed #d5e0ea;
    border-radius: 12px;
    background: #f8fafc;
}

.od-progress-ship-kicker {
    margin-bottom: 6px;
    color: #7a8c9d;
    font-size: .72rem;
    font-weight: 700;
}

.od-progress-ship-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #5a7084;
    font-size: .82rem;
    line-height: 1.5;
}

.od-progress-ship-row strong {
    color: #003C71;
    font-weight: 800;
    text-align: right;
    overflow-wrap: anywhere;
}

.admin-order-progress-wrap .od-progress {
    padding: 0;
    border-bottom: 0;
}

.od-progress.is-cancel-only .od-progress-track {
    grid-template-columns: minmax(0, 1fr);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767.98px) {
    .od-progress {
        padding: 12px 14px 14px;
    }

    .od-progress-track {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 0;
    }

    .od-progress-step {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        align-items: start;
        justify-items: start;
        column-gap: 12px;
        text-align: left;
        padding: 0 0 16px;
    }

    .od-progress-step:last-child {
        padding-bottom: 0;
    }

    .od-progress-step:not(:last-child)::before {
        top: 28px;
        left: 13px;
        right: auto;
        width: 2px;
        height: calc(100% - 28px);
        background: #dce6ef;
    }

    .od-progress-step.is-done:not(:last-child)::before {
        background: #1b6b3a;
    }

    .od-progress-step.is-before-cancel:not(:last-child)::before {
        background: #f0c4c4;
    }

    .od-progress-label {
        font-size: .9rem;
    }

    .od-progress-hint {
        font-size: .8rem;
    }

    .od-progress-note {
        font-size: .8rem;
        line-height: 1.5;
        text-align: left;
    }
}