.pdfextreme-tool {
	box-sizing: border-box;
	width: 100%;
}

.pdfextreme-tool [hidden] {
	display: none !important;
}

.pdfextreme-tool *,
.pdfextreme-tool *::before,
.pdfextreme-tool *::after {
	box-sizing: inherit;
}

.pdfextreme-dropzone {
	align-items: center;
	background: #f7fafb;
	border: 2px dashed #8b95a5;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	justify-content: center;
	min-height: 180px;
	padding: 24px;
	text-align: center;
}

.pdfextreme-dropzone.is-dragging {
	background: #e9f7f6;
	border-color: #0e8a88;
	outline: 2px solid #0e8a88;
	outline-offset: 3px;
}

.pdfextreme-file-input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.pdfextreme-dropzone-text,
.pdfextreme-status {
	margin: 0;
}

.pdfextreme-watermark-workspace {
	display: grid;
	gap: 18px;
	margin-top: 18px;
}

.pdfextreme-selected-file {
	align-items: center;
	background: #f7fafb;
	border: 1px solid #d5dce4;
	border-radius: 6px;
	display: flex;
	gap: 8px 16px;
	justify-content: space-between;
	padding: 12px 14px;
}

.pdfextreme-selected-file-details {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.pdfextreme-selected-file strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pdfextreme-selected-file-details span {
	color: #5f6b7a;
	font-size: 0.9em;
}

.pdfextreme-remove-file {
	background: transparent;
	border: 0;
	color: #b42318;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: 6px;
	white-space: nowrap;
}

.pdfextreme-remove-file:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.pdfextreme-watermark-layout {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
}

.pdfextreme-watermark-controls {
	display: grid;
	gap: 16px;
}

.pdfextreme-watermark-type-options,
.pdfextreme-watermark-common-options {
	display: grid;
	gap: 16px;
}

.pdfextreme-field {
	display: grid;
	font-weight: 700;
	gap: 7px;
}

.pdfextreme-field input[type="text"],
.pdfextreme-field select {
	background: #ffffff;
	border: 1px solid #8b95a5;
	border-radius: 4px;
	color: #16213a;
	font: inherit;
	min-height: 42px;
	padding: 9px 11px;
	width: 100%;
}

.pdfextreme-field input:focus,
.pdfextreme-field select:focus {
	border-color: #0e8a88;
	box-shadow: 0 0 0 3px rgba(14, 138, 136, 0.16);
	outline: 0;
}

.pdfextreme-control-group {
	border: 0;
	margin: 0;
	padding: 0;
}

.pdfextreme-control-group legend {
	font-weight: 700;
	margin-bottom: 8px;
}

.pdfextreme-segmented-control {
	display: grid;
	grid-auto-columns: 1fr;
	grid-auto-flow: column;
}

.pdfextreme-segmented-control label {
	cursor: pointer;
	position: relative;
}

.pdfextreme-segmented-control input {
	opacity: 0;
	position: absolute;
}

.pdfextreme-segmented-control span {
	align-items: center;
	background: #ffffff;
	border: 1px solid #8b95a5;
	display: flex;
	justify-content: center;
	min-height: 40px;
	padding: 8px;
}

.pdfextreme-segmented-control label + label span {
	border-left: 0;
}

.pdfextreme-segmented-control label:first-child span {
	border-radius: 5px 0 0 5px;
}

.pdfextreme-segmented-control label:last-child span {
	border-radius: 0 5px 5px 0;
}

.pdfextreme-segmented-control input:checked + span {
	background: #0e8a88;
	border-color: #0e8a88;
	color: #ffffff;
}

.pdfextreme-range-field {
	margin-top: 10px;
}

.pdfextreme-slider-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdfextreme-field input[type="range"] {
	accent-color: #0e8a88;
	width: 100%;
}

.pdfextreme-color-field input {
	background: #ffffff;
	border: 1px solid #8b95a5;
	border-radius: 4px;
	height: 42px;
	padding: 4px;
	width: 100%;
}

.pdfextreme-selected-image {
	align-items: center;
	background: #f7fafb;
	border: 1px solid #d5dce4;
	border-radius: 6px;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 10px 12px;
}

.pdfextreme-selected-image strong {
	display: block;
	max-width: 240px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pdfextreme-watermark-preview {
	display: grid;
	gap: 9px;
	min-width: 0;
}

.pdfextreme-preview-stage {
	align-items: center;
	background: #e8edf0;
	border: 1px solid #d5dce4;
	border-radius: 6px;
	display: flex;
	justify-content: center;
	min-height: 320px;
	overflow: hidden;
	padding: 14px;
	position: relative;
}

.pdfextreme-preview-page {
	background: #ffffff;
	box-shadow: 0 3px 14px rgba(16, 24, 40, 0.16);
	max-height: 620px;
	position: relative;
	width: 100%;
}

.pdfextreme-preview-page canvas {
	display: block;
	height: auto;
	width: 100%;
}

.pdfextreme-preview-page [data-pdfextreme-preview-overlay] {
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.pdfextreme-progress {
	display: grid;
	gap: 8px;
	margin-top: 16px;
}

.pdfextreme-progress-label {
	display: flex;
	font-size: 0.92em;
	gap: 12px;
	justify-content: space-between;
}

.pdfextreme-progress-track {
	background: #dce4e8;
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}

.pdfextreme-progress-fill {
	background: #0e8a88;
	display: block;
	height: 100%;
	transition: width 180ms ease;
	width: 0;
}

.pdfextreme-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.pdfextreme-button {
	align-items: center;
	background: #ffffff;
	border: 1px solid currentColor;
	color: #16213a;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	justify-content: center;
	line-height: 1.2;
	min-height: 42px;
	padding: 10px 16px;
	text-decoration: none;
}

.pdfextreme-button:focus-visible,
.pdfextreme-remove-file:focus-visible {
	outline: 3px solid rgba(14, 138, 136, 0.32);
	outline-offset: 2px;
}

.pdfextreme-button-primary {
	background: #f45d48;
	border-color: #f45d48;
	color: #ffffff;
}

.pdfextreme-button-secondary {
	background: #16213a;
	border-color: #16213a;
	color: #ffffff;
}

.pdfextreme-button-download {
	background: #0e8a88;
	border-color: #0e8a88;
	color: #ffffff;
}

.pdfextreme-button-ghost {
	background: transparent;
}

.pdfextreme-button[disabled] {
	cursor: not-allowed;
	opacity: 0.55;
}

.pdfextreme-status {
	margin-top: 12px;
	min-height: 1.5em;
}

.pdfextreme-status[data-state="error"] {
	color: #b42318;
}

.pdfextreme-status[data-state="success"] {
	color: #067647;
}

.pdfextreme-status[data-state="warning"] {
	color: #8a4b08;
}

.pdfextreme-status[data-state="loading"] {
	color: #344054;
}

@media (max-width: 760px) {
	.pdfextreme-watermark-layout {
		grid-template-columns: 1fr;
	}

	.pdfextreme-preview-stage {
		min-height: 260px;
	}
}

@media (max-width: 640px) {
	.pdfextreme-selected-file {
		align-items: flex-start;
	}

	.pdfextreme-selected-file-details {
		max-width: calc(100% - 100px);
	}

	.pdfextreme-slider-grid {
		grid-template-columns: 1fr;
	}

	.pdfextreme-selected-image {
		align-items: flex-start;
	}

	.pdfextreme-selected-image .pdfextreme-selected-file-details {
		max-width: calc(100% - 108px);
	}

	.pdfextreme-segmented-control {
		grid-auto-flow: row;
		grid-template-columns: 1fr;
	}

	.pdfextreme-segmented-control label + label span {
		border-left: 1px solid #8b95a5;
		border-top: 0;
	}

	.pdfextreme-segmented-control label:first-child span {
		border-radius: 5px 5px 0 0;
	}

	.pdfextreme-segmented-control label:last-child span {
		border-radius: 0 0 5px 5px;
	}

	.pdfextreme-actions,
	.pdfextreme-button {
		width: 100%;
	}
}
