#pdf-search-div {
	top: 0;
	left: 0;
	position: fixed;
	display: block;
	width: 100%;
	height: calc(100% - var(--bottom-bar-height));
	background: #fff;
	z-index: 9999;
	animation: fadeInFromNone 0.2s ease-out;
}

.pdf-search-screen {
	width: 100%;
	max-width: 800px;
	height: 100%;
	margin: 0 auto;
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #fff;
}

.pdf-source-actions {
	flex: 0 0 auto;
	display: flex;
	gap: 6px;
}

.pdf-action-button,
.pdf-control-button {
	border: 1px solid #5e5e5e40;
	background: rgba(0, 0, 0, 0.068);
	color: inherit;
    font-family: Verdana, sans-serif;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.pdf-action-button:hover,
.pdf-control-button:hover,
.pdf-search-input-wrapper:focus-within {
	border-color: #3253af;
}

.pdf-action-button {
	flex: 1 1 0;
	min-width: 0;
	height: 38px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-size: 10pt;
}

.pdf-search-input-wrapper {
	flex: 0 0 auto;
	width: 100%;
	height: 38px;
	padding: 0 14px;
	border: 1px solid #5e5e5e40;
	border-radius: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(0, 0, 0, 0.035);
	transition: border-color 0.3s ease;
}

.pdf-search-input-icon {
	flex: 0 0 1.3em;
	width: 1.3em;
	min-width: 1.3em;
	max-width: 1.3em;
	height: 1.3em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 12pt;
}

.pdf-search-input-icon.is-searching {
	animation: search-hourglass-turn 0.9s steps(2, end) infinite;
}

@keyframes search-hourglass-turn {
	to {
		transform: rotate(180deg);
	}
}

#pdf-search-input {
	width: 100%;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
    font-family: Verdana, sans-serif;
	font-size: 10pt;
}

#pdf-search-input::placeholder {
	color: #6e6e6e;
	opacity: 1;
}

.document-progress {
	flex: 0 0 auto;
	position: relative;
	width: 100%;
	min-height: 28px;
	overflow: hidden;
	border-radius: 10px;
	background: #dce9f4;
}

.document-progress-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: #b8d8ef;
	transition: width 180ms ease;
}

.document-progress.ocr .document-progress-fill {
	background: rgba(150, 205, 165, 0.9);
}

/* TODO: When embeddings are implemented, use a light purple fill
   (rgba(201, 166, 226, 0.9)) in this same progress bar. Keep its background unchanged. */

.document-progress.indeterminate .document-progress-fill {
	width: 38%;
	animation: document-progress-indeterminate 1.2s ease-in-out infinite;
}

.document-progress-label {
	position: relative;
	z-index: 1;
	min-height: 28px;
	padding: 4px 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	color: #29455f;
	font-size: 8.5pt;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
}

@keyframes document-progress-indeterminate {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(265%);
	}
}

.active-document-name {
	flex: 0 0 auto;
	width: 100%;
	min-height: 18px;
	padding: 0 4px;
	overflow: hidden;
	color: #20242a;
    font-family: Verdana, sans-serif;
	font-size: 10pt;
	font-weight: 600;
	line-height: 18px;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pdf-search-results {
	flex: 1 1 auto;
	min-height: 0;
	border: 0;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: auto;
}

.pdf-search-results.has-search-results {
	display: block;
	padding: 0;
}

.pdf-search-results.has-document {
	display: block;
	padding: 0;
}

.pdf-document-viewer.search-result-textarea {
	width: 100%;
	margin: 0;
	padding: 8px 2px;
	border: 0;
	background: #fff;
	white-space: normal;
	overflow-wrap: anywhere;
}

.pdf-document-page {
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 24px;
	padding: 8px 2px 20px;
	border-bottom: 1px dashed #001347;
}

.pdf-document-page:last-child {
	margin-bottom: 0;
	border-bottom: 0;
}

.pdf-document-page h1,
.pdf-document-page h2,
.pdf-document-page h3,
.pdf-document-page h4,
.pdf-document-page h5,
.pdf-document-page h6 {
	margin: 1em 0 0.45em;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.pdf-document-page > :first-child {
	margin-top: 0;
}

.active-document-name.can-open-pdf {
	color: #2458b8;
	cursor: pointer;
}

.active-document-name.can-open-pdf:hover,
.active-document-name.can-open-pdf:focus-visible {
	text-decoration: underline;
}

.pdf-document-page p,
.pdf-document-page ul,
.pdf-document-page ol,
.pdf-document-page blockquote,
.pdf-document-page pre,
.pdf-document-table-scroll {
	margin: 0 0 1em;
}

.pdf-document-page ul,
.pdf-document-page ol {
	padding-left: 1.8em;
}

.pdf-image-status {
	color: #2458b8;
	font-weight: normal;
}

.pdf-document-page a {
	color: #2458b8;
	text-decoration: underline;
	overflow-wrap: anywhere;
}

.pdf-document-page blockquote {
	padding-left: 12px;
	border-left: 3px solid #b8b8b8;
	color: #4b4b4b;
}

.pdf-document-page pre {
	max-width: 100%;
	padding: 10px;
	overflow: auto;
	background: rgba(0, 0, 0, 0.045);
}

.pdf-document-page code {
	font-family: Consolas, monospace;
}

.pdf-document-table-scroll {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
}

.pdf-document-table-scroll table {
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
	white-space: nowrap;
}

.pdf-document-table-scroll th,
.pdf-document-table-scroll td {
	padding: 7px 9px;
	border: 1px solid #b8b8b8;
	text-align: left;
	vertical-align: top;
}

.pdf-document-table-scroll th {
	background: rgba(0, 0, 0, 0.055);
}

.pdf-document-match {
	background: #ffeb3b;
	color: inherit;
}

.search-result-textarea {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 8px 2px;
	display: block;
	border: 0;
	border-bottom: 1px dashed #001347;
	border-radius: 0;
	outline: none;
	background: #fff;
	color: #20242a;
    font-family: Verdana, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.search-result-open-pdf {
	position: absolute;
	z-index: 2;
	left: 6px;
	bottom: 6px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	background: rgb(0 0 0 / 30%);
	color: white;
	font-family: inherit;
	font-size: 15px;
	font-weight: normal;
	line-height: 1;
	cursor: pointer;
}

.search-result-textarea:hover .search-result-open-pdf {
	opacity: 1;
	visibility: visible;
}

.search-result-open-pdf:hover,
.search-result-open-pdf:focus-visible {
	background: rgb(0 0 0 / 40%);
}

.search-result-textarea mark {
	background: #ffeb3b;
	color: inherit;
}

.search-result-textarea:last-child {
	margin-bottom: 0;
	border-bottom: 0;
}

.pdf-search-empty-state {
	padding: 18px;
	text-align: center;
	line-height: normal;
}

.pdf-search-empty-state img {
	width: auto;
	height: 72px;
	margin-bottom: 10px;
}

.pdf-search-empty-state p {
	margin: 0;
}

.pdf-process-controls {
	flex: 0 0 auto;
	display: flex;
	gap: 5px;
	align-items: center;
	margin-bottom: 4px;
}

.pdf-process-controls {
	margin-top: 1px;
}

.pdf-control-button {
	flex: 1 1 0;
	min-width: 0;
	padding: 12px;
	border: none;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgb(0 0 0 / 30%);
	color: white;
	font-family: inherit;
	font-size: 10pt;
	font-weight: bold;
	line-height: 1;
}

#copy-search-results-button {
	transition: background-color 180ms ease;
}

#copy-search-results-button {
	flex: 0 0 auto;
}

#copy-search-results-button:hover {
	background-color: rgb(0 0 0 / 40%);
}

.pdf-control-label {
	display: inline;
	font-size: 8pt;
	font-weight: bold;
}

.pdf-ocr-button {
	gap: 8px;
	filter: none;
}

.pdf-ocr-button[data-enabled="true"] {
	color: #18743a;
	background: rgba(150, 205, 165, 0.9);
	filter: none;
}

.pdf-ocr-button.active[data-enabled="true"] {
	color: #18743a;
	animation: ocr-button-flash 1s steps(2, end) infinite;
}

.pdf-embedding-button.on {
	color: #542675;
	background: rgba(201, 166, 226, 0.9);
}

@keyframes ocr-button-flash {
	0%,
	49% {
		background: rgba(150, 205, 165, 0.9);
	}
	50%,
	100% {
		background: rgba(182, 220, 192, 0.9);
	}
}

.pdf-ocr-button.attention {
	color: white;
	animation: ocr-attention-flash 1s steps(2, end) infinite;
}

@keyframes ocr-attention-flash {
	0%,
	49% {
		background: rgba(238, 151, 54, 0.95);
	}

	50%,
	100% {
		background: rgb(0 0 0 / 30%);
	}
}

@media only screen and (min-width: 701px) {
	.pdf-control-button {
		gap: 8px;
	}

	.pdf-control-label {
		display: inline;
		font-weight: bold;
		font-size: 10pt;
		font-family: inherit;
		line-height: 1;
	}
}
