/* نوار پیشرفت آپلود — مستقل از تم ادمین و فروشگاه، تا همه‌جا یکسان دیده شود. */
.up-progress {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(31, 111, 91, 0.06);
    border: 1px solid rgba(31, 111, 91, 0.18);
    font-size: 0.85rem;
    line-height: 1.7;
}

.up-progress-failed {
    background: rgba(198, 40, 40, 0.06);
    border-color: rgba(198, 40, 40, 0.25);
}

.up-progress-done {
    background: rgba(46, 125, 50, 0.06);
    border-color: rgba(46, 125, 50, 0.22);
}

/* خط اطلاعات: درصد، حجم رفته/کل، باقی‌مانده، شمارهٔ فایل، مرحله */
.up-progress-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.up-pct {
    font-weight: 800;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.up-sent,
.up-left,
.up-file {
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
}

.up-left::before,
.up-sent::before,
.up-file::before {
    content: "·";
    margin-inline-end: 8px;
    opacity: 0.5;
}

.up-phase {
    margin-inline-start: auto;
    opacity: 0.75;
}

.up-bar {
    display: block;
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    /* در فایرفاکس progress رنگ را از accent-color می‌گیرد */
    accent-color: #1F6F5B;
    background: rgba(0, 0, 0, 0.08);
}

.up-bar::-webkit-progress-bar {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
}

.up-bar::-webkit-progress-value {
    background: #1F6F5B;
    border-radius: 999px;
    transition: width 0.15s linear;
}

.up-progress-failed .up-bar { accent-color: #c62828; }
.up-progress-failed .up-bar::-webkit-progress-value { background: #c62828; }
.up-progress-done .up-bar { accent-color: #2e7d32; }
.up-progress-done .up-bar::-webkit-progress-value { background: #2e7d32; }

.up-name {
    margin-top: 6px;
    font-size: 0.78rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: right;
}

.up-error {
    margin-top: 6px;
    color: #c62828;
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .up-progress {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.14);
    }
    .up-bar { background: rgba(255, 255, 255, 0.12); }
}
