.pdf-simple-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--background);
}

.pdf-simple-preview img {
	display: block;
	max-width: 95%;
	max-height: calc(100% - 48px);
	object-fit: contain;
}

.pdf-simple-preview button {
	padding: 3px 8px;
	font-family: Areal, sans-serif;
}

.pdf-simple-viewer {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #777;
	font-family: Areal, sans-serif;
	font-size: 12px;
}

.pdf-simple-toolbar {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 4px;
	height: 32px;
	padding: 3px;
	background: var(--background1);
	border-bottom: 1px solid var(--color);
	white-space: nowrap;
}

.pdf-simple-toolbar button {
	min-height: 24px;
	padding: 2px 6px;
	font-family: inherit;
	font-size: 11px;
}

.pdf-simple-toolbar button:disabled {
	opacity: .4;
}

.pdf-simple-page-label {
	padding: 0 4px;
	white-space: nowrap;
}

.pdf-selection-input {
	width: 125px;
	min-width: 0;
	padding: 2px 4px;
	border: 1px solid var(--color);
	background: var(--background);
	font: 11px Areal, sans-serif;
}

.pdf-simple-status {
	min-width: 0;
	margin-left: auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pdf-simple-page {
	position: absolute;
	inset: 32px 0 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 8px;
}

.pdf-simple-canvas,
.pdf-simple-annotation-layer,
.pdf-simple-text-layer {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.pdf-simple-annotation-layer {
	width: 0;
	height: 0;
	overflow: hidden;
	z-index: 1;
	pointer-events: none;
}

.pdf-simple-highlight {
	position: absolute;
	background: rgb(255 220 0);
	opacity: 0.1;
	border-radius: 2px;
}

.pdf-simple-canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	background: white;
	box-shadow: 0 1px 5px rgb(0 0 0 / 40%);
	z-index: 0;
}

/* TextLayer renders transparent spans over the canvas. The spans remain
   selectable even though the canvas is what supplies the visible glyphs. */
.pdf-simple-text-layer {
	overflow: hidden;
	line-height: 1;
	text-align: initial;
	letter-spacing: normal;
	word-spacing: normal;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
	transform-origin: 0 0;
	z-index: 2;
	pointer-events: auto;
	user-select: text;
	width: calc(var(--pdf-text-layer-width, 0px));
	height: calc(var(--pdf-text-layer-height, 0px));
	--min-font-size: 1;
	--text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));
}

.pdf-simple-text-layer span,
.pdf-simple-text-layer br {
	position: absolute;
	color: transparent;
	white-space: pre;
	cursor: text;
	transform-origin: 0 0;
}

.pdf-simple-text-layer > :not(.markedContent),
.pdf-simple-text-layer .markedContent span:not(.markedContent) {
	z-index: 1;
	--font-height: 0;
	font-size: calc(var(--text-scale-factor) * var(--font-height));
	--scale-x: 1;
	--rotate: 0deg;
	--min-font-size-inv: 1;
	transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}

.pdf-simple-text-layer .markedContent {
	display: contents;
}

.pdf-simple-text-layer span::selection {
	background: rgb(0 90 255 / 30%);
}
