/* Inovgest Flipbook — frontend viewer styles */

.inov-flipbook {
	position: relative;
	width: 100%;
	margin: 0 auto;
	background: #222;
	color: #fff;
	border-radius: 6px;
	overflow: hidden;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.inov-flipbook * {
	box-sizing: border-box;
}

.inov-flipbook.inov-fb--no-select {
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

/* Stage ------------------------------------------------------------- */
.inov-fb-stagewrap {
	position: relative;
	width: 100%;
	height: 70vh;
	overflow: hidden;
	touch-action: pan-y;
}

.inov-fb-stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease-out;
	will-change: transform;
}

.inov-fb-flip {
	margin: 0 auto;
}

/* Slide mode -------------------------------------------------------- */
.inov-fb-viewport {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.inov-fb-track {
	display: flex;
	height: 100%;
	transition: transform 0.45s cubic-bezier( 0.22, 0.61, 0.36, 1 );
	will-change: transform;
}

.inov-fb-spread {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	gap: 0;
}

.inov-fb-cell {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.inov-fb-cell canvas {
	max-height: 100%;
	box-shadow: 0 0 18px rgba( 0, 0, 0, 0.45 );
}

/* Page placeholders (flip mode) ------------------------------------- */
.inov-fb-page {
	background: #fff;
}

.inov-fb-page canvas {
	display: block;
}

/* Arrows ------------------------------------------------------------ */
.inov-fb-arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 5;
	width: 44px;
	height: 64px;
	border: none;
	background: rgba( 0, 0, 0, 0.45 );
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s, opacity 0.2s;
}

.inov-fb-arrow:hover { background: rgba( 0, 0, 0, 0.7 ); }
.inov-fb-arrow:disabled { opacity: 0.25; cursor: default; }
.inov-fb-arrow--prev { left: 8px; }
.inov-fb-arrow--next { right: 8px; }

.inov-flipbook.is-zoomed .inov-fb-arrow { opacity: 0.15; }

/* Toolbar ----------------------------------------------------------- */
.inov-fb-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #1a1a1a;
	flex-wrap: wrap;
}

.inov-fb-spacer { flex: 1 1 auto; }

.inov-fb-indicator {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	opacity: 0.9;
}

.inov-fb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 9px;
	border: none;
	border-radius: 4px;
	background: #333;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s;
}

.inov-fb-btn:hover { background: #4a4a4a; }
.inov-fb-btn.is-active { background: #2271b1; }

.inov-fb-goto {
	width: 64px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #444;
	border-radius: 4px;
	background: #2a2a2a;
	color: #fff;
}

/* Loading / error / password --------------------------------------- */
.inov-fb-loading,
.inov-fb-error {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba( 0, 0, 0, 0.55 );
	text-align: center;
	padding: 20px;
}

.inov-fb-spinner {
	width: 42px;
	height: 42px;
	border: 4px solid rgba( 255, 255, 255, 0.25 );
	border-top-color: #fff;
	border-radius: 50%;
	animation: inov-fb-spin 0.9s linear infinite;
}

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

.inov-fb-progress {
	width: 180px;
	height: 4px;
	background: rgba( 255, 255, 255, 0.2 );
	border-radius: 2px;
	overflow: hidden;
}

.inov-fb-progress span {
	display: block;
	width: 0;
	height: 100%;
	background: #fff;
	transition: width 0.2s;
}

.inov-fb-pass {
	height: 34px;
	padding: 0 10px;
	border-radius: 4px;
	border: 1px solid #555;
	background: #2a2a2a;
	color: #fff;
}

/* Thumbnails -------------------------------------------------------- */
.inov-fb-thumbs {
	display: flex;
	gap: 8px;
	padding: 10px;
	background: #161616;
	overflow-x: auto;
}

.inov-fb-thumb {
	position: relative;
	flex: 0 0 auto;
	width: 70px;
	min-height: 50px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 3px;
	background: #2a2a2a;
	color: #bbb;
	cursor: pointer;
	overflow: hidden;
}

.inov-fb-thumb.is-current { border-color: #2271b1; }

.inov-fb-thumb-num {
	position: absolute;
	bottom: 2px;
	right: 4px;
	font-size: 10px;
	background: rgba( 0, 0, 0, 0.6 );
	padding: 0 4px;
	border-radius: 2px;
}

/* Fullscreen -------------------------------------------------------- */
.inov-flipbook:fullscreen {
	width: 100vw;
	height: 100vh;
	display: flex;
	flex-direction: column;
	border-radius: 0;
}

.inov-flipbook:fullscreen .inov-fb-stagewrap {
	flex: 1 1 auto;
	height: auto;
}

.inov-flipbook.inov-fb--pseudo-full {
	position: fixed;
	inset: 0;
	z-index: 99999;
	width: 100vw;
	height: 100vh;
	border-radius: 0;
	display: flex;
	flex-direction: column;
}

.inov-flipbook.inov-fb--pseudo-full .inov-fb-stagewrap {
	flex: 1 1 auto;
	height: auto;
}

/* Responsive -------------------------------------------------------- */
@media ( max-width: 768px ) {
	.inov-fb-stagewrap { height: 60vh; }
	.inov-fb-arrow { width: 38px; height: 54px; font-size: 18px; }
}
