/* Form upload drag & drop component
 * Vlastné CSS pre app/Common/Model/FormUpload/.
 * Linknuté samostatne v layoutoch (NIE súčasť finalcss.css).
 */

.form-upload {
	display: block;
	width: 100%;
	margin: 10px 0 14px;
	font-family: inherit;
	color: #2b2b2b;
}

.form-upload__dropzone {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-height: 82px;
	padding: 14px 16px;
	border: 1px dashed #c9c9c9;
	border-radius: 0;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease;
	margin: 0;
	box-sizing: border-box;
}

.form-upload__dropzone:hover,
.form-upload__dropzone:focus-within {
	border-color: #ff1782;
	background: #fff7fb;
	outline: none;
}

.form-upload.is-dragover .form-upload__dropzone {
	border-color: #ff1782;
	background: #fff0f7;
}

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

.form-upload__dropzone-inner {
	pointer-events: none;
	text-align: left;
}

.form-upload__icon {
	float: left;
	width: 38px;
	height: 38px;
	margin: 3px 12px 0 0;
	border: 1px solid #ff1782;
	color: #ff1782;
	font-size: 28px;
	line-height: 36px;
	text-align: center;
	font-weight: normal;
}

.form-upload__title {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #3d3b3c;
}

.form-upload__hint {
	font-size: 12px;
	color: #777;
	line-height: 18px;
}

.form-upload__formats {
	margin-top: 4px;
	font-size: 11px;
	line-height: 16px;
	color: #555;
	font-weight: bold;
}

.form-upload__list {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
}

.form-upload__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 0;
	background: #fff;
	margin-bottom: 6px;
	font-size: 12px;
}

.form-upload__item--invalid {
	border-color: #f0b1c2;
	background: #fff5f8;
}

.form-upload__thumb {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 0;
	background: #f2f2f2 center/cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #4b5563;
	text-transform: uppercase;
	overflow: hidden;
}

.form-upload__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.form-upload__meta {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.form-upload__name {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.form-upload__size {
	font-size: 12px;
	color: #6b7280;
}

.form-upload__remove {
	flex: 0 0 auto;
	background: none;
	border: 1px solid transparent;
	color: #b91c1c;
	font-size: 18px;
	line-height: 1;
	width: 28px;
	height: 28px;
	border-radius: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.form-upload__remove:hover {
	background: #fee2e2;
	border-color: #fecaca;
}

.form-upload__client-error,
.form-upload__server-error {
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: 0;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 13px;
	border: 1px solid #fecaca;
}

.form-upload__server-error div + div {
	margin-top: 4px;
}
