/* LSG catalogue flipbook */

.lsg-flipbook {
	--lsg-fb-bg: #f4f5f2;
	--lsg-fb-panel: #ffffff;
	--lsg-fb-stage: #e8eae4;
	--lsg-fb-text: #1a1a1a;
	--lsg-fb-muted: #5c5c5c;
	--lsg-fb-accent: #c8e86c;
	--lsg-fb-border: rgba(26, 26, 26, 0.14);
	--lsg-fb-radius: 12px;
	--lsg-fb-control: 44px;

	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	background: var(--lsg-fb-bg);
	border: 1px solid var(--lsg-fb-border);
	border-radius: var(--lsg-fb-radius);
	overflow: hidden;
	color: var(--lsg-fb-text);
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	box-sizing: border-box;
	box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
}

.lsg-flipbook *,
.lsg-flipbook *::before,
.lsg-flipbook *::after {
	box-sizing: border-box;
}

.lsg-flipbook__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 12px 14px;
	background: var(--lsg-fb-panel);
	border-bottom: 1px solid var(--lsg-fb-border);
}

.lsg-flipbook__nav,
.lsg-flipbook__actions,
.lsg-flipbook__zoom {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lsg-flipbook__btn {
	appearance: none;
	border: 1.5px solid rgba(26, 26, 26, 0.28);
	background: #fff;
	color: var(--lsg-fb-text);
	min-width: var(--lsg-fb-control);
	min-height: var(--lsg-fb-control);
	padding: 0 14px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.02em;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
}

.lsg-flipbook__btn:hover,
.lsg-flipbook__btn:focus-visible {
	background: #f3f7e8;
	border-color: #1a1a1a;
	outline: none;
	color: var(--lsg-fb-text);
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.lsg-flipbook__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	box-shadow: none;
}

.lsg-flipbook__btn--icon {
	padding: 0;
	font-size: 20px;
	line-height: 1;
}

.lsg-flipbook__btn--primary {
	background: var(--lsg-fb-accent);
	border-color: transparent;
	color: #111;
}

.lsg-flipbook__btn--primary:hover,
.lsg-flipbook__btn--primary:focus-visible {
	background: #d4f07a;
	color: #111;
}

.lsg-flipbook__page-label {
	min-width: 5.5rem;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	color: var(--lsg-fb-muted);
	letter-spacing: -0.02em;
}

.lsg-flipbook__stage {
	position: relative;
	width: 100%;
	height: min(82vh, 920px);
	background: var(--lsg-fb-stage);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: pan-y;
}

.lsg-flipbook.is-fullscreen .lsg-flipbook__stage {
	height: calc(100vh - 68px);
	max-height: none;
}

.lsg-flipbook__book {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lsg-flipbook__book .stf__parent,
.lsg-flipbook__book .stf__wrapper {
	margin: 0 auto;
}

.lsg-flipbook__page {
	background: #fff;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lsg-flipbook__page canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
}

.lsg-flipbook__page--hard {
	background: #f3f3f3;
}

.lsg-flipbook__loading,
.lsg-flipbook__error {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
	background: rgba(244, 245, 242, 0.94);
	z-index: 5;
}

.lsg-flipbook__loading[hidden],
.lsg-flipbook__error[hidden] {
	display: none !important;
}

.lsg-flipbook__spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(26, 26, 26, 0.12);
	border-top-color: #6b8f1a;
	border-radius: 50%;
	animation: lsg-fb-spin 0.8s linear infinite;
}

.lsg-flipbook__loading-text,
.lsg-flipbook__error-text {
	margin: 0;
	font-size: 15px;
	color: var(--lsg-fb-muted);
	max-width: 28rem;
	line-height: 1.45;
}

.lsg-flipbook__error-text {
	color: #b42318;
}

@keyframes lsg-fb-spin {
	to {
		transform: rotate(360deg);
	}
}

/* StPageFlip base (vendor ships no CSS in this package version) */
.stf__block {
	position: relative;
	box-sizing: border-box;
}

.stf__item {
	display: block;
	position: absolute;
	perspective-origin: 50% 50%;
	transform-style: preserve-3d;
	backface-visibility: hidden;
}

.stf__outerShadow,
.stf__innerShadow,
.stf__hardShadow,
.stf__hardInnerShadow {
	position: absolute;
	pointer-events: none;
	left: 0;
	top: 0;
}

.stf__parent {
	position: relative;
	display: block;
	box-sizing: border-box;
	transform: translateZ(0);
}

.stf__wrapper {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.stf__svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Mobile */
@media (max-width: 767px) {
	.lsg-flipbook {
		--lsg-fb-control: 52px;
		border-radius: 0;
		flex-direction: column;
	}

	.lsg-flipbook__toolbar {
		order: 2;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 12px;
		padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
		border-bottom: 0;
		border-top: 1px solid var(--lsg-fb-border);
	}

	.lsg-flipbook__nav,
	.lsg-flipbook__actions {
		width: 100%;
		gap: 10px;
	}

	.lsg-flipbook__nav {
		justify-content: space-between;
	}

	.lsg-flipbook__btn--nav {
		flex: 1 1 0;
		min-width: 72px;
		font-size: 28px;
		background: #f7f7f4;
	}

	.lsg-flipbook__actions {
		justify-content: flex-start;
	}

	.lsg-flipbook__zoom {
		gap: 8px;
		flex: 0 0 auto;
	}

	.lsg-flipbook__btn {
		min-height: var(--lsg-fb-control);
		min-width: var(--lsg-fb-control);
		font-size: 18px;
		padding: 0 14px;
	}

	.lsg-flipbook__btn-label {
		display: none;
	}

	.lsg-flipbook__btn--primary .lsg-flipbook__btn-label {
		display: inline;
	}

	.lsg-flipbook__btn--download {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 15px;
	}

	.lsg-flipbook__stage {
		order: 1;
		height: min(72vh, 720px);
	}

	.lsg-flipbook__page-label {
		flex: 0 0 auto;
		min-width: 5.5rem;
		font-size: 15px;
		font-weight: 600;
		color: var(--lsg-fb-text);
	}

	.lsg-flipbook.is-fullscreen .lsg-flipbook__stage,
	.lsg-flipbook:fullscreen .lsg-flipbook__stage,
	.lsg-flipbook:-webkit-full-screen .lsg-flipbook__stage {
		height: calc(100dvh - 148px);
	}
}

/* Fullscreen element */
.lsg-flipbook:fullscreen,
.lsg-flipbook:-webkit-full-screen {
	width: 100%;
	height: 100%;
	border-radius: 0;
	background: var(--lsg-fb-bg);
	border: 0;
}

.lsg-flipbook:fullscreen .lsg-flipbook__stage,
.lsg-flipbook:-webkit-full-screen .lsg-flipbook__stage {
	height: calc(100vh - 68px);
}
