/* ===========================================================
   نوار پیشرفت آپلود — مشترک بین سایت و پنل
   =========================================================== */

.up-picked {
    font-size: 0.78rem;
    color: var(--color-success, #22c55e);
    margin-top: 0.4rem;
    line-height: 1.8;
    word-break: break-word;
}

.up-overlay {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: upFade 0.22s ease;
}
@keyframes upFade { from { opacity: 0; } to { opacity: 1; } }

.up-card {
    width: 100%; max-width: 380px;
    background: var(--admin-card, var(--surface-glass, #12181b));
    border: 1px solid var(--admin-border, rgba(255,255,255,0.12));
    border-radius: 18px;
    padding: 1.75rem 1.5rem 1.35rem;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    color: var(--color-text, #eaf7f6);
}

/* سه نقطه‌ی جهنده — نشانه‌ی «کار در جریان است» حتی پیش از رسیدن اولین درصد */
.up-spin { display: flex; justify-content: center; gap: 0.35rem; margin-bottom: 1rem; }
.up-spin span {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--color-primary, #00e5cc);
    animation: upBounce 1.1s ease-in-out infinite;
}
.up-spin span:nth-child(2) { animation-delay: 0.15s; }
.up-spin span:nth-child(3) { animation-delay: 0.3s; }
@keyframes upBounce {
    0%, 80%, 100% { transform: translateY(0);      opacity: 0.45; }
    40%           { transform: translateY(-7px);   opacity: 1; }
}

.up-title { font-size: 1rem; font-weight: 800; margin-bottom: 0.4rem; }
.up-files {
    font-size: 0.78rem; color: var(--color-muted, #9fb3b1);
    line-height: 1.8; margin-bottom: 1rem; word-break: break-word;
    max-height: 3.6em; overflow: hidden;
}

.up-bar {
    height: 8px; border-radius: 99px; overflow: hidden;
    background: var(--fill-3, rgba(255,255,255,0.09));
    margin-bottom: 0.6rem;
}
.up-fill {
    height: 100%; width: 0%; border-radius: 99px;
    background: linear-gradient(90deg, var(--color-primary, #00e5cc), var(--color-accent, #7c5cff));
    transition: width 0.25s ease;
    position: relative; overflow: hidden;
}
/* براقیِ متحرک روی نوار — فقط تا وقتی پر می‌شود */
.up-fill::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: upSheen 1.4s linear infinite;
}
@keyframes upSheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.up-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.78rem; margin-bottom: 0.85rem;
}
.up-pct  { font-weight: 900; color: var(--color-primary, #00e5cc); font-size: 0.95rem; }
.up-size { color: var(--color-muted, #9fb3b1); }

.up-note { font-size: 0.76rem; color: var(--color-muted, #9fb3b1); line-height: 1.9; margin-bottom: 1rem; }

.up-cancel {
    background: transparent;
    border: 1px solid var(--admin-border, rgba(255,255,255,0.14));
    color: var(--color-muted, #9fb3b1);
    border-radius: 10px; padding: 0.45rem 1.4rem;
    font-family: inherit; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.up-cancel:hover { color: var(--color-danger, #ff5c47); border-color: var(--color-danger, #ff5c47); }

/* شکست: نوار قرمز و بی‌حرکت، تا با حالت «در جریان» اشتباه نشود */
.up-failed .up-fill  { background: var(--color-danger, #ff5c47); }
.up-failed .up-fill::after,
.up-failed .up-spin  { display: none; }
.up-failed .up-title { color: var(--color-danger, #ff5c47); }

/* کاربری که حرکت کمتر خواسته: پرش و براقی نه، ولی خودِ درصد سر جایش */
.up-reduced .up-spin span,
.up-reduced .up-fill::after { animation: none; }
.up-reduced .up-fill        { transition: none; }
@media (prefers-reduced-motion: reduce) {
    .up-overlay { animation: none; }
    .up-spin span, .up-fill::after { animation: none; }
}
