.uth-image-resizer .uth-tool-header {
	max-width: none;
	margin: 0 0 18px;
	text-align: left;
}

.uth-image-resizer .uth-tool-title {
	font-size: clamp(1.65rem, 2.6vw, 2.45rem);
	line-height: 1.16;
}

.uth-image-resizer .uth-tool-description {
	max-width: 720px;
	margin: 8px 0 0;
	font-size: 0.96rem;
	line-height: 1.55;
}

.uth-image-resizer .uth-tool-panel {
	display: grid;
	gap: 18px;
}

/* ---------- Dropzone ---------- */
.uth-img-dropzone {
	position: relative;
	display: grid;
	place-items: center;
	gap: 8px;
	min-height: 240px;
	padding: 34px 22px;
	text-align: center;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(15, 118, 110, 0.05));
	border: 2px dashed rgba(37, 99, 235, 0.38);
	border-radius: 20px;
	cursor: pointer;
	transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.uth-img-dropzone:hover,
.uth-img-dropzone:focus-within,
.uth-img-dropzone.is-dragover {
	border-color: var(--uth-primary);
	background: rgba(239, 246, 255, 0.85);
}

.uth-img-dropzone.is-disabled {
	opacity: 0.55;
	pointer-events: none;
}

.uth-img-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.uth-img-dropzone__icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
}

.uth-img-dropzone__svg {
	width: 48px;
	height: 48px;
	color: var(--uth-primary);
}

.uth-img-dropzone__title {
	margin: 4px 0 0;
	color: var(--uth-heading);
	font-size: 1.05rem;
	font-weight: 750;
	line-height: 1.4;
}

.uth-img-dropzone__title strong {
	color: var(--uth-primary);
}

.uth-img-dropzone__hint {
	margin: 0;
	color: var(--uth-muted);
	font-size: 0.85rem;
	line-height: 1.5;
}

.uth-img-dropzone__privacy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
	padding: 6px 12px;
	color: #065f46;
	background: rgba(16, 185, 129, 0.12);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 650;
	line-height: 1.3;
}

.uth-img-privacy__lock {
	width: 0.8rem;
	height: 0.8rem;
	flex-shrink: 0;
	color: #065f46;
}

/* ---------- Settings ---------- */
.uth-img-settings {
	display: grid;
	gap: 18px;
	padding: 20px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 18px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.uth-img-settings__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px;
}

.uth-img-control {
	display: grid;
	gap: 7px;
	min-width: 0;
}

.uth-img-control__label {
	color: var(--uth-heading);
	font-size: 0.84rem;
	font-weight: 750;
	line-height: 1.3;
}

.uth-img-control .uth-select,
.uth-img-control .uth-input {
	min-height: 44px;
}

/* ---------- Resizer mode panels ---------- */
.uth-img-percent-input {
	display: flex;
	align-items: center;
	gap: 8px;
}

.uth-img-percent-input .uth-select {
	flex: 1 1 auto;
}

.uth-img-percent-suffix {
	color: var(--uth-muted);
	font-weight: 800;
}

.uth-img-px-inputs {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 8px;
}

.uth-img-px-inputs .uth-select {
	width: 100%;
	min-width: 0;
	text-align: center;
}

.uth-img-px-sep {
	color: var(--uth-muted);
	font-weight: 800;
}

.uth-img-check {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--uth-text);
	font-size: 0.84rem;
	font-weight: 650;
	line-height: 1.4;
	cursor: pointer;
}

.uth-img-check input {
	width: 17px;
	height: 17px;
	accent-color: var(--uth-primary);
}

.uth-img-preset-note {
	margin: 0;
	color: var(--uth-muted);
	font-size: 0.78rem;
	line-height: 1.45;
}

.uth-img-quality-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.uth-img-quality-value {
	min-width: 52px;
	padding: 3px 10px;
	color: var(--uth-primary);
	background: rgba(37, 99, 235, 0.1);
	border: 1px solid rgba(37, 99, 235, 0.18);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 800;
	line-height: 1.4;
	text-align: center;
}

.uth-img-range {
	width: 100%;
	min-width: 0;
	height: 6px;
	margin: 2px 0;
	background: linear-gradient(90deg, var(--uth-primary), #0f766e);
	border-radius: 999px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.uth-img-range::-webkit-slider-thumb {
	width: 18px;
	height: 18px;
	background: #ffffff;
	border: 3px solid var(--uth-primary);
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
	appearance: none;
	-webkit-appearance: none;
}

.uth-img-range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: #ffffff;
	border: 3px solid var(--uth-primary);
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.uth-img-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.uth-img-preset {
	padding: 6px 14px;
	color: var(--uth-heading);
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 999px;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.uth-img-preset:hover,
.uth-img-preset:focus-visible {
	border-color: rgba(37, 99, 235, 0.4);
	outline: none;
}

.uth-img-preset.is-active {
	color: #ffffff;
	background: linear-gradient(135deg, var(--uth-primary), #0f766e);
	border-color: transparent;
}

.uth-img-settings__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.uth-img-settings__actions .uth-button {
	flex: 1 1 auto;
}

/* ---------- Summary bar ---------- */
.uth-img-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	color: var(--uth-text);
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 14px;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.4;
}

.uth-img-summary-sep {
	color: var(--uth-muted);
}

.uth-img-summary-saved {
	color: #065f46;
	background: rgba(16, 185, 129, 0.12);
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.82rem;
}

.uth-img-status {
	min-height: 20px;
	color: var(--uth-muted);
	font-size: 0.85rem;
	line-height: 1.5;
}

.uth-img-status.is-error {
	color: var(--uth-danger);
}

/* ---------- Results ---------- */
.uth-img-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.uth-img-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	min-width: 0;
	padding: 12px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 16px;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.uth-img-card__preview {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	height: 160px;
	overflow: hidden;
	background:
		linear-gradient(45deg, rgba(148, 163, 184, 0.14) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.14) 75%),
		linear-gradient(45deg, rgba(148, 163, 184, 0.14) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.14) 75%);
	background-position: 0 0, 12px 12px;
	background-size: 24px 24px;
	border: 1px solid var(--uth-border);
	border-radius: 12px;
}

.uth-img-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	image-rendering: auto;
}

.uth-img-card__badge {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 3px 9px;
	color: #ffffff;
	background: rgba(15, 23, 42, 0.72);
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.4;
}

.uth-img-card__badge.is-error {
	background: var(--uth-danger);
}

.uth-img-card__body {
	display: grid;
	gap: 7px;
	min-width: 0;
}

.uth-img-card__name {
	margin: 0;
	overflow: hidden;
	color: var(--uth-heading);
	font-size: 0.86rem;
	font-weight: 750;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.uth-img-card__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--uth-muted);
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
}

.uth-img-card__stats.is-error {
	color: var(--uth-danger);
}

.uth-img-card__dims {
	color: var(--uth-heading);
	font-size: 0.82rem;
	font-weight: 750;
	line-height: 1.4;
}

.uth-img-card__dims.is-error {
	color: var(--uth-danger);
}

.uth-img-card__compare {
	display: flex;
	align-items: center;
	gap: 7px;
	color: var(--uth-text);
	font-size: 0.8rem;
	font-weight: 650;
	line-height: 1.3;
	cursor: pointer;
}

.uth-img-card__compare input {
	accent-color: var(--uth-primary);
}

.uth-img-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.uth-img-download {
	flex: 1 1 auto;
	min-height: 38px;
	padding: 8px 12px;
	color: #ffffff;
	background: linear-gradient(135deg, var(--uth-primary), #0f766e);
	border: 0;
	border-radius: 10px;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 750;
	cursor: pointer;
	transition: transform 160ms ease, background-color 160ms ease;
}

.uth-img-download:hover:not(:disabled),
.uth-img-download:focus-visible {
	background: linear-gradient(135deg, var(--uth-primary-hover), #0f766e);
	transform: translateY(-1px);
	outline: none;
}

.uth-img-download:disabled {
	color: var(--uth-muted);
	background: #f1f5f9;
	border: 1px solid var(--uth-border);
	cursor: not-allowed;
}

.uth-img-remove {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	color: var(--uth-muted);
	background: transparent;
	border: 1px solid var(--uth-border);
	border-radius: 10px;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.uth-img-remove:hover,
.uth-img-remove:focus-visible {
	color: var(--uth-danger);
	border-color: rgba(185, 28, 28, 0.35);
	background: rgba(185, 28, 28, 0.06);
	outline: none;
}

.uth-img-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 30px 16px;
	color: var(--uth-muted);
	text-align: center;
	white-space: nowrap;
	font-size: 0.9rem;
	line-height: 1.6;
}

@media (max-width: 640px) {
	.uth-img-settings__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.uth-img-dropzone {
		min-height: 200px;
		padding: 26px 16px;
	}

	.uth-img-results {
		grid-template-columns: minmax(0, 1fr);
	}
}
