.wtj-converter,
.wtj-converter * {
	box-sizing: border-box;
}

.wtj-converter {
	--wtj-primary: #2563eb;
	--wtj-primary-dark: #1d4ed8;
	--wtj-success: #0f9f6e;
	--wtj-danger: #dc2626;
	--wtj-text: #0f172a;
	--wtj-muted: #64748b;
	--wtj-border: #dbe4f0;
	--wtj-surface: #ffffff;
	--wtj-soft: #f8fafc;
	width: 100%;
	max-width: 980px;
	margin: 24px auto;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--wtj-text);
}

.wtj-card {
	background: var(--wtj-surface);
	border: 1px solid #e5eaf2;
	border-radius: 24px;
	padding: 28px;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.wtj-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.wtj-icon {
	display: grid;
	place-items: center;
	flex: 0 0 58px;
	height: 58px;
	border-radius: 17px;
	background: linear-gradient(145deg, #2563eb, #1e40af);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.7px;
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.wtj-title {
	margin: 0 0 5px;
	font-size: clamp(24px, 4vw, 34px);
	line-height: 1.15;
	letter-spacing: -0.6px;
	color: var(--wtj-text);
}

.wtj-subtitle {
	margin: 0;
	color: var(--wtj-muted);
	font-size: 15px;
	line-height: 1.6;
}

.wtj-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 275px;
	padding: 34px 20px;
	border: 2px dashed #94a3b8;
	border-radius: 20px;
	background:
		radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 44%),
		var(--wtj-soft);
	text-align: center;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
	outline: none;
}

.wtj-dropzone:hover,
.wtj-dropzone:focus-visible,
.wtj-dropzone.is-dragging {
	border-color: var(--wtj-primary);
	background-color: #eff6ff;
	box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.09);
	transform: translateY(-1px);
}

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

.wtj-upload-mark {
	display: grid;
	place-items: center;
	width: 78px;
	height: 78px;
	margin-bottom: 16px;
	border-radius: 22px;
	background: #fff;
	color: var(--wtj-primary);
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
}

.wtj-drop-title {
	margin: 0 0 6px;
	font-size: 21px;
	font-weight: 800;
}

.wtj-drop-text {
	margin: 0 0 16px;
	color: var(--wtj-muted);
	font-size: 14px;
}

.wtj-format-pill {
	display: inline-flex;
	align-items: center;
	padding: 7px 11px;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.8px;
}

.wtj-message {
	display: none;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
}

.wtj-message.is-error {
	display: block;
	border: 1px solid #fecaca;
	background: #fef2f2;
	color: #b91c1c;
}

.wtj-message.is-success {
	display: block;
	border: 1px solid #bbf7d0;
	background: #f0fdf4;
	color: #047857;
}

.wtj-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin: 20px 0 14px;
	padding: 15px 16px;
	border: 1px solid var(--wtj-border);
	border-radius: 16px;
	background: var(--wtj-soft);
}

.wtj-summary {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 100px;
}

.wtj-summary strong {
	font-size: 14px;
}

.wtj-summary span {
	color: var(--wtj-muted);
	font-size: 12px;
}

.wtj-toolbar-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 9px;
}

.wtj-btn {
	appearance: none;
	border: 0;
	border-radius: 11px;
	padding: 11px 15px;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease, background .15s ease;
}

.wtj-btn:hover:not(:disabled) {
	transform: translateY(-1px);
}

.wtj-btn:focus-visible {
	outline: 3px solid rgba(37, 99, 235, .2);
	outline-offset: 2px;
}

.wtj-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.wtj-btn-light {
	border: 1px solid #cbdcf7;
	background: #fff;
	color: #2456a6;
}

.wtj-btn-light:hover:not(:disabled) {
	background: #eef5ff;
	border-color: #93b7ee;
	color: #1d4ed8;
}

.wtj-btn-primary:hover:not(:disabled) {
	background: #3b82f6;
	box-shadow: 0 8px 20px rgba(59, 130, 246, .22);
}

.wtj-btn-success:hover:not(:disabled) {
	background: #10b981;
	box-shadow: 0 8px 20px rgba(16, 185, 129, .20);
}

.wtj-btn-light.wtj-remove:hover:not(:disabled) {
	background: #fff1f2;
	border-color: #fecdd3;
	color: #be123c;
}

.wtj-btn-primary {
	background: var(--wtj-primary);
	color: #fff;
	box-shadow: 0 7px 18px rgba(37, 99, 235, .24);
}


.wtj-btn-success {
	background: var(--wtj-success);
	color: #fff;
	box-shadow: 0 7px 18px rgba(15, 159, 110, .22);
}

.wtj-progress-wrap {
	margin: 14px 0 17px;
	padding: 14px 16px;
	border: 1px solid var(--wtj-border);
	border-radius: 15px;
	background: #fff;
}

.wtj-progress-label {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 9px;
	color: #475569;
	font-size: 13px;
}

.wtj-progress-track {
	overflow: hidden;
	height: 9px;
	border-radius: 999px;
	background: #e2e8f0;
}

.wtj-progress-bar {
	width: 0%;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #2563eb, #06b6d4);
	transition: width .2s ease;
}

.wtj-list {
	display: grid;
	gap: 12px;
}

.wtj-item {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	align-items: center;
	gap: 15px;
	padding: 13px;
	border: 1px solid var(--wtj-border);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

.wtj-thumb {
	width: 84px;
	height: 66px;
	border-radius: 11px;
	object-fit: cover;
	background: #e2e8f0;
	border: 1px solid #e2e8f0;
}

.wtj-item-info {
	min-width: 0;
}

.wtj-file-name {
	overflow: hidden;
	margin: 0 0 5px;
	font-size: 14px;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wtj-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	color: var(--wtj-muted);
	font-size: 12px;
}

.wtj-status {
	display: inline-flex;
	align-items: center;
	margin-top: 7px;
	padding: 4px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-size: 11px;
	font-weight: 800;
}

.wtj-status.is-converted {
	background: #ecfdf5;
	color: #047857;
}

.wtj-status.is-error {
	background: #fef2f2;
	color: #b91c1c;
}

.wtj-item-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 7px;
	min-width: 118px;
}

.wtj-item-actions .wtj-btn {
	width: 100%;
	padding: 9px 10px;
	font-size: 12px;
}

.wtj-remove {
	color: #b91c1c;
}

.wtj-footer-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	color: var(--wtj-muted);
	font-size: 12px;
	text-align: center;
}

@media (max-width: 720px) {
	.wtj-card {
		padding: 18px;
		border-radius: 18px;
	}

	.wtj-header {
		align-items: flex-start;
	}

	.wtj-icon {
		flex-basis: 50px;
		height: 50px;
		border-radius: 14px;
		font-size: 13px;
	}

	.wtj-dropzone {
		min-height: 235px;
	}

	.wtj-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.wtj-toolbar-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.wtj-toolbar-actions .wtj-btn-success {
		grid-column: 1 / -1;
	}

	.wtj-item {
		grid-template-columns: 70px minmax(0, 1fr);
	}

	.wtj-thumb {
		width: 70px;
		height: 60px;
	}

	.wtj-item-actions {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}
}

@media (max-width: 430px) {
	.wtj-header {
		gap: 11px;
	}

	.wtj-title {
		font-size: 23px;
	}

	.wtj-subtitle {
		font-size: 13px;
	}

	.wtj-toolbar-actions {
		grid-template-columns: 1fr;
	}

	.wtj-toolbar-actions .wtj-btn-success {
		grid-column: auto;
	}

	.wtj-item-actions {
		grid-template-columns: 1fr;
	}
}


/* Version 1.1.0: automatic conversion/download */
.wtj-auto-note {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 999px;
	background: #ecfdf5;
	color: #047857;
	font-size: 12px;
	font-weight: 800;
}

.wtj-item-actions {
	min-width: 155px;
}

.wtj-item-actions .wtj-btn-success {
	min-height: 46px;
	padding: 13px 18px;
	font-size: 14px;
	border-radius: 13px;
}

@media (max-width: 720px) {
	.wtj-toolbar {
		flex-direction: row;
		align-items: center;
	}

	.wtj-item-actions .wtj-btn-success {
		min-height: 48px;
		font-size: 14px;
	}
}

@media (max-width: 500px) {
	.wtj-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}
}
