.simple-pdf-embed {
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	margin: 1.5em 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Toolbar ─────────────────────────────────────────────────────────── */

.simple-pdf-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: #000;
	color: #fff;
	gap: 8px;
}

/* Pages toggle — leftmost item */
.simple-pdf-pages-btn {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	padding: 5px 8px;
	border-radius: 4px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	flex-shrink: 0;
	line-height: 1;
}

.simple-pdf-pages-btn:hover,
.simple-pdf-pages-btn:focus {
	background: rgba(255, 255, 255, 0.3);
	outline: none;
}

.simple-pdf-pages-btn.is-active {
	background: rgba(255, 255, 255, 0.35);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.simple-pdf-page-nav {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 auto;
}

.simple-pdf-prev,
.simple-pdf-next {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 4px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	transition: background 0.15s ease;
	flex-shrink: 0;
	padding: 0;
	line-height: 1;
}

.simple-pdf-prev:hover:not(:disabled),
.simple-pdf-next:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.3);
}

.simple-pdf-prev:disabled,
.simple-pdf-next:disabled {
	opacity: 0.35;
	cursor: default;
}

.simple-pdf-counter {
	font-size: 12px;
	color: #fff;
	min-width: 44px;
	text-align: center;
	white-space: nowrap;
	user-select: none;
}

.simple-pdf-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
}

.simple-pdf-btn {
	background: rgba(255, 255, 255, 0.2);
	color: #fff !important;
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	border: none;
	cursor: pointer;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: background 0.15s ease;
	line-height: 1.4;
}

.simple-pdf-btn:hover,
.simple-pdf-btn:focus {
	background: rgba(255, 255, 255, 0.35);
	color: #fff !important;
	outline: none;
}

/* ── Viewer (wraps nav + canvas) ─────────────────────────────────────── */

.simple-pdf-viewer {
	display: flex;
	flex-direction: row;
	overflow: hidden;
}

/* ── Thumbnail navigator panel ───────────────────────────────────────── */

.simple-pdf-nav {
	flex-shrink: 0;
	width: 0;
	overflow: hidden;
	transition: width 0.2s ease;
	background: #2c2e31;
}

.simple-pdf-nav.is-open {
	width: 128px;
	overflow-y: auto;
	padding: 6px 0;
}

.simple-pdf-thumb {
	padding: 6px 10px;
	cursor: pointer;
	outline: none;
}

.simple-pdf-thumb:hover canvas {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.simple-pdf-thumb.is-active canvas {
	box-shadow: 0 0 0 2px #fff;
}

.simple-pdf-thumb canvas {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
	transition: box-shadow 0.1s ease;
}

.simple-pdf-thumb-num {
	text-align: center;
	color: #aaa;
	font-size: 10px;
	margin-top: 4px;
	line-height: 1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.simple-pdf-thumb.is-active .simple-pdf-thumb-num {
	color: #fff;
}

/* ── Canvas area ─────────────────────────────────────────────────────── */

.simple-pdf-canvas-wrap {
	flex: 1;
	min-width: 0;
	background: #525659;
	padding: 8px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.simple-pdf-page-wrap {
	position: relative;
	display: block;
	line-height: 0;
}

.simple-pdf-page {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.simple-pdf-link-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: hidden;
}

.simple-pdf-link-layer a {
	display: block;
	position: absolute;
	pointer-events: all;
	cursor: pointer;
	border: none;
	background: transparent;
	color: transparent;
}

.simple-pdf-link-layer a:hover {
	background: rgba(255, 220, 0, 0.2);
}

/* ── States ──────────────────────────────────────────────────────────── */

.simple-pdf-loading {
	color: #ccc;
	text-align: center;
	padding: 32px 16px;
	font-size: 14px;
}

.simple-pdf-error {
	color: #ffcccc;
	padding: 16px;
	margin: 0;
	font-size: 14px;
}

.simple-pdf-error a {
	color: #fff;
	text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.simple-pdf-nav.is-open {
		width: 100px;
	}
}
