/* ============ Reorder PDF Pages ============ */

.uth-reo-dropzone {
	border: 2px dashed var(--uth-border, #d1d5db);
	border-radius: 12px;
	padding: 44px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.uth-reo-dropzone:hover,
.uth-reo-dropzone.is-dragover {
	border-color: var(--uth-primary, #2563eb);
	background: rgba(37, 99, 235, 0.04);
}

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

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

.uth-reo-dropzone__icon {
	display: flex;
	justify-content: center;
	margin-bottom: 14px;
}

.uth-reo-dropzone__svg {
	width: 46px;
	height: 46px;
	color: var(--uth-primary, #2563eb);
}

.uth-reo-dropzone__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	color: var(--uth-heading, #111827);
}

.uth-reo-dropzone__title strong {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.uth-reo-dropzone__hint {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--uth-muted, #6b7280);
}

.uth-reo-dropzone__privacy {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-size: 13px;
	color: var(--uth-muted, #6b7280);
}

.uth-reo-privacy__lock {
	width: 14px;
	height: 14px;
	flex: none;
}

/* ---------- File bar ---------- */

.uth-reo-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 13px 16px;
	margin-top: 18px;
	border: 1px solid var(--uth-border, #e5e7eb);
	border-radius: 10px;
	background: var(--uth-surface, #f9fafb);
}

.uth-reo-file__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.uth-reo-file__name {
	font-weight: 600;
	font-size: 14px;
	color: var(--uth-heading, #111827);
	word-break: break-all;
}

.uth-reo-file__meta {
	font-size: 13px;
	color: var(--uth-muted, #6b7280);
}

.uth-reo-file__remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--uth-border, #d1d5db);
	background: var(--uth-surface, #fff);
	color: var(--uth-muted, #4b5563);
	border-radius: 8px;
	padding: 7px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.uth-reo-file__remove:hover {
	border-color: var(--uth-danger, #dc2626);
	color: var(--uth-danger, #dc2626);
}

/* ---------- Editor ---------- */

.uth-reo-editor {
	margin-top: 18px;
}

.uth-reo-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 16px;
	border: 1px solid var(--uth-border, #e5e7eb);
	border-radius: 10px;
	background: var(--uth-surface, #f9fafb);
}

.uth-reo-action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--uth-border, #d1d5db);
	background: var(--uth-surface, #fff);
	color: var(--uth-muted, #4b5563);
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.uth-reo-action:hover {
	border-color: var(--uth-primary, #2563eb);
	color: var(--uth-primary, #2563eb);
}

.uth-reo-toolbar__hint {
	margin: 0;
	font-size: 13px;
	color: var(--uth-muted, #6b7280);
}

/* ---------- Thumbnails ---------- */

.uth-reo-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin-top: 18px;
}

.uth-reo-thumb {
	border: 1px solid var(--uth-border, #e5e7eb);
	border-radius: 10px;
	padding: 10px;
	background: var(--uth-surface, #fff);
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: grab;
	font-family: inherit;
	text-align: left;
	transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.uth-reo-thumb:hover {
	border-color: var(--uth-primary, #2563eb);
}

.uth-reo-thumb.is-dragging {
	opacity: 0.45;
}

.uth-reo-thumb.is-drop-target {
	border-color: var(--uth-primary, #2563eb);
	border-style: dashed;
	background: rgba(37, 99, 235, 0.05);
}

.uth-reo-thumb__stage {
	position: relative;
	border-radius: 6px;
	background:
		linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
		linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
		linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
	background-size: 12px 12px;
	background-position: 0 0, 0 6px, 6px -6px, -6px 0;
	background-color: #f3f4f6;
	overflow: hidden;
	aspect-ratio: 1 / 1.4142;
	display: flex;
	align-items: center;
	justify-content: center;
}

.uth-reo-thumb__canvas {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.uth-reo-thumb__pos {
	position: absolute;
	top: 6px;
	left: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--uth-primary, #2563eb);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.uth-reo-thumb__num {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--uth-muted, #6b7280);
}

.uth-reo-thumb__controls {
	display: flex;
	justify-content: center;
	gap: 8px;
}

.uth-reo-thumb__move {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--uth-border, #d1d5db);
	border-radius: 8px;
	background: var(--uth-surface, #fff);
	color: var(--uth-muted, #4b5563);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.uth-reo-thumb__move:hover:not(:disabled) {
	border-color: var(--uth-primary, #2563eb);
	color: var(--uth-primary, #2563eb);
}

.uth-reo-thumb__move:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ---------- Actions / notes / progress / result ---------- */

.uth-reo-actions {
	margin-top: 20px;
	text-align: center;
}

.uth-reo-note {
	margin: 12px 0 0;
	text-align: center;
	font-size: 14px;
	color: var(--uth-danger, #dc2626);
}

.uth-reo-progress {
	margin-top: 20px;
}

.uth-reo-progress__bar {
	height: 8px;
	border-radius: 999px;
	background: var(--uth-border, #e5e7eb);
	overflow: hidden;
}

.uth-reo-progress__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: var(--uth-primary, #2563eb);
	transition: width 0.2s ease;
}

.uth-reo-progress__text {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--uth-muted, #6b7280);
	text-align: center;
}

.uth-reo-result {
	margin-top: 18px;
}

.uth-reo-result__heading {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
	color: var(--uth-heading, #111827);
}

.uth-reo-result__summary {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--uth-muted, #6b7280);
}