.wp-custom-file-input.file-input-wrapper {
	--cfi-background-color: #f6f7f7;
	--cfi-background-hover-color: #ffffff;
	--cfi-file-background-color: #ffffff;
	--cfi-border-color: #c3c4c7;
	--cfi-border-hover-color: #2271b1;
	--cfi-text-color: #2c3338;
	--cfi-icon-color: #2271b1;
	--cfi-remove-icon-color: #d63638;
	--cfi-border-width: 1px;
	--cfi-border-style: dashed;
	--cfi-border-radius: 10px;
	--cfi-input-height: 150px;
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	margin: 8px 0;
	padding: 0;
	border: 0;
	color: var(--cfi-text-color);
	font: inherit;
}

.wp-custom-file-input.file-input-wrapper,
.wp-custom-file-input.file-input-wrapper * {
	box-sizing: border-box;
}

.wp-custom-file-input.file-input-wrapper .input-area {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: var(--cfi-input-height);
	margin: 0;
	padding: 24px 20px;
	overflow: hidden;
	border-width: var(--cfi-border-width);
	border-style: var(--cfi-border-style);
	border-color: var(--cfi-border-color);
	border-radius: var(--cfi-border-radius);
	background: var(--cfi-background-color);
	color: var(--cfi-text-color);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
	transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.wp-custom-file-input.file-input-wrapper .input-area:hover,
.wp-custom-file-input.file-input-wrapper.drag-over .input-area {
	border-color: var(--cfi-border-hover-color);
	background: var(--cfi-background-hover-color);
	box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.42);
}

.wp-custom-file-input.file-input-wrapper:focus-within .input-area {
	border-color: var(--cfi-border-hover-color);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--cfi-border-hover-color) 25%, transparent);
}

.wp-custom-file-input.file-input-wrapper .upload-icon {
	display: block;
	width: 30px;
	height: 30px;
	flex: 0 0 30px;
	background-color: var(--cfi-icon-color);
	-webkit-mask: url("../img/upload-icon.svg") center / contain no-repeat;
	mask: url("../img/upload-icon.svg") center / contain no-repeat;
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease;
}

.wp-custom-file-input.file-input-wrapper .input-area:hover .upload-icon,
.wp-custom-file-input.file-input-wrapper.drag-over .upload-icon,
.wp-custom-file-input.file-input-wrapper:focus-within .upload-icon {
	transform: translateY(-2px);
}

.wp-custom-file-input.file-input-wrapper .upload-label,
.wp-custom-file-input.file-input-wrapper .drag-message {
	position: relative;
	z-index: 1;
	max-width: 100%;
	margin: 0;
	color: var(--cfi-text-color);
	pointer-events: none;
}

.wp-custom-file-input.file-input-wrapper .upload-label {
	font-weight: 500;
}

.wp-custom-file-input.file-input-wrapper .drag-message {
	font-size: 0.8rem;
	opacity: 0.68;
}

.wp-custom-file-input.file-input-wrapper input[type="file"] {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
}

.wp-custom-file-input.file-input-wrapper input[type="file"]:disabled {
	cursor: not-allowed;
}

.wp-custom-file-input.file-input-wrapper:has(input[type="file"]:disabled) {
	opacity: 0.6;
}

.wp-custom-file-input.file-input-wrapper .file-preview {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: 0;
	gap: 8px;
}

.wp-custom-file-input.file-input-wrapper .file-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 10px 12px;
	border-width: var(--cfi-border-width);
	border-style: solid;
	border-color: var(--cfi-border-color);
	border-radius: var(--cfi-border-radius);
	background: var(--cfi-file-background-color);
	color: var(--cfi-text-color);
	font-family: inherit;
	font-size: 0.85rem;
	line-height: 1.4;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.wp-custom-file-input.file-input-wrapper .file-item:first-child {
	margin-top: 8px;
}

.wp-custom-file-input.file-input-wrapper .file-item:hover {
	border-color: var(--cfi-border-hover-color);
	box-shadow: 0 8px 18px -18px rgba(0, 0, 0, 0.5);
}

.wp-custom-file-input.file-input-wrapper .file-description {
	display: flex;
	align-items: baseline;
	min-width: 0;
	gap: 5px;
}

.wp-custom-file-input.file-input-wrapper .file-name {
	overflow: hidden;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wp-custom-file-input.file-input-wrapper .file-size {
	flex: 0 0 auto;
	opacity: 0.68;
}

.wp-custom-file-input.file-input-wrapper .remove-file {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	min-width: 30px;
	min-height: 30px;
	margin: 0;
	padding: 7px !important;
	border: 0 !important;
	border-radius: 50%;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--cfi-remove-icon-color) !important;
	cursor: pointer;
	opacity: 0.72;
	transition: background-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.wp-custom-file-input.file-input-wrapper .remove-file::before {
	content: "";
	display: block;
	width: 14px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: url("../img/remove.svg") center / contain no-repeat;
	mask: url("../img/remove.svg") center / contain no-repeat;
}

.wp-custom-file-input.file-input-wrapper .remove-file:hover,
.wp-custom-file-input.file-input-wrapper .remove-file:focus-visible {
	background: color-mix(in srgb, var(--cfi-remove-icon-color) 12%, transparent) !important;
	opacity: 1;
	transform: scale(1.04);
}

.wp-custom-file-input.file-input-wrapper .remove-file:focus-visible {
	outline: 2px solid var(--cfi-remove-icon-color);
	outline-offset: 2px;
}

.wp-custom-file-input.file-input-wrapper .cfi-validation-message {
	width: 100%;
	margin-top: 8px;
	padding: 9px 12px;
	border-left: 3px solid var(--cfi-remove-icon-color);
	border-radius: 3px;
	background: color-mix(in srgb, var(--cfi-remove-icon-color) 8%, var(--cfi-file-background-color));
	color: var(--cfi-text-color);
	font-family: inherit;
	font-size: 0.82rem;
	line-height: 1.45;
}

.wp-custom-file-input.file-input-wrapper .cfi-validation-message[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.wp-custom-file-input.file-input-wrapper .input-area,
	.wp-custom-file-input.file-input-wrapper .upload-icon,
	.wp-custom-file-input.file-input-wrapper .file-item,
	.wp-custom-file-input.file-input-wrapper .remove-file {
		transition: none;
	}
}
