.pdfbla {
	--pdfbla-bg: #eef0f2;
	--pdfbla-bar: #ffffff;
	--pdfbla-fg: #1d2327;
	--pdfbla-accent: #2271b1;
	position: relative;
	display: flex;
	flex-direction: column;
	max-width: 100%;
	margin: 1.5em 0;
	background: var(--pdfbla-bg);
	border: 1px solid #dcdfe3;
	border-radius: 8px;
	overflow: hidden;
	color: var(--pdfbla-fg);
	font: 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.pdfbla:focus { outline: none; }
.pdfbla:focus-visible { outline: 2px solid var(--pdfbla-accent); outline-offset: 2px; }

/* Verktøylinje */
.pdfbla__toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 6px 12px;
	padding: 6px 10px;
	background: var(--pdfbla-bar);
	border-bottom: 1px solid #dcdfe3;
}
.pdfbla__group { display: flex; align-items: center; gap: 2px; }
.pdfbla__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
}
.pdfbla__btn:hover:not(:disabled) { background: #f0f0f1; color: var(--pdfbla-accent); }
.pdfbla__btn:disabled { opacity: .35; cursor: default; }
.pdfbla__zoomlabel { font-size: 13px; min-width: 56px; }
.pdfbla__pages { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; white-space: nowrap; }
.pdfbla__pageinput {
	width: 3.2em;
	height: 30px;
	padding: 0 4px;
	margin: 0;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	text-align: center;
	font: inherit;
	-moz-appearance: textfield;
}
.pdfbla__pageinput::-webkit-outer-spin-button,
.pdfbla__pageinput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Visningsflate */
.pdfbla__stage {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 240px;
	padding: 12px;
	overflow: hidden;
	touch-action: pan-y pinch-zoom;
}
.pdfbla.is-zoomed .pdfbla__stage {
	overflow: auto;
	max-height: var(--pdfbla-max-h, 85vh);
	justify-content: flex-start;
	touch-action: auto;
}
.pdfbla.is-zoomed .pdfbla__pagesview { margin: 0 auto; }
.pdfbla__pagesview { display: flex; gap: 4px; }
.pdfbla__canvas {
	display: block;
	max-width: none;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 4px 14px rgba(0,0,0,.08);
}
.pdfbla__pagesview.is-spread .pdfbla__canvas:first-child { box-shadow: -2px 2px 10px rgba(0,0,0,.12); }
.pdfbla__pagesview.is-spread .pdfbla__canvas:last-child { box-shadow: 2px 2px 10px rgba(0,0,0,.12); }

/* Store piler på sidene av dokumentet */
.pdfbla__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px;
	height: 64px;
	margin-top: -32px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: rgba(29,35,39,.55);
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s;
}
.pdfbla__nav--prev { left: 8px; }
.pdfbla__nav--next { right: 8px; }
.pdfbla.is-ready .pdfbla__stage:hover .pdfbla__nav:not(:disabled),
.pdfbla__nav:focus-visible { opacity: 1; }
.pdfbla__nav:disabled { display: none; }
@media (hover: none) { .pdfbla__nav { display: none; } }

.pdfbla__status {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #646970;
}
.pdfbla__status.is-error { color: #b32d2e; }
.pdfbla__status[hidden] { display: none; }

/* Fullskjerm */
.pdfbla:fullscreen { margin: 0; border: 0; border-radius: 0; background: #2c3338; }
.pdfbla:fullscreen .pdfbla__stage { flex: 1; align-items: center; }
.pdfbla.is-pseudo-fs {
	position: fixed;
	inset: 0;
	z-index: 999999;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: #2c3338;
}
.pdfbla.is-pseudo-fs .pdfbla__stage { flex: 1; align-items: center; }
html.pdfbla-noscroll, html.pdfbla-noscroll body { overflow: hidden; }

@media (max-width: 480px) {
	.pdfbla__toolbar { justify-content: center; }
	.pdfbla__btn[data-act="first"], .pdfbla__btn[data-act="last"] { display: none; }
	.pdfbla__stage { padding: 8px 4px; }
}
