/* ss-sticker-storage upload progress UI */

/* Host context: где монтируется overlay (фронт: .qo-upload, админка: .qo-uploaded-admin или .ssr-artwork-col) */
.qo-upload,
.ss-uploading {
	position: relative;
}

.ss-upload-progress {
	display: none;
}

/* Активируем overlay либо через legacy-класс на .qo-upload (фронт), либо через наш .ss-uploading (универсальный) */
.qo-upload--loading .ss-upload-progress,
.ss-uploading > .ss-upload-progress,
.ss-uploading .ss-upload-progress {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	box-sizing: border-box;
	position: absolute;
	inset: 0;
	padding: 16px 20px;
	background: #FFFFFF;
	border-radius: 12px;
	z-index: 9999;
	min-height: 80px;
}

/* В админке у .qo-uploaded-admin / .ssr-artwork-col свои padding'и — не оставляем артефакты от родителей */
.ss-uploading > .ss-upload-progress {
	margin: 0;
}

/* Прячем legacy whitewash-overlay (quick_order.css:559) и legacy-кнопки */
.qo-upload.qo-upload--simple.qo-upload--loading::before {
	display: none !important;
}
.qo-upload--loading .qo-upload-cancel,
.qo-upload--loading .qo-upload-remove,
.ss-uploading .qo-upload-cancel,
.ss-uploading .qo-upload-remove {
	display: none !important;
}

.ss-upload-progress__bar {
	height: 6px;
	background: #E5E7EB;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 10px;
}
.ss-upload-progress__fill {
	height: 100%;
	width: 0%;
	background: #3478F6;
	border-radius: 999px;
	transition: width 0.2s ease-out;
}
.ss-upload-progress__stage {
	font-size: 13px;
	line-height: 18px;
	color: #4B5563;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.ss-upload-progress__stage-percent {
	color: #3478F6;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
}
.ss-upload-progress__cancel {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 24px;
	height: 24px;
	border: none;
	background: transparent;
	color: #9CA3AF;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.15s, color 0.15s;
}
.ss-upload-progress__cancel:hover {
	background: #F3F4F6;
	color: #4B5563;
}

/* Indeterminate */
.ss-upload-progress--indeterminate .ss-upload-progress__fill {
	width: 95% !important;
	background: linear-gradient(90deg, #3478F6 0%, #6EA5FF 50%, #3478F6 100%);
	background-size: 200% 100%;
	animation: ss-upload-shimmer 1.4s linear infinite;
}
@keyframes ss-upload-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Error */
.ss-upload-progress--error .ss-upload-progress__fill {
	background: #DC2626;
}
.ss-upload-progress--error .ss-upload-progress__stage,
.ss-upload-progress--error .ss-upload-progress__stage-percent {
	color: #DC2626;
}
