/**
 * Zebra CFF File Upload Wrapper
 * Styles for the drag-and-drop zone and file list (Calculated Form Fields).
 */

.zebra-cff-file-wrap {
	margin-top: 0.5em;
}

/* Hide native file input visually but keep in DOM for form submit */
.zebra-cff-file-input-hidden {
	position: absolute !important;
	width: 0.1px !important;
	height: 0.1px !important;
	opacity: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	pointer-events: none !important;
}

.dfield {
	position: relative;
}

/* Drop zone */
.zebra-cff-file-drop {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100px;
	padding: 1rem 1.5rem;
	border: 2px dashed #c4c4c4;
	border-radius: 8px;
	background: #fafafa;
	color: #555;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}

.zebra-cff-file-drop:hover,
.zebra-cff-file-drop:focus {
	outline: none;
	border-color: #4c9699;
	background: #f0f7f7;
}

.zebra-cff-file-drop.is-dragover {
	border-color: #4c9699;
	background: #e8f4f4;
}

.zebra-cff-file-drop-text {
	font-size: 0.95rem;
}

/* File list */
.zebra-cff-file-list {
	list-style: none;
	margin: 0.75em 0 0;
	padding: 0;
}

.zebra-cff-file-item {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35em;
	padding: 0.4em 0.6em;
	margin-bottom: 0.35em;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	font-size: 0.9rem;
}

.zebra-cff-file-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zebra-cff-file-size {
	color: #888;
	font-size: 0.85em;
}

.zebra-cff-file-remove {
	padding: 0.2em 0.5em;
	font-size: 0.85em;
	color: #b72121;
	background: transparent;
	border: 1px solid #e0a0a0;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.zebra-cff-file-remove:hover {
	background: #fde8e8;
	color: #8b0000;
}

/* Errors */
.zebra-cff-file-errors {
	font-size: 0.9rem;
	color: #b72121;
	margin-top: 0.5em;
	opacity: 0;
	transition: opacity 0.2s;
}

.zebra-cff-file-errors.is-visible {
	opacity: 1;
}
