/**
 * Product page upload field.
 *
 * Deliberately restrained: this sits inside somebody else's theme, so it
 * borrows currentColor and system spacing rather than imposing a palette.
 */

.wcsiu-field {
	margin: 0 0 1.5em;
	max-width: 32em;
}

.wcsiu-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.wcsiu-label .required {
	border: 0;
	color: #b32d2e;
	text-decoration: none;
}

.wcsiu-description {
	margin: 0 0 0.75em;
	font-size: 0.875em;
	opacity: 0.75;
}

.wcsiu-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 1.75em 1em;
	border: 1px dashed currentColor;
	border-radius: 8px;
	text-align: center;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

.wcsiu-dropzone:hover,
.wcsiu-dropzone:focus-visible,
.wcsiu-dropzone--over {
	opacity: 1;
	background-color: rgba( 127, 127, 127, 0.07 );
	outline: none;
}

.wcsiu-dropzone--over {
	border-style: solid;
}

.wcsiu-dropzone__icon {
	opacity: 0.6;
}

.wcsiu-dropzone__text {
	font-size: 0.9375em;
}

.wcsiu-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.wcsiu-field--busy .wcsiu-dropzone {
	pointer-events: none;
	opacity: 0.5;
}

.wcsiu-status {
	min-height: 1.4em;
	margin-top: 0.5em;
	font-size: 0.875em;
	line-height: 1.4;
}

.wcsiu-status--error {
	color: #b32d2e;
}

.wcsiu-status--ok {
	color: #1a7f37;
}

.wcsiu-status--busy {
	opacity: 0.75;
}

.wcsiu-preview {
	display: flex;
	align-items: center;
	gap: 0.85em;
	margin-top: 0.75em;
	padding: 0.65em;
	border: 1px solid rgba( 127, 127, 127, 0.3 );
	border-radius: 8px;
}

.wcsiu-preview--pending {
	opacity: 0.55;
}

.wcsiu-preview__image {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 6px;
	background: rgba( 127, 127, 127, 0.12 );
	flex: 0 0 auto;
}

.wcsiu-preview__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	min-width: 0;
	flex: 1 1 auto;
	font-size: 0.875em;
}

.wcsiu-preview__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcsiu-preview__size {
	opacity: 0.7;
}

.wcsiu-remove {
	flex: 0 0 auto;
	background: none;
	border: 1px solid rgba( 127, 127, 127, 0.4 );
	border-radius: 6px;
	padding: 0.35em 0.8em;
	font-size: 0.8125em;
	cursor: pointer;
	color: inherit;
}

.wcsiu-remove:hover {
	border-color: currentColor;
}

.wcsiu-disabled {
	opacity: 0.55;
	cursor: progress;
}

/* Cart, checkout and order thumbnails. */
.wcsiu-thumb {
	margin-top: 0.35em;
}

.wcsiu-order-image {
	margin-top: 0.5em;
}

@media ( prefers-reduced-motion: reduce ) {
	.wcsiu-dropzone {
		transition: none;
	}
}
