.weluca-image-tools__wrap {
	position: relative;
	left: 50%;
	box-sizing: border-box;
	width: min(1120px, calc(100vw - 64px));
	max-width: none;
	margin: 18px auto;
	padding: 22px;
	transform: translateX(-50%);
	border: 1px solid #d8dee8;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 8px 22px rgba(23, 32, 51, 0.06);
	color: #172033;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
}

.weluca-image-tools__wrap *,
.weluca-image-tools__wrap *::before,
.weluca-image-tools__wrap *::after {
	box-sizing: border-box;
}

.weluca-image-tools__page-drop-overlay {
	position: fixed;
	z-index: 999999;
	inset: 18px;
	display: none;
	place-items: center;
	border: 3px dashed #ef2f2c;
	border-radius: 18px;
	background: rgba(255, 245, 245, 0.92);
	box-shadow: 0 12px 38px rgba(23, 32, 51, 0.18);
	color: #172033;
	font-size: clamp(22px, 4vw, 40px);
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	pointer-events: none;
}

.weluca-image-tools__page-drop-overlay.is-active {
	display: grid;
}

.weluca-image-tools-is-dragging,
.weluca-image-tools-is-dragging body {
	overflow: hidden;
}

.weluca-image-tools__header {
	margin-bottom: 16px;
}

.weluca-image-tools__title {
	margin: 0 0 16px;
	padding: 0;
	color: #172033;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	text-align: center;
}

.weluca-image-tools__lead,
.weluca-image-tools__privacy {
	margin: 0;
	max-width: none;
	color: #3f4654;
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
}

.weluca-image-tools__privacy {
	margin-top: 8px;
	color: #64748b;
	font-size: 0.9em;
	font-weight: 400;
}

.weluca-image-tools__dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 154px;
	align-items: center;
	justify-content: center;
	padding: 18px 18px 12px;
	border: 2px dashed transparent;
	border-radius: 8px;
	background: #f7f8fd;
	text-align: center;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.weluca-image-tools__dropzone.is-dragover {
	border-color: #ef2f2c;
	background: #fff5f5;
	box-shadow: none;
}

.weluca-image-tools__file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	clip-path: inset(50%);
}

.weluca-image-tools__drop-label {
	display: flex;
	width: min(100%, 620px);
	min-height: 64px;
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 auto;
	padding: 14px 24px;
	overflow: hidden;
	border-radius: 18px;
	background: #ef2f2c;
	box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
	text-align: center;
	transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.weluca-image-tools__drop-label:hover {
	background: #e62b28;
	box-shadow: 0 10px 22px rgba(17, 24, 39, 0.22);
	transform: translateY(-1px);
}

.weluca-image-tools__drop-main {
	color: #ffffff;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
}

.weluca-image-tools__drop-sub {
	color: #ffffff;
	font-size: clamp(13px, 1.8vw, 16px);
	font-weight: 700;
	line-height: 1.35;
	opacity: 0.92;
}

.weluca-image-tools__drop-hint {
	margin: 10px 0 0;
	color: #3f4654;
	font-size: clamp(16px, 2vw, 21px);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
}

.weluca-image-tools__controls {
	display: grid;
	grid-template-columns: repeat(4, minmax(140px, 1fr));
	gap: 12px;
	align-items: end;
	margin: 12px 0 0;
	padding: 14px;
	border: 1px solid #e0e6ee;
	border-radius: 8px;
	background: #ffffff;
}

.weluca-image-tools__field {
	display: grid;
	gap: 8px;
	margin: 0;
	color: #334155;
	font-size: 0.92em;
	font-weight: 700;
	line-height: 1.4;
}

.weluca-image-tools__field input,
.weluca-image-tools__field select {
	width: 100%;
	min-height: 44px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #172033;
	font: inherit;
	font-weight: 400;
	padding: 8px 12px;
	box-shadow: none;
}

.weluca-image-tools__field input[type="range"] {
	min-height: 0;
	padding: 0;
	accent-color: #ef2f2c;
}

.weluca-image-tools__field--quality {
	grid-template-columns: auto minmax(120px, 1fr) 48px;
	align-items: center;
}

.weluca-image-tools__field--quality span {
	grid-column: 1 / -1;
}

.weluca-image-tools__field--quality strong {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.weluca-image-tools__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
}

.weluca-image-tools__button {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	border: 1px solid #cbd8e5;
	border-radius: 6px;
	background: #ffffff;
	color: #172033;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	padding: 0 16px;
	text-decoration: none;
	box-shadow: none;
	transition: filter 0.18s ease, opacity 0.18s ease;
}

.weluca-image-tools__button:hover:not(:disabled),
.weluca-image-tools__button:focus-visible:not(:disabled) {
	filter: brightness(0.96);
}

.weluca-image-tools__button--primary {
	border-color: #172033;
	background: #172033;
	color: #ffffff;
}

.weluca-image-tools__button--danger {
	border-color: #fee2e2;
	background: #fee2e2;
	color: #991b1b;
	box-shadow: none;
}

.weluca-image-tools__button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	box-shadow: none;
}

.weluca-image-tools__status {
	min-height: 24px;
	margin: 10px 0 0;
	color: #334155;
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1.55;
}

.weluca-image-tools__messages {
	display: grid;
	gap: 8px;
	margin: 10px 0 0;
}

.weluca-image-tools__message {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 0.92em;
	line-height: 1.6;
}

.weluca-image-tools__message--error {
	border: 1px solid #fecaca;
	background: #fff5f5;
	color: #b91c1c;
}

.weluca-image-tools__message--success {
	border: 1px solid #bbf7d0;
	background: #ecfdf5;
	color: #166534;
}

.weluca-image-tools__message--info {
	border: 1px solid #dbe4ef;
	background: #f8fafc;
	color: #334155;
}

.weluca-image-tools__empty {
	margin-top: 12px;
	padding: 16px;
	border: 1px solid #e0e6ee;
	border-radius: 8px;
	background: #ffffff;
	color: #64748b;
	font-size: 0.92em;
	text-align: center;
}

.weluca-image-tools__list {
	display: grid;
	gap: 12px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.weluca-image-tools__item {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 12px;
	border: 1px solid #e0e6ee;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: none;
}

.weluca-image-tools__preview {
	display: grid;
	width: 112px;
	aspect-ratio: 1 / 1;
	place-items: center;
	overflow: hidden;
	border: 1px solid #e0e6ee;
	border-radius: 8px;
	background:
		linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
		linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
		linear-gradient(-45deg, transparent 75%, #f1f5f9 75%),
		#ffffff;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
	background-size: 16px 16px;
	color: #64748b;
	font-size: 12px;
	text-align: center;
}

.weluca-image-tools__preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.weluca-image-tools__filename {
	margin: 0 0 8px;
	overflow-wrap: anywhere;
	color: #172033;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.weluca-image-tools__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin: 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.6;
}

.weluca-image-tools__item-actions {
	display: flex;
	min-width: 142px;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
}

.weluca-image-tools__item-status {
	color: #64748b;
	font-size: 13px;
	line-height: 1.5;
	text-align: right;
}

@media (max-width: 960px) {
	.weluca-image-tools__controls {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.weluca-image-tools__wrap {
		left: auto;
		width: 100%;
		padding: 18px;
		transform: none;
	}

	.weluca-image-tools__controls,
	.weluca-image-tools__actions {
		align-items: stretch;
		grid-template-columns: 1fr;
	}

	.weluca-image-tools__button {
		width: 100%;
	}

	.weluca-image-tools__item {
		grid-template-columns: 88px minmax(0, 1fr);
		align-items: start;
	}

	.weluca-image-tools__preview {
		width: 88px;
	}

	.weluca-image-tools__item-actions {
		grid-column: 1 / -1;
		min-width: 0;
	}

	.weluca-image-tools__item-status {
		text-align: left;
	}
}
