/* File Upload Styles - Structure Only */

/* All colors, borders, padding inherit from form's Customize settings */

.modern-file-upload-wrapper {
	position: relative;
	width: 100%;
}

.modern-file-upload-area {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;

	/* Border, padding, background will come from form's Customize settings */
}

.modern-file-upload-area:hover {
	/* Hover styles will use form's focus/hover colors from Customize */
	transform: translateY(-2px);
}

.modern-file-upload-area.drag-over {
	transform: scale(1.02);
}

.file-upload-icon {
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;

	/* Icon color will inherit from form's primaryColor */
}

.modern-file-upload-area:hover .file-upload-icon {
	transform: scale(1.1);
}

.file-upload-text {
	text-align: center;
}

.file-upload-title {
	margin-bottom: 4px;
	transition: color 0.3s ease;

	/* Font size, weight, and color inherit from form's label styles */
}

.file-upload-subtitle {
	transition: color 0.3s ease;
	opacity: 0.7;

	/* Font size and color inherit from form styles */
}

.selected-files-display {
	margin-top: 16px;
}

/* File preview header with count and clear button */
.selected-files-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
	font-weight: 500;
	font-size: 14px;
}

.clear-all-btn {
	background: #ef4444;
	color: white;
	border: none;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.clear-all-btn:hover {
	background: #dc2626;
}

/* Individual file items */
.selected-file-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #f3f4f6;
	transition: background-color 0.2s ease;
}

.selected-file-item:last-child {
	border-bottom: none;
}

.selected-file-item:hover {
	background-color: #f9fafb;
}

.file-info-container {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 12px;
}

/* File icon or image preview */
.file-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 18px;
	font-weight: bold;
}

.file-image-preview {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
}

/* File details */
.file-details {
	flex: 1;
	min-width: 0;
}

.file-name {
	font-weight: 500;
	font-size: 14px;
	color: #374151;
	margin-bottom: 4px;
	word-break: break-word;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file-meta {
	display: flex;
	gap: 8px;
	align-items: center;
}

.file-size-badge,
.file-type-badge {
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 3px;
	font-weight: 500;
	text-transform: uppercase;
}

.file-size-badge {
	background: #f3f4f6;
	color: #6b7280;
}

.file-type-badge {
	background: #dbeafe;
	color: #1e40af;
}

/* Remove file button */
.remove-file-btn {
	background: #f87171;
	color: white;
	border: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
	margin-left: 8px;
}

.remove-file-btn:hover {
	background: #ef4444;
}

/* File type specific colors for icons */
.file-icon.pdf { background: #fef2f2; color: #dc2626; }
.file-icon.doc { background: #eff6ff; color: #2563eb; }
.file-icon.xls { background: #f0fdf4; color: #16a34a; }
.file-icon.zip { background: #fef3c7; color: #d97706; }
.file-icon.image { background: #fdf4ff; color: #c026d3; }
.file-icon.video { background: #f0f9ff; color: #0284c7; }
.file-icon.audio { background: #fdf2f8; color: #e11d48; }
.file-icon.text { background: #f8fafc; color: #64748b; }

.file-field-info {
	margin-top: 8px;
	font-size: 0.875em;
	opacity: 0.8;

	/* Padding, background, and border styles will be applied dynamically */
}
