.klcs-flipbook {
	position: relative;
	width: 100%;
	background: #1b1b1b;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.klcs-flipbook__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #ccc;
}

.klcs-flipbook__toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 8px 12px;
	background: #111;
	flex: 0 0 auto;
}

.klcs-flipbook__page-indicator {
	margin-right: auto;
	font-size: 13px;
	color: #ccc;
}

.klcs-flipbook__btn {
	background: #2b2b2b;
	border: 1px solid #3d3d3d;
	color: #fff;
	width: 34px;
	height: 34px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.klcs-flipbook__btn:hover {
	background: #3d3d3d;
}

.klcs-flipbook__stage {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	overflow: hidden;
}

.klcs-flipbook__sidebar {
	width: 0;
	overflow-y: auto;
	background: #141414;
	transition: width 0.2s ease;
	flex: 0 0 auto;
}

.klcs-flipbook__sidebar--open {
	width: 150px;
}

.klcs-flipbook__thumb {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	background: none;
	border: none;
	border-bottom: 1px solid #232323;
	padding: 8px;
	cursor: pointer;
	color: #ccc;
}

.klcs-flipbook__thumb:hover {
	background: #1f1f1f;
}

.klcs-flipbook__thumb canvas {
	max-width: 100%;
	border: 1px solid #333;
}

.klcs-flipbook__thumb-label {
	font-size: 11px;
	margin-top: 4px;
}

.klcs-flipbook__book-wrap {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	overflow: hidden;
	padding: 16px;
	box-sizing: border-box;
	min-width: 0;
	min-height: 0;
}

.klcs-flipbook__book {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	transition: transform 0.15s ease;
	transform-origin: center;
	touch-action: pan-y pinch-zoom;
}

.klcs-flipbook__page {
	background: #fff;
	overflow: hidden;
}

.klcs-flipbook__page canvas {
	width: 100%;
	height: 100%;
	display: block;
}

.klcs-flipbook__nav {
	flex: 0 0 auto;
	background: rgba(255, 255, 255, 0.08);
	border: none;
	color: #fff;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
}

.klcs-flipbook__nav:hover {
	background: rgba(255, 255, 255, 0.18);
}

.klcs-flipbook__error {
	padding: 24px;
	color: #f88;
	text-align: center;
}

@media (max-width: 767px) {
	.klcs-flipbook__sidebar--open {
		position: absolute;
		z-index: 5;
		height: 100%;
	}

	.klcs-flipbook__nav {
		width: 28px;
		height: 28px;
	}
}
