
.tls-pdfc,
.tls-pdfc * {
	box-sizing: border-box;
}

.tls-pdfc {
	--pdfc-primary: #4f46e5;
	--pdfc-primary-dark: #4338ca;
	--pdfc-primary-soft: #eef2ff;
	--pdfc-border: #e4e7ec;
	--pdfc-text: #344054;
	--pdfc-muted: #667085;
	--pdfc-success: #067647;
	--pdfc-warning: #b54708;
	--pdfc-danger: #b42318;
}

.tls-pdfc-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 350px;
	gap: 17px;
	align-items: start;
}

.tls-pdfc-card {
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--pdfc-border);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 9px 28px rgba(16, 24, 40, .045);
}

.tls-pdfc-side {
	position: sticky;
	top: 92px;
	padding: 17px;
}

.tls-pdfc-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 17px;
	border-bottom: 1px solid var(--pdfc-border);
	background: linear-gradient(180deg, #fff, #fafbff);
}

.tls-pdfc-card-head span,
.tls-pdfc-card-head strong {
	display: block;
}

.tls-pdfc-card-head span {
	color: var(--pdfc-primary);
	font-size: 9px;
	font-weight: 750;
	letter-spacing: .075em;
	text-transform: uppercase;
}

.tls-pdfc-card-head strong {
	margin-top: 4px;
	color: #101828;
	font-size: 15px;
	font-weight: 720;
}

.tls-pdfc-body {
	padding: 17px;
}

.tls-pdfc-dropzone {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 305px;
	padding: 26px;
	border: 1.5px dashed #a4bcfd;
	border-radius: 15px;
	background:
		linear-gradient(180deg, rgba(238, 242, 255, .8), rgba(248, 250, 252, .92));
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s, transform .15s;
}

.tls-pdfc-dropzone:hover,
.tls-pdfc-dropzone.is-dragging {
	border-color: var(--pdfc-primary);
	background: #eef2ff;
}

.tls-pdfc-dropzone.is-dragging {
	transform: scale(.995);
}

.tls-pdfc-dropzone input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.tls-pdfc-drop-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin-bottom: 14px;
	border: 1px solid #c7d2fe;
	border-radius: 17px;
	background: #fff;
	color: var(--pdfc-primary);
}

.tls-pdfc-drop-icon svg,
.tls-pdfc-button svg,
.tls-pdfc-icon-button svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tls-pdfc-drop-icon svg {
	width: 30px;
	height: 30px;
}

.tls-pdfc-dropzone strong,
.tls-pdfc-dropzone span {
	display: block;
}

.tls-pdfc-dropzone strong {
	color: #101828;
	font-size: 15px;
	font-weight: 720;
}

.tls-pdfc-dropzone span {
	max-width: 470px;
	margin: 7px auto 0;
	color: var(--pdfc-muted);
	font-size: 10.5px;
	line-height: 1.6;
}

.tls-pdfc-file {
	display: none;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 13px;
	align-items: center;
	padding: 14px;
	border: 1px solid var(--pdfc-border);
	border-radius: 12px;
	background: #fff;
}

.tls-pdfc-file.is-visible {
	display: grid;
}

.tls-pdfc-file-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 88px;
	overflow: hidden;
	border: 1px solid #eaecf0;
	border-radius: 8px;
	background: #f8fafc;
}

.tls-pdfc-file-thumb canvas {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
}

.tls-pdfc-file-copy {
	min-width: 0;
}

.tls-pdfc-file-copy strong {
	display: block;
	overflow: hidden;
	color: #101828;
	font-size: 11.5px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tls-pdfc-file-copy span {
	display: block;
	margin-top: 5px;
	color: var(--pdfc-muted);
	font-size: 9.5px;
	line-height: 1.45;
}

.tls-pdfc-button,
.tls-pdfc-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 38px;
	padding: 0 12px !important;
	border: 1px solid #d0d5dd !important;
	border-radius: 9px !important;
	background: #fff !important;
	color: #344054 !important;
	font-family: inherit;
	font-size: 10px !important;
	font-weight: 680 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer;
}

.tls-pdfc-icon-button {
	width: 38px;
	padding: 0 !important;
}

.tls-pdfc-button:hover,
.tls-pdfc-icon-button:hover {
	border-color: #a4bcfd !important;
	background: var(--pdfc-primary-soft) !important;
	color: var(--pdfc-primary-dark) !important;
}

.tls-pdfc-button.is-primary {
	border-color: var(--pdfc-primary) !important;
	background: var(--pdfc-primary) !important;
	color: #fff !important;
}

.tls-pdfc-button.is-primary:hover {
	border-color: var(--pdfc-primary-dark) !important;
	background: var(--pdfc-primary-dark) !important;
	color: #fff !important;
}

.tls-pdfc-button.is-danger {
	border-color: #fecdca !important;
	color: var(--pdfc-danger) !important;
}

.tls-pdfc-button:disabled,
.tls-pdfc-icon-button:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.tls-pdfc-analysis {
	display: none;
	margin-top: 14px;
}

.tls-pdfc-analysis.is-visible {
	display: block;
}

.tls-pdfc-analysis-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.tls-pdfc-stat {
	padding: 11px;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
	background: #f8fafc;
}

.tls-pdfc-stat span,
.tls-pdfc-stat strong {
	display: block;
}

.tls-pdfc-stat span {
	color: var(--pdfc-muted);
	font-size: 8.5px;
	font-weight: 650;
}

.tls-pdfc-stat strong {
	margin-top: 4px;
	color: #101828;
	font-size: 12px;
	font-weight: 720;
}

.tls-pdfc-recommendation {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-top: 10px;
	padding: 11px;
	border-left: 3px solid var(--pdfc-primary);
	border-radius: 0 9px 9px 0;
	background: #f8fafc;
	color: #475467;
	font-size: 9.5px;
	line-height: 1.55;
}

.tls-pdfc-recommendation strong {
	color: #344054;
}

.tls-pdfc-weight-list {
	display: grid;
	gap: 7px;
	margin-top: 12px;
}

.tls-pdfc-weight-row {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr) 72px;
	gap: 8px;
	align-items: center;
	color: #475467;
	font-size: 8.7px;
	font-weight: 620;
}

.tls-pdfc-weight-track {
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: #eaecf0;
}

.tls-pdfc-weight-track span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--pdfc-primary);
}

.tls-pdfc-weight-row em {
	color: var(--pdfc-muted);
	font-size: 8px;
	font-style: normal;
	text-align: right;
}

.tls-pdfc-side-title span,
.tls-pdfc-side-title strong {
	display: block;
}

.tls-pdfc-side-title span {
	color: var(--pdfc-primary);
	font-size: 9px;
	font-weight: 750;
	letter-spacing: .075em;
	text-transform: uppercase;
}

.tls-pdfc-side-title strong {
	margin-top: 4px;
	color: #101828;
	font-size: 16px;
	font-weight: 720;
}

.tls-pdfc-section {
	padding: 14px 0;
	border-top: 1px solid #eaecf0;
}

.tls-pdfc-section:first-of-type {
	margin-top: 11px;
	padding-top: 0;
	border-top: 0;
}

.tls-pdfc-field {
	display: grid;
	gap: 6px;
	margin-top: 9px;
}

.tls-pdfc-field > span {
	color: #475467;
	font-size: 9px;
	font-weight: 680;
}

.tls-pdfc-field select,
.tls-pdfc-field input[type="number"] {
	width: 100%;
	height: 39px;
	padding: 0 10px !important;
	border: 1px solid #d0d5dd !important;
	border-radius: 8px !important;
	outline: 0 !important;
	background: #fff !important;
	color: #101828 !important;
	font-family: inherit;
	font-size: 10.5px !important;
	box-shadow: none !important;
}

.tls-pdfc-field select:focus,
.tls-pdfc-field input[type="number"]:focus {
	border-color: #a4bcfd !important;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, .09) !important;
}

.tls-pdfc-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
}

.tls-pdfc-toggle {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-top: 10px;
	cursor: pointer;
}

.tls-pdfc-toggle input {
	width: 16px;
	height: 16px;
	margin: 1px 0 0;
	accent-color: var(--pdfc-primary);
}

.tls-pdfc-toggle span {
	color: #475467;
	font-size: 9.5px;
	line-height: 1.45;
}

.tls-pdfc-note {
	margin-top: 10px;
	padding: 10px;
	border-radius: 9px;
	background: #f8fafc;
	color: #475467;
	font-size: 9.2px;
	line-height: 1.55;
}

.tls-pdfc-note.is-warning {
	border: 1px solid #fedf89;
	background: #fffaeb;
	color: #93370d;
}

.tls-pdfc-actions {
	display: grid;
	grid-template-columns: 1fr 1.45fr;
	gap: 7px;
	margin-top: 12px;
}

.tls-pdfc-actions .tls-pdfc-button {
	width: 100%;
}

.tls-pdfc-progress {
	display: none;
	margin-top: 11px;
	padding: 10px;
	border: 1px solid #c7d2fe;
	border-radius: 9px;
	background: #eef2ff;
}

.tls-pdfc-progress.is-active {
	display: block;
}

.tls-pdfc-progress-head {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 7px;
	color: #344054;
	font-size: 9px;
	font-weight: 650;
}

.tls-pdfc-progress-track {
	height: 7px;
	overflow: hidden;
	border-radius: 999px;
	background: #dbeafe;
}

.tls-pdfc-progress-track span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: var(--pdfc-primary);
	transition: width .16s ease;
}

.tls-pdfc-result {
	display: none;
	margin-top: 17px;
}

.tls-pdfc-result.is-visible {
	display: block;
}

.tls-pdfc-result-summary {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
}

.tls-pdfc-result-stat {
	padding: 12px;
	border: 1px solid #abefc6;
	border-radius: 10px;
	background: #ecfdf3;
}

.tls-pdfc-result-stat span,
.tls-pdfc-result-stat strong {
	display: block;
}

.tls-pdfc-result-stat span {
	color: #027a48;
	font-size: 8.5px;
	font-weight: 650;
}

.tls-pdfc-result-stat strong {
	margin-top: 4px;
	color: #05603a;
	font-size: 12px;
	font-weight: 720;
}

.tls-pdfc-result-message {
	margin-top: 9px;
	padding: 10px 11px;
	border: 1px solid #d0d5dd;
	border-radius: 9px;
	background: #fff;
	color: #475467;
	font-size: 9.5px;
	line-height: 1.55;
}

.tls-pdfc-result-message.is-warning {
	border-color: #fedf89;
	background: #fffaeb;
	color: #93370d;
}

.tls-pdfc-output-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 10px;
}

.tls-pdfc-output-actions a {
	min-width: 130px;
}

.tls-pdfc-compare {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 11px;
	margin-top: 13px;
}

.tls-pdfc-preview {
	min-width: 0;
	padding: 10px;
	border: 1px solid var(--pdfc-border);
	border-radius: 10px;
	background: #f8fafc;
}

.tls-pdfc-preview-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 9px;
	margin-bottom: 8px;
	color: #475467;
	font-size: 8.8px;
	font-weight: 650;
}

.tls-pdfc-preview-canvas {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 250px;
	overflow: auto;
	border: 1px solid #eaecf0;
	border-radius: 7px;
	background: #fff;
}

.tls-pdfc-preview-canvas canvas {
	max-width: 100%;
	height: auto;
	background: #fff;
}

.tls-pdfc-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	padding: 28px;
	border: 1px solid var(--pdfc-border);
	border-radius: 16px;
	background: #fff;
	color: #475467;
	font-size: 12px;
	font-weight: 650;
}

@media (max-width: 980px) {
	.tls-pdfc-grid {
		grid-template-columns: 1fr;
	}

	.tls-pdfc-side {
		position: static;
	}
}

@media (max-width: 700px) {
	.tls-pdfc-body,
	.tls-pdfc-side {
		padding: 14px;
	}

	.tls-pdfc-analysis-grid,
	.tls-pdfc-result-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tls-pdfc-form-grid {
		grid-template-columns: 1fr;
	}

	.tls-pdfc-compare {
		grid-template-columns: 1fr;
	}

	.tls-pdfc-dropzone {
		min-height: 255px;
	}

	.tls-pdfc-file {
		grid-template-columns: 58px minmax(0, 1fr) auto;
	}

	.tls-pdfc-file-thumb {
		width: 58px;
		height: 72px;
	}

	.tls-pdfc-weight-row {
		grid-template-columns: 42px minmax(0, 1fr) 62px;
	}

	.tls-pdfc-output-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.tls-pdfc-output-actions a {
		min-width: 0;
	}
}
