html.has-upload-progress,
html.has-upload-progress body { overflow: hidden !important; overscroll-behavior: none; }

/* Body portal fallback for older WebViews; showModal additionally owns the native top layer. */
#globalUploadProgress {
    position: fixed; inset: 0; z-index: 2147483647;
    box-sizing: border-box; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; border: 0; padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    background: rgba(15, 28, 39, .58); color: #25384a; font-family: inherit;
    overflow: auto; overscroll-behavior: contain; touch-action: none;
}
#globalUploadProgress:not([open]) { display: none; }
#globalUploadProgress[open] { display: flex; align-items: center; justify-content: center; }
#globalUploadProgress::backdrop { background: transparent; }
#globalUploadProgress .upload-progress-card {
    box-sizing: border-box; width: min(100%, 390px); padding: 28px 24px 24px;
    border-radius: 18px; background: #fff; box-shadow: 0 20px 80px #071b3440; text-align: center;
}
#globalUploadProgress .upload-progress-icon {
    display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 16px;
    border-radius: 16px; background: #eaf4ff; color: #1677d2; font-size: 32px; font-weight: 600;
}
#uploadProgressTitle { margin: 0 0 12px; font-size: 20px; line-height: 1.4; }
#uploadProgressStage { margin: 0 0 10px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
#uploadProgressFilename { margin: 0 0 18px; color: #65798b; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#uploadProgressFilename:empty { display: none; }
#uploadProgressBar { height: 8px; overflow: hidden; border-radius: 8px; background: #eaf0f5; }
#uploadProgressBar > div { height: 100%; border-radius: inherit; background: #1677d2; transition: width .15s linear; }
#uploadProgressBar.is-indeterminate > div { animation: upload-progress-wait 1.2s ease-in-out infinite alternate; }
#uploadProgressStatus { margin: 12px 0 0; font-size: 14px; color: #1677b8; line-height: 1.6; }
#uploadProgressHint { margin: 20px 0 0; font-size: 12px; color: #7b8794; line-height: 1.6; }
@keyframes upload-progress-wait { from { transform: translateX(0); } to { transform: translateX(185%); } }
@media (prefers-reduced-motion: reduce) {
    #uploadProgressBar > div { transition: none; }
    #uploadProgressBar.is-indeterminate > div { animation: none; }
}
#uploadProgressOrderContext{white-space:pre-line;text-align:left;padding:10px 12px;border-radius:8px;background:#f0f7ff;color:#24446b;font-size:14px;line-height:1.6;max-height:160px;overflow:auto;overflow-wrap:anywhere}
