.ihc-pdf-viewer {
	--ihc-pdf-border: var(--iexamhub-border, #d7e3f4);
	--ihc-pdf-muted: var(--iexamhub-muted, #63728d);
	--ihc-pdf-navy: var(--iexamhub-navy, #0b1f44);
	--ihc-pdf-blue: var(--iexamhub-blue, #2563eb);
	--ihc-pdf-orange: var(--iexamhub-orange, #ff6b1a);
	background: #f4f7fc;
	border: 1px solid var(--ihc-pdf-border);
	border-radius: 10px;
	box-sizing: border-box;
	color: var(--ihc-pdf-navy);
	height: auto;
	max-width: 100%;
	min-height: 0;
	overflow: hidden;
	position: relative;
}

.ihc-pdf-viewer *,
.ihc-pdf-viewer *::before,
.ihc-pdf-viewer *::after {
	box-sizing: border-box;
}

.ihc-pdf-viewer [hidden] {
	display: none !important;
}

.ihc-native-pdf-viewer,
.ihc-pdf-js-viewer {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.ihc-native-pdf-viewer {
	background: #30343b;
	display: flex;
	flex-direction: column;
}

.ihc-native-pdf-viewer__mount {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.ihc-native-pdf-frame {
	background: #30343b;
	border: 0;
	display: block;
	height: clamp(800px, calc(100vh - 140px), 1100px);
	min-height: 800px;
	width: 100%;
}

.ihc-native-pdf-viewer__actions,
.ihc-pdf-viewer__noscript {
	align-items: center;
	background: #ffffff;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	padding: 10px 14px;
}

.ihc-native-pdf-viewer__actions {
	border-bottom: 1px solid var(--ihc-pdf-border);
}

.ihc-pdf-viewer__noscript {
	border-top: 1px solid var(--ihc-pdf-border);
}

.ihc-native-pdf-viewer__actions span,
.ihc-pdf-viewer__noscript p {
	color: var(--ihc-pdf-muted);
	font-size: 12px;
	margin: 0 auto 0 0;
}

.ihc-native-pdf-viewer__actions a,
.ihc-native-pdf-viewer__compat,
.ihc-pdf-viewer__noscript a {
	align-items: center;
	appearance: none;
	background: #ffffff;
	border: 1px solid var(--ihc-pdf-border);
	border-radius: 7px;
	color: var(--ihc-pdf-blue);
	cursor: pointer;
	display: inline-flex;
	font-size: 12px;
	font-weight: 900;
	font-family: inherit;
	justify-content: center;
	min-height: 40px;
	padding: 0 14px;
	text-decoration: none;
}

.ihc-native-pdf-viewer__compat {
	background: #eef5ff;
	border-color: #b9cff3;
	color: var(--ihc-pdf-navy);
}

.ihc-native-pdf-viewer__actions a.is-download {
	background: var(--ihc-pdf-orange);
	border-color: var(--ihc-pdf-orange);
	color: #ffffff;
}

.ihc-pdf-viewer__noscript {
	justify-content: center;
	min-height: 180px;
	padding: 24px;
}

.ihc-pdf-viewer__placeholder,
.ihc-pdf-viewer__error {
	align-items: center;
	background:
		radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.12), transparent 180px),
		radial-gradient(circle at 8% 90%, rgba(255, 107, 26, 0.1), transparent 190px),
		#f9fbff;
	display: grid;
	gap: 18px;
	justify-items: center;
	min-height: 360px;
	padding: 42px 24px;
	text-align: center;
}

.ihc-pdf-viewer__placeholder h2,
.ihc-pdf-viewer__error h2 {
	color: var(--ihc-pdf-navy);
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	line-height: 1.2;
	margin: 0 0 8px;
}

.ihc-pdf-viewer__placeholder p,
.ihc-pdf-viewer__error p {
	color: var(--ihc-pdf-muted);
	margin: 0;
	max-width: 580px;
}

.ihc-pdf-viewer__badge {
	align-items: center;
	background: linear-gradient(145deg, #ff7a2e, #f4510b);
	border: 3px solid rgba(255, 255, 255, 0.9);
	border-radius: 10px;
	box-shadow: 0 14px 30px rgba(244, 81, 11, 0.2);
	color: #ffffff;
	display: inline-flex;
	font-size: 14px;
	font-weight: 900;
	height: 62px;
	justify-content: center;
	letter-spacing: 0;
	width: 62px;
}

.ihc-pdf-viewer__badge.is-error {
	background: linear-gradient(145deg, #64748b, #334155);
	box-shadow: 0 14px 30px rgba(51, 65, 85, 0.18);
}

.ihc-pdf-viewer__placeholder-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.ihc-pdf-viewer__placeholder-actions .button {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-height: 44px;
}

.ihc-pdf-viewer__privacy-note {
	font-size: 12px;
}

.ihc-pdf-viewer__loading {
	align-items: center;
	background: rgba(249, 251, 255, 0.96);
	color: var(--ihc-pdf-muted);
	display: flex;
	font-size: 14px;
	font-weight: 700;
	gap: 10px;
	justify-content: center;
	min-height: 88px;
	padding: 20px;
	text-align: center;
}

.ihc-pdf-viewer__spinner {
	animation: ihc-pdf-spin 0.85s linear infinite;
	border: 3px solid rgba(37, 99, 235, 0.18);
	border-radius: 50%;
	border-top-color: var(--ihc-pdf-blue);
	height: 24px;
	width: 24px;
}

@keyframes ihc-pdf-spin {
	to {
		transform: rotate(360deg);
	}
}

.ihc-pdf-viewer__shell {
	display: flex;
	flex-direction: column;
	max-width: 100%;
}

.ihc-pdf-viewer__toolbar {
	align-items: center;
	background: #ffffff;
	border-bottom: 1px solid var(--ihc-pdf-border);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	padding: 10px 12px;
	z-index: 2;
}

.ihc-pdf-viewer__control-group,
.ihc-pdf-viewer__toolbar-actions {
	align-items: center;
	display: flex;
	gap: 6px;
}

.ihc-pdf-viewer__icon-button,
.ihc-pdf-viewer__text-button {
	align-items: center;
	background: #f5f8fe;
	border: 1px solid var(--ihc-pdf-border);
	border-radius: 7px;
	color: var(--ihc-pdf-navy);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	height: 40px;
	justify-content: center;
	line-height: 1;
	min-width: 40px;
	padding: 0 10px;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.ihc-pdf-viewer__icon-button span {
	font-size: 24px;
	line-height: 1;
}

.ihc-pdf-viewer__icon-button:hover,
.ihc-pdf-viewer__text-button:hover {
	background: #eaf1ff;
	border-color: #9ab9ef;
	color: var(--ihc-pdf-blue);
}

.ihc-pdf-viewer__icon-button:disabled {
	cursor: not-allowed;
	opacity: 0.42;
}

.ihc-pdf-viewer__page-status,
.ihc-pdf-viewer__zoom-status {
	color: var(--ihc-pdf-muted);
	font-size: 12px;
	font-weight: 800;
	min-width: 82px;
	text-align: center;
}

.ihc-pdf-viewer__zoom-status {
	min-width: 66px;
}

.ihc-pdf-viewer__toolbar-actions {
	margin-left: auto;
}

.ihc-pdf-viewer__toolbar-actions a {
	align-items: center;
	border: 1px solid var(--ihc-pdf-border);
	border-radius: 7px;
	color: var(--ihc-pdf-blue);
	display: inline-flex;
	font-size: 12px;
	font-weight: 900;
	height: 40px;
	justify-content: center;
	padding: 0 12px;
	text-decoration: none;
}

.ihc-pdf-viewer__toolbar-actions a:last-child {
	background: var(--ihc-pdf-orange);
	border-color: var(--ihc-pdf-orange);
	color: #ffffff;
}

.ihc-pdf-viewer__viewport {
	background:
		linear-gradient(45deg, rgba(15, 31, 68, 0.025) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(15, 31, 68, 0.025) 25%, transparent 25%),
		#e8eef7;
	background-position: 0 0, 10px 10px;
	background-size: 20px 20px;
	height: min(72vh, 820px);
	min-height: 500px;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.ihc-pdf-viewer__canvas-wrap {
	display: flex;
	justify-content: center;
	min-height: 100%;
	min-width: 100%;
	padding: 24px;
	width: max-content;
}

.ihc-pdf-viewer canvas {
	align-self: flex-start;
	background: #ffffff;
	box-shadow: 0 18px 44px rgba(15, 31, 68, 0.16);
	display: block;
	filter: none;
	max-width: none;
}

.ihc-pdf-viewer__error {
	background:
		radial-gradient(circle at 50% 0, rgba(100, 116, 139, 0.12), transparent 220px),
		#f8fafc;
}

.ihc-pdf-viewer button:focus-visible,
.ihc-pdf-viewer a:focus-visible,
.ihc-pdf-viewer__viewport:focus-visible {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
	outline: 2px solid var(--ihc-pdf-blue);
	outline-offset: 2px;
}

html[data-theme="dark"] .ihc-pdf-viewer {
	--ihc-pdf-border: #2a4164;
	--ihc-pdf-muted: #b5c4dc;
	--ihc-pdf-navy: #f4f7ff;
	background: #0b172b;
}

html[data-theme="dark"] .ihc-pdf-viewer__placeholder,
html[data-theme="dark"] .ihc-pdf-viewer__error {
	background:
		radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.18), transparent 180px),
		radial-gradient(circle at 8% 90%, rgba(255, 107, 26, 0.12), transparent 190px),
		#0f1d33;
}

html[data-theme="dark"] .ihc-pdf-viewer__loading,
html[data-theme="dark"] .ihc-pdf-viewer__toolbar {
	background: #0f1d33;
}

html[data-theme="dark"] .ihc-native-pdf-viewer__actions,
html[data-theme="dark"] .ihc-pdf-viewer__noscript {
	background: #0f1d33;
}

html[data-theme="dark"] .ihc-pdf-viewer__icon-button,
html[data-theme="dark"] .ihc-pdf-viewer__text-button {
	background: #14243d;
	border-color: #314a70;
	color: #f4f7ff;
}

html[data-theme="dark"] .ihc-pdf-viewer__icon-button:hover,
html[data-theme="dark"] .ihc-pdf-viewer__text-button:hover {
	background: #1c3150;
	border-color: #4b75ad;
	color: #9fc2ff;
}

html[data-theme="dark"] .ihc-pdf-viewer__toolbar-actions a {
	border-color: #314a70;
	color: #9fc2ff;
}

html[data-theme="dark"] .ihc-native-pdf-viewer__compat {
	background: #14243d;
	border-color: #314a70;
	color: #f4f7ff;
}

html[data-theme="dark"] .ihc-pdf-viewer__toolbar-actions a:last-child {
	border-color: var(--ihc-pdf-orange);
	color: #ffffff;
}

html[data-theme="dark"] .ihc-pdf-viewer__viewport {
	background:
		linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
		#071223;
	background-position: 0 0, 10px 10px;
	background-size: 20px 20px;
}

@media (pointer: coarse) {
	.ihc-pdf-viewer.is-pdfjs-mode .ihc-pdf-viewer__icon-button,
	.ihc-pdf-viewer.is-pdfjs-mode .ihc-pdf-viewer__text-button,
	.ihc-pdf-viewer.is-pdfjs-mode .ihc-pdf-viewer__toolbar-actions a {
		height: 44px;
		min-width: 44px;
	}
}

@media (max-width: 768px) {
	.ihc-native-pdf-frame {
		height: 68vh;
		min-height: 420px;
	}

	.ihc-native-pdf-viewer__actions {
		display: flex;
		justify-content: center;
	}

	.ihc-native-pdf-viewer__actions span {
		grid-column: 1 / -1;
		margin: 0;
		text-align: center;
	}

	.ihc-native-pdf-viewer__actions a,
	.ihc-native-pdf-viewer__compat {
		min-height: 44px;
	}

	.ihc-pdf-viewer__placeholder,
	.ihc-pdf-viewer__error {
		gap: 14px;
		min-height: 310px;
		padding: 30px 16px;
	}

	.ihc-pdf-viewer__placeholder-actions {
		display: grid;
		grid-template-columns: 1fr;
		width: min(100%, 360px);
	}

	.ihc-pdf-viewer__placeholder-actions .button {
		width: 100%;
	}

	.ihc-pdf-viewer__toolbar {
		gap: 8px;
		padding: 8px;
	}

	.ihc-pdf-viewer__control-group {
		flex: 1 1 auto;
		justify-content: center;
	}

	.ihc-pdf-viewer__icon-button,
	.ihc-pdf-viewer__text-button {
		height: 44px;
		min-width: 44px;
	}

	.ihc-pdf-viewer__toolbar-actions {
		display: grid;
		flex: 1 0 100%;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-left: 0;
		width: 100%;
	}

	.ihc-pdf-viewer__toolbar-actions a {
		height: 44px;
		padding: 0 8px;
	}

	.ihc-pdf-viewer__viewport {
		height: 68vh;
		min-height: 420px;
	}

	.ihc-pdf-viewer__canvas-wrap {
		padding: 12px;
	}
}

@media (max-width: 390px) {
	.ihc-pdf-viewer__page-status,
	.ihc-pdf-viewer__zoom-status {
		font-size: 11px;
		min-width: 64px;
	}

	.ihc-pdf-viewer__text-button {
		padding: 0 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ihc-pdf-viewer *,
	.ihc-pdf-viewer *::before,
	.ihc-pdf-viewer *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
