/* =================================================================
   PDF Viewer Modal
   -----------------------------------------------------------------
   A clean, unobtrusive overlay for the custom PDF.js reader.
   Scoped under .shn-pdf-* to avoid any collision with the site's
   existing design tokens.
   ================================================================= */

/* --- Overlay ---------------------------------------------------- */
.shn-pdf-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;                        /* toggled via JS */
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .88);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.shn-pdf-overlay.is-open {
	display: flex;
}

/* --- Container -------------------------------------------------- */
.shn-pdf-viewer {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 94vw;
	height: 94vh;
	max-width: 1100px;
	background: #1a1a1a;
	border-radius: 6px;
	overflow: hidden;
}

/* --- Toolbar ---------------------------------------------------- */
.shn-pdf-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 16px;
	background: #111;
	color: #ccc;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	flex-shrink: 0;
	user-select: none;
	-webkit-user-select: none;
}

.shn-pdf-toolbar__group {
	display: flex;
	align-items: center;
	gap: 6px;
}

.shn-pdf-toolbar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: #ccc;
	cursor: pointer;
	transition: background .15s;
}
.shn-pdf-toolbar__btn:hover {
	background: rgba(255, 255, 255, .12);
}
.shn-pdf-toolbar__btn svg {
	width: 18px;
	height: 18px;
}

.shn-pdf-toolbar__page {
	color: #aaa;
	white-space: nowrap;
	min-width: 72px;
	text-align: center;
}

.shn-pdf-toolbar__close {
	width: 36px;
	height: 36px;
}

/* --- Canvas wrapper --------------------------------------------- */
.shn-pdf-pages {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 16px 0;
	gap: 12px;

	/* Disable text selection everywhere inside the viewer */
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

.shn-pdf-pages canvas {
	display: block;
	max-width: 100%;
	height: auto;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

/* --- Loading spinner -------------------------------------------- */
.shn-pdf-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	color: #888;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	gap: 16px;
}
.shn-pdf-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255,255,255,.15);
	border-top-color: #ccc;
	border-radius: 50%;
	animation: shn-spin .7s linear infinite;
}
@keyframes shn-spin {
	to { transform: rotate(360deg); }
}
