/* Scoping everything to our wrapper to avoid bleeding into the theme */
.zevvo-file-upload-wrapper {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	max-width: 100%;
	margin: 20px 0;
	box-sizing: border-box;
}

.zevvo-file-upload-wrapper * {
	box-sizing: border-box;
}

.zevvo-file-upload-wrapper .upload-zone {
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
	padding: 32px 24px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
	background: #f8fafc;
}

.zevvo-file-upload-wrapper .upload-zone:hover {
	border-color: #3b82f6;
	background: #eff6ff;
}

.zevvo-file-upload-wrapper .upload-zone.drag-over {
	border-color: #3b82f6;
	background: #dbeafe;
	border-style: solid;
}

.zevvo-file-upload-wrapper .upload-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	background: #3b82f6;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	color: white;
	/* Ensure icon is visible */
}

.zevvo-file-upload-wrapper .upload-text {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 6px;
}

.zevvo-file-upload-wrapper .upload-hint {
	font-size: 13px;
	color: #64748b;
}

.zevvo-file-upload-wrapper .file-input {
	display: none;
}

/* Error message */
.zevvo-file-upload-wrapper .error-message {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	margin-top: 16px;
	display: none;
}

.zevvo-file-upload-wrapper .error-message.show {
	display: block;
}

/* Files counter */
.zevvo-file-upload-wrapper .files-counter {
	font-size: 13px;
	color: #64748b;
	margin-top: 16px;
	text-align: center;
	font-weight: 500;
}

.zevvo-file-upload-wrapper .files-counter.limit-reached {
	color: #dc2626;
}

/* Uploaded files */
.zevvo-file-upload-wrapper .uploaded-files {
	margin-top: 20px;
}

.zevvo-file-upload-wrapper .file-item {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: all 0.15s;
}

.zevvo-file-upload-wrapper .file-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border-color: #cbd5e1;
}

.zevvo-file-upload-wrapper .file-icon {
	width: 40px;
	height: 40px;
	background: #e0e7ff;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	color: #4f46e5;
	flex-shrink: 0;
	text-transform: uppercase;
}

.zevvo-file-upload-wrapper .file-icon.image {
	background: #d1fae5;
	color: #059669;
}

.zevvo-file-upload-wrapper .file-icon.pdf {
	background: #fee2e2;
	color: #dc2626;
}

.zevvo-file-upload-wrapper .file-icon.zip {
	background: #fef3c7;
	color: #d97706;
}

.zevvo-file-upload-wrapper .file-info {
	flex: 1;
	min-width: 0;
	text-align: left;
}

.zevvo-file-upload-wrapper .file-name {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 2px;
}

.zevvo-file-upload-wrapper .file-size {
	font-size: 12px;
	color: #64748b;
}

.zevvo-file-upload-wrapper .file-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.zevvo-file-upload-wrapper .file-action-btn {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	background: white;
	border: 1px solid #e2e8f0;
	padding: 0;
}

.zevvo-file-upload-wrapper .preview-btn {
	color: #3b82f6;
}

.zevvo-file-upload-wrapper .preview-btn:hover {
	background: #eff6ff;
	border-color: #3b82f6;
}

.zevvo-file-upload-wrapper .file-remove {
	color: #64748b;
}

.zevvo-file-upload-wrapper .file-remove:hover {
	background: #fef2f2;
	border-color: #fecaca;
	color: #dc2626;
}

.zevvo-file-upload-wrapper .icon-eye,
.zevvo-file-upload-wrapper .icon-trash {
	width: 16px;
	height: 16px;
	display: block;
}

/* Preview Modal System - Scoped but fixed positioning */
.zevvo-preview-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: 'Inter', sans-serif;
}

.zevvo-preview-overlay.show {
	display: flex;
}

.zevvo-preview-modal {
	background: white;
	border-radius: 12px;
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.zevvo-preview-header {
	padding: 16px 24px;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	gap: 12px;
	background: white;
	border-radius: 12px 12px 0 0;
}

.zevvo-preview-file-icon {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	flex-shrink: 0;
	text-transform: uppercase;
}

.zevvo-preview-file-info {
	flex: 1;
	min-width: 0;
}

.zevvo-preview-file-name {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 3px;
}

.zevvo-preview-file-meta {
	font-size: 13px;
	color: #64748b;
}

.zevvo-preview-close {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #f1f5f9;
	color: #64748b;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	transition: all 0.15s;
	flex-shrink: 0;
}

.zevvo-preview-close:hover {
	background: #fee2e2;
	color: #dc2626;
}

.zevvo-preview-body {
	padding: 24px;
	overflow-y: auto;
	flex: 1;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0 0 12px 12px;
}

.zevvo-preview-content {
	width: 100%;
	text-align: center;
}

.zevvo-preview-image-wrapper {
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: 600px;
	position: relative;
	margin: 0 auto;
}

.zevvo-preview-image {
	width: 100%;
	height: auto;
	object-fit: contain;
	max-height: 600px;
	transition: transform 0.2s;
}

.zevvo-preview-controls {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	background: rgba(0, 0, 0, 0.7);
	padding: 8px;
	border-radius: 8px;
}

.zevvo-preview-control-btn {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: white;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.15s;
}

.zevvo-preview-control-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}

.zevvo-zoom-indicator {
	position: absolute;
	top: 16px;
	right: 16px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
}

.zevvo-preview-pdf-wrapper {
	border-radius: 8px;
	overflow: hidden;
	background: white;
	height: 600px;
}

.zevvo-preview-pdf {
	width: 100%;
	height: 100%;
	border: none;
}

.zevvo-preview-placeholder {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 8px;
	border: 2px dashed #cbd5e1;
}

.zevvo-preview-placeholder-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.4;
}

.zevvo-preview-placeholder-text {
	font-size: 15px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
}

/* Thumbnail Previews in Cart/Order Tables */
.zevvo-file-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 5px;
	max-width: 50px;
	/* User requested constraint */
}

.zevvo-file-wrapper a p {
	margin: 0 !important;
}

.variation-File .zevvo-uploads-list,
.wc-item-meta .zevvo-uploads-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.zevvo-thumbnail-link {
	display: block;
	flex-shrink: 0;
	text-decoration: none !important;
	border: none !important;
	/* Ensure image fits if it's main part */
	width: 100%;
}

.zevvo-thumbnail {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	display: block;
}

.zevvo-file-icon-preview {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	border: 1px solid #e2e8f0;
	color: #64748b;
	font-weight: bold;
	text-transform: uppercase;
	overflow: hidden;
}

.zevvo-file-link-text {
	font-size: 13px;
	line-height: 1.4;
	display: none;
	/* Hide text as requested per width constraint */
}

/* Status Labels */
.zevvo-file-upload-wrapper .file-status {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	margin-top: 2px;
}

.zevvo-file-upload-wrapper .file-item.uploading .file-status {
	color: #3b82f6;
}

.zevvo-file-upload-wrapper .file-item.uploaded .file-status {
	color: #059669;
	display: none;
	/* Optional: hide status once uploaded if self-evident */
}

.zevvo-file-upload-wrapper .file-item.error .file-status {
	color: #dc2626;
}

/* Uploading State for Item */
.zevvo-file-upload-wrapper .file-item.uploading {
	border-color: #3b82f6;
	background: #eff6ff;
	position: relative;
	overflow: hidden;
}

/* Simple Progress Bar Animation */
.zevvo-file-upload-wrapper .file-progress-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	background: #3b82f6;
	width: 0%;
	transition: width 0.2s;
	display: none;
}

.zevvo-file-upload-wrapper .file-item.uploading .file-progress-bar {
	display: block;
	animation: zevvo-progress-indeterminate 1.5s infinite linear;
	width: 100%;
	/* Fallback if not using real progress */
	background: linear-gradient(to right, #eff6ff, #3b82f6, #eff6ff);
	background-size: 200% 100%;
}

@keyframes zevvo-progress-indeterminate {
	0% {
		background-position: 100% 0;
	}

	100% {
		background-position: -100% 0;
	}
}

/* Global Uploading State Overlay/Style */
.zevvo-file-upload-wrapper.zevvo-uploading-state {
	opacity: 0.8;
	pointer-events: none;
	/* Prevent interaction while submitting */
}