body.page-template-page-pdf-viewer {
	margin: 0;
	overflow: hidden;
}

#pdf-viewer-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #525659;
	display: flex;
	flex-direction: column;
	z-index: 999999;
}

#pdf-viewer-toolbar {
	background: #323639;
	color: #fff;
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	flex-shrink: 0;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pdf-btn {
	background: #474a4d;
	border: none;
	color: #fff;
	padding: 8px 12px;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
	transition: background 0.2s;
}

.pdf-btn:hover {
	background: #5a5d60;
}

.pdf-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pdf-btn.active {
	background: #5a5d60;
	border: 2px solid var(--color-cta);
}

.pdf-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

#pdf-page-info,
#pdf-zoom-level {
	color: #fff;
	font-size: 14px;
	min-width: 80px;
	text-align: center;
}

#pdf-catalog-nav {
	background: var(--color-cta);
	padding: 12px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	flex-shrink: 0;
}

.pdf-catalog-btn {
	background: #323639;
	border: none;
	color: #fff;
	padding: 10px 16px;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.2s;
}

.pdf-catalog-btn:hover:not(:disabled) {
	background: #1f2023;
	transform: translateY(-1px);
}

.pdf-catalog-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

#pdf-catalog-info {
	color: #323639;
	font-weight: 700;
	font-size: 16px;
}

#pdf-viewer-canvas-container {
	flex: 1;
	overflow: auto;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 20px;
	gap: 10px;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y;
	position: relative;
}

.pdf-page-container {
	position: relative;
	display: inline-block;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
	touch-action: none;
	flex-shrink: 0;
	vertical-align: top;
	overflow: hidden;
	transition: opacity 0.2s ease-in;
}

.pdf-page-container.pdf-page-loading {
	opacity: 0;
}

.pdf-page-container.pdf-page-loaded {
	opacity: 1;
}

.pdf-canvas {
	background: white;
	display: block;
	max-width: none;
	height: auto;
}

.annotationLayer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	opacity: 1;
	line-height: 1;
	z-index: 10;
	pointer-events: none;
}

.annotationLayer section {
	position: absolute;
	text-align: initial;
	pointer-events: auto;
}

.annotationLayer .linkAnnotation {
	pointer-events: auto;
}

.annotationLayer .linkAnnotation > a,
.annotationLayer .buttonWidgetAnnotation.pushButton > a {
	position: absolute;
	font-size: 1em;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	pointer-events: auto;
	z-index: 20;
}

.annotationLayer .linkAnnotation > a:hover,
.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
	opacity: 0.2;
	background: rgba(255, 255, 0, 1);
	box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
}

.annotationLayer .textAnnotation img {
	position: absolute;
	cursor: pointer;
	pointer-events: auto;
}

#pdf-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	color: #fff;
}

#pdf-loading.hidden {
	display: none;
}

.pdf-spinner {
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid #fff;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
	margin: 0 auto 15px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@media (max-width: 1199px) {
	#pdf-toggle-spread {
		display: none;
	}
}

@media (max-width: 768px) {
	#pdf-viewer-toolbar {
		padding: 8px 10px;
		flex-wrap: wrap;
	}

	.toolbar-left,
	.toolbar-center,
	.toolbar-right {
		gap: 5px;
	}

	.pdf-btn {
		padding: 8px 12px;
		font-size: 12px;
		min-width: 40px;
	}

	.catalog-nav-text {
		display: none;
	}

	#pdf-catalog-nav {
		padding: 8px 10px;
	}

	#pdf-viewer-canvas-container {
		padding: 10px;
		flex-direction: column;
	}

	.pdf-canvas {
		max-width: none !important;
	}
}
