/* ---------- Dropzone ---------- */
.uth-p2j-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 34px 22px;
	text-align: center;
	background: var(--uth-background);
	border: 2px dashed #cbd5e1;
	border-radius: var(--uth-radius-large);
	cursor: pointer;
	transition: border-color 160ms ease, background-color 160ms ease;
}

.uth-p2j-dropzone:hover,
.uth-p2j-dropzone:focus-within,
.uth-p2j-dropzone.is-dragover {
	border-color: var(--uth-primary);
	background: var(--uth-section-background);
}

.uth-p2j-dropzone.is-disabled {
	pointer-events: none;
	opacity: 0.7;
}

.uth-p2j-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.uth-p2j-dropzone__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	color: var(--uth-primary);
	background: var(--uth-section-background);
	border-radius: 50%;
}

.uth-p2j-dropzone__svg {
	width: 28px;
	height: 28px;
}

.uth-p2j-dropzone__title {
	margin: 0;
	color: var(--uth-heading);
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.4;
}

.uth-p2j-dropzone__title strong {
	color: var(--uth-primary);
	font-weight: 700;
}

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

.uth-p2j-dropzone__privacy {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 0;
	color: var(--uth-muted);
	font-size: 0.82rem;
	line-height: 1.5;
}

.uth-p2j-privacy__lock {
	flex: none;
	width: 15px;
	height: 15px;
	color: var(--uth-success);
}

/* ---------- File bar ---------- */
.uth-p2j-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.uth-p2j-file[hidden] {
	display: none;
}

.uth-p2j-file__info {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.uth-p2j-file__name {
	overflow: hidden;
	color: var(--uth-heading);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.uth-p2j-file__meta {
	color: var(--uth-muted);
	font-size: 0.78rem;
	line-height: 1.4;
}

.uth-p2j-file__remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	padding: 8px 12px;
	color: var(--uth-muted);
	background: transparent;
	border: 1px solid var(--uth-border);
	border-radius: 10px;
	font: inherit;
	font-size: 0.83rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

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

/* ---------- Settings ---------- */
.uth-p2j-settings {
	display: grid;
	gap: 16px;
	padding: 20px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.uth-p2j-settings[hidden] {
	display: none;
}

.uth-p2j-section-label {
	margin: 0;
	color: var(--uth-heading);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.4;
}

.uth-p2j-options {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.uth-p2j-option {
	display: grid;
	gap: 6px;
}

.uth-p2j-option--wide {
	grid-column: 1 / -1;
}

.uth-p2j-option--wide[hidden] {
	display: none;
}

.uth-p2j-option__label {
	color: var(--uth-muted);
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.4;
}

.uth-p2j-option__control {
	min-height: 42px;
}

.uth-p2j-quality {
	display: grid;
	gap: 8px;
	max-width: 420px;
}

.uth-p2j-quality[hidden] {
	display: none;
}

.uth-p2j-quality__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--uth-heading);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.4;
}

.uth-p2j-quality__value {
	padding: 2px 9px;
	color: var(--uth-primary-hover);
	background: var(--uth-section-background);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
}

.uth-p2j-quality__range {
	width: 100%;
	accent-color: var(--uth-primary);
	cursor: pointer;
}

.uth-p2j-settings__note {
	margin: 0;
	color: var(--uth-muted);
	font-size: 0.84rem;
	line-height: 1.5;
}

.uth-p2j-actions {
	display: flex;
	justify-content: center;
}

.uth-p2j-actions .uth-button {
	min-width: 220px;
}

.uth-p2j-note {
	margin: 0;
	padding: 12px 14px;
	color: #92400e;
	background: rgba(245, 158, 11, 0.1);
	border: 1px solid rgba(245, 158, 11, 0.28);
	border-radius: 12px;
	font-size: 0.88rem;
	line-height: 1.55;
}

.uth-p2j-note[hidden] {
	display: none;
}

/* ---------- Progress ---------- */
.uth-p2j-progress {
	display: grid;
	gap: 10px;
	padding: 22px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.uth-p2j-progress[hidden] {
	display: none;
}

.uth-p2j-progress__bar {
	height: 10px;
	background: var(--uth-section-background);
	border: 1px solid var(--uth-border);
	border-radius: 999px;
	overflow: hidden;
}

.uth-p2j-progress__fill {
	display: block;
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, var(--uth-primary), #0f766e);
	border-radius: 999px;
	transition: width 220ms ease;
}

.uth-p2j-progress__text {
	margin: 0;
	color: var(--uth-muted);
	font-size: 0.9rem;
	line-height: 1.5;
	text-align: center;
}

/* ---------- Result ---------- */
.uth-p2j-result {
	display: grid;
	gap: 16px;
	padding: 24px;
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.uth-p2j-result[hidden] {
	display: none;
}

.uth-p2j-result__heading {
	margin: 0;
	color: var(--uth-heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.uth-p2j-result__summary {
	margin: 0 auto;
	max-width: 620px;
	color: var(--uth-text);
	font-size: 0.98rem;
	line-height: 1.65;
	text-align: center;
}

.uth-p2j-result .uth-result-card {
	min-width: 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
	.uth-p2j-options {
		grid-template-columns: 1fr;
	}

	.uth-p2j-file {
		flex-wrap: wrap;
	}

	.uth-p2j-settings {
		padding: 16px;
	}

	.uth-p2j-actions .uth-button {
		width: 100%;
		min-width: 0;
	}
}
