.has-upload-progress-modal {
    overflow: hidden;
}

.upload-progress-modal[hidden] {
    display: none;
}

.upload-progress-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.upload-progress-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(10px);
}

.upload-progress-card {
    position: relative;
    width: min(100%, 460px);
    padding: 26px;
    color: #101827;
    background: #ffffff;
    border: 1px solid #dbe6ef;
    border-radius: 24px;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .24);
}

.upload-progress-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #3468f6, #16b8a5);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(52, 104, 246, .22);
}

.upload-progress-card h2 {
    margin: 0;
    color: #101827;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.1;
}

.upload-progress-status {
    margin: 10px 0 18px;
    color: #667085;
    font-size: 15px;
    line-height: 1.45;
}

.upload-progress-percent {
    display: block;
    margin-bottom: 10px;
    color: #101827;
    font-size: 38px;
    line-height: 1;
}

.upload-progress-track {
    height: 12px;
    overflow: hidden;
    background: #e7eef8;
    border-radius: 999px;
}

.upload-progress-track span {
    width: 0%;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #16b8a5, #3468f6);
    border-radius: inherit;
    transition: width .16s ease;
}

.upload-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
}

.upload-progress-close {
    width: 100%;
    margin-top: 20px;
}

.upload-progress-modal[data-state="success"] .upload-progress-icon {
    background: linear-gradient(135deg, #16b8a5, #0f9f8f);
}

.upload-progress-modal[data-state="error"] .upload-progress-icon {
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.upload-progress-modal[data-state="uploading"] .upload-progress-icon i {
    animation: uploadModalPulse .8s ease-in-out infinite alternate;
}

@keyframes uploadModalPulse {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

@media (max-width: 620px) {
    .upload-progress-modal {
        padding: 20px;
    }

    .upload-progress-card {
        padding: 22px;
        border-radius: 22px;
    }

    .upload-progress-meta {
        display: grid;
        gap: 4px;
    }
}
