.az-pdf,
.az-split {
	--az-border: #d0d5dd;
	--az-text: #101828;
	--az-muted: #475467;
	--az-bg: #fff;
	--az-accent: #155eef;
	--az-accent-2: #0b3c91;
	--az-stage: #eef2f6;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--az-text);
}

.az-pdf *,
.az-split * {
	box-sizing: border-box;
}

.az-pdf-text,
.az-pdf-text * {
	box-sizing: content-box;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.az-pdf {
	display: flex;
	flex-direction: column;
	min-height: 70vh;
	height: 70vh;
	border: 1px solid var(--az-border);
	border-radius: 8px;
	background: var(--az-bg);
	overflow: hidden;
	position: relative;
}

.az-pdf-banner {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.45rem 0.75rem;
	background: #0b3c91;
	color: #fff;
	font-size: 0.86rem;
	line-height: 1.3;
	z-index: 3;
}

.az-pdf-banner[hidden] {
	display: none !important;
}

.az-pdf-banner-title {
	font-weight: 600;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.az-pdf-banner-code {
	flex: 0 0 auto;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	font-variant-numeric: tabular-nums;
}

.az-pdf:focus {
	outline: none;
}

.az-pdf-toolbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.6rem;
	border-bottom: 1px solid var(--az-border);
	background: #f8fafc;
	flex: 0 0 auto;
	flex-wrap: wrap;
}

.az-pdf-spacer {
	flex: 1 1 auto;
	min-width: 0.25rem;
}

.az-pdf-btn {
	appearance: none;
	border: 1px solid var(--az-border);
	background: #fff;
	color: var(--az-accent-2);
	border-radius: 8px;
	padding: 0 0.7rem;
	height: 2.15rem;
	font: inherit;
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
	line-height: 1;
}

.az-pdf-btn:hover {
	border-color: var(--az-accent);
	color: var(--az-accent);
	background: #eff4ff;
}

.az-pdf-btn--icon {
	min-width: 2.15rem;
	padding: 0;
	font-size: 1.15rem;
	font-weight: 500;
}

.az-pdf-btn--ghost {
	border-color: transparent;
	background: transparent;
	height: auto;
	padding: 0.35rem 0.6rem;
}

.az-pdf-btn--toc {
	flex: 0 0 auto;
}

.az-pdf-cluster {
	display: flex;
	align-items: stretch;
	height: 2.15rem;
	background: #fff;
	border: 1px solid var(--az-border);
	border-radius: 8px;
	overflow: hidden;
}

.az-pdf-cluster:focus-within {
	border-color: var(--az-accent);
}

.az-pdf-cluster .az-pdf-btn {
	border: 0;
	border-radius: 0;
	background: transparent;
	height: auto;
}

.az-pdf-cluster .az-pdf-btn:hover {
	background: #eff4ff;
}

.az-pdf-pager .az-pdf-page,
.az-pdf-search-meta,
.az-pdf-search input + .az-pdf-btn,
.az-pdf-zoom-label + .az-pdf-btn,
.az-pdf-cluster .az-pdf-btn + .az-pdf-btn {
	border-left: 1px solid var(--az-border);
}

.az-pdf-page {
	display: flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0 0.4rem;
	font-size: 0.82rem;
	color: var(--az-muted);
	white-space: nowrap;
}

.az-pdf-page input {
	width: 2.5rem;
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	font-variant-numeric: tabular-nums;
	text-align: center;
	color: var(--az-text);
	appearance: textfield;
	-moz-appearance: textfield;
}

.az-pdf-page input::-webkit-inner-spin-button,
.az-pdf-page input::-webkit-outer-spin-button {
	appearance: none;
	margin: 0;
}

.az-pdf-search {
	flex: 1 1 12rem;
	min-width: 11rem;
	max-width: 24rem;
}

.az-pdf-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 0 0.7rem;
	font: inherit;
	font-size: 0.86rem;
	outline: none;
}

.az-pdf-search input[type="search"]::-webkit-search-decoration,
.az-pdf-search input[type="search"]::-webkit-search-cancel-button {
	appearance: none;
}

.az-pdf-search-meta {
	display: flex;
	align-items: center;
	padding: 0 0.55rem;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	color: var(--az-muted);
	white-space: nowrap;
	min-width: 0;
}

.az-pdf-search-meta:empty {
	display: none;
}

.az-pdf-zoom {
	flex: 0 0 auto;
}

.az-pdf-zoom-label {
	display: flex;
	align-items: center;
	padding: 0 0.65rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--az-muted);
	user-select: none;
}

.az-pdf-body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
}

.az-pdf-stage {
	flex: 1;
	min-width: 0;
	overflow: auto;
	background: var(--az-stage);
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 0.5rem;
}

.az-pdf-pagewrap {
	position: relative;
	box-shadow: 0 1px 8px rgba(16, 24, 40, 0.12);
	background: #fff;
}

.az-pdf-pagewrap canvas {
	display: block;
	pointer-events: none;
}

.az-pdf-text {
	position: absolute;
	inset: 0;
	overflow: hidden;
	line-height: 1;
	opacity: 1;
	text-align: initial;
	text-size-adjust: none;
	forced-color-adjust: none;
	transform-origin: 0 0;
	z-index: 2;
	pointer-events: auto;
	user-select: text;
	-webkit-user-select: text;
}

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

.az-pdf-text span.markedContent {
	top: 0;
	height: 0;
}

.az-pdf-text span.is-hit {
	background: rgba(21, 94, 239, 0.32);
}

.az-pdf-text ::selection {
	background: rgba(21, 94, 239, 0.4);
}

.az-pdf-text br::selection {
	background: transparent;
}

.az-pdf-drawer {
	position: absolute;
	z-index: 5;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(20rem, 86%);
	background: #fff;
	border-right: 1px solid var(--az-border);
	box-shadow: 8px 0 24px rgba(16, 24, 40, 0.12);
	display: flex;
	flex-direction: column;
}

.az-pdf-drawer[hidden],
.az-pdf-backdrop[hidden],
.az-pdf-search[hidden],
.az-pdf-status[hidden] {
	display: none !important;
}

.az-pdf-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.65rem 0.75rem;
	border-bottom: 1px solid var(--az-border);
}

.az-pdf-toc {
	overflow: auto;
	padding: 0.5rem 0.35rem 0.75rem;
	flex: 1;
}

.az-pdf-toc ul {
	list-style: none;
	margin: 0;
	padding: 0 0 0 0.7rem;
}

.az-pdf-toc > ul {
	padding-left: 0.25rem;
}

.az-pdf-toc button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--az-text);
	font: inherit;
	font-size: 0.9rem;
	text-align: left;
	width: 100%;
	padding: 0.35rem 0.5rem;
	border-radius: 4px;
	cursor: pointer;
}

.az-pdf-toc button:hover {
	background: #eff4ff;
	color: var(--az-accent-2);
}

.az-pdf-backdrop {
	position: absolute;
	inset: 0;
	z-index: 4;
	border: 0;
	padding: 0;
	background: rgba(16, 24, 40, 0.28);
	cursor: pointer;
}

.az-pdf-status {
	margin: 0;
	padding: 0.55rem 0.75rem;
	font-size: 0.88rem;
	color: var(--az-muted);
	border-top: 1px solid var(--az-border);
}

.az-pdf-status.is-error {
	color: #b42318;
}

.az-pdf-missing {
	padding: 0.75rem 1rem;
	border: 1px solid var(--az-border);
	border-radius: 8px;
	background: #fff;
}

.az-split {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(22rem, 0.85fr);
	gap: 1rem;
	align-items: stretch;
}

.az-split-tabs {
	display: none;
}

.az-split-catalog,
.az-split-form {
	min-width: 0;
	min-height: 0;
}

.az-split .az-pdf {
	height: calc(100vh - 2rem);
	min-height: 28rem;
	position: sticky;
	top: 1rem;
}

.az-split .az-form-wrap {
	position: sticky;
	top: 1rem;
	height: calc(100vh - 2rem);
	max-height: calc(100vh - 2rem);
	overflow: auto;
	display: flex;
	flex-direction: column;
}

.az-split .az-form {
	flex: 1;
	min-height: 0;
}

.az-split .az-table-scroll {
	flex: 1 1 auto;
	height: auto;
	max-height: none;
}

.az-split .az-mobile-bar {
	display: none !important;
}

.az-split-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	margin-left: 0.35rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	font-size: 0.78rem;
	font-weight: 600;
}

.az-split-tab[aria-selected="false"] .az-split-badge {
	background: #dbe4ff;
	color: var(--az-accent-2);
}

@media (max-width: 899px) {
	.az-split {
		display: flex;
		flex-direction: column;
		gap: 0;
		border: 1px solid var(--az-border);
		border-radius: 8px;
		overflow: hidden;
		background: var(--az-bg);
		min-height: calc(100dvh - 5.5rem);
	}

	.az-split-tabs {
		display: flex;
		flex: 0 0 auto;
		position: sticky;
		top: 0;
		z-index: 8;
		background: #eef2f6;
		padding: 0.4rem;
		gap: 0.4rem;
	}

	.az-split-tab {
		flex: 1;
		min-height: 3.15rem;
		border: 1px solid var(--az-border);
		border-radius: 8px;
		background: #fff;
		color: var(--az-text);
		font: inherit;
		font-size: 1rem;
		font-weight: 600;
		cursor: pointer;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.az-split-tab[aria-selected="true"] {
		background: var(--az-accent);
		border-color: var(--az-accent);
		color: #fff;
	}

	.az-split[data-az-active="catalog"] [data-az-pane="order"],
	.az-split[data-az-active="order"] [data-az-pane="catalog"] {
		display: none;
	}

	.az-split-pane {
		flex: 1 1 auto;
		min-height: 0;
	}

	.az-split .az-pdf {
		height: calc(100dvh - 9rem);
		min-height: 22rem;
		position: static;
		border: 0;
		border-radius: 0;
	}

	.az-split .az-form-wrap {
		position: static;
		height: auto;
		max-height: none;
		border: 0;
		border-radius: 0;
	}

	.az-pdf {
		height: 75vh;
	}
}
