/* MOOS Flipbook – Frontend-Styles */

.moos-fb-wrapper {
	margin: 1.5em auto;
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.moos-fb-stage {
	position: relative;
	width: 100%;
	min-height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 12px;
	box-sizing: border-box;
	border-radius: 8px;
	overflow: hidden;
}

.moos-fb-book {
	margin: 0 auto;
	transition: transform 0.2s ease;
	transform-origin: center center;
	max-width: 100%;
}

/* Schatten unter dem Buch für mehr Tiefe */
.moos-fb-book .stf__parent {
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.moos-fb-stage.moos-fb-zoomed {
	overflow: auto;
	align-items: flex-start;
}

/* Loader */
.moos-fb-loader {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: #fff;
	z-index: 5;
}

.moos-fb-loader-text {
	font-size: 14px;
	opacity: 0.9;
}

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

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

/* Werkzeugleiste */
.moos-fb-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 10px 12px;
	background: #1f1f1f;
	border-radius: 0 0 8px 8px;
}

.moos-fb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: none;
	border-radius: 6px;
	background: #3a3a3a;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.05s ease;
}

.moos-fb-btn:hover { background: #555; }
.moos-fb-btn:active { transform: translateY(1px); }
.moos-fb-btn.moos-fb-off { opacity: 0.45; }

.moos-fb-pageinfo {
	color: #fff;
	font-size: 14px;
	padding: 0 8px;
	min-width: 64px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

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

/* Vollbild */
.moos-fb-wrapper.moos-fb-isfull {
	background: #111;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.moos-fb-wrapper.moos-fb-isfull .moos-fb-stage {
	flex: 1 1 auto;
	border-radius: 0;
}

/* Hinweis im Backend bei Fehlern */
.moos-fb-error {
	padding: 12px 16px;
	background: #fff3f3;
	border: 1px solid #e6b3b3;
	color: #8a1f1f;
	border-radius: 6px;
	font-size: 14px;
}

@media (max-width: 600px) {
	.moos-fb-stage { padding: 12px 6px; }
	.moos-fb-btn { min-width: 34px; height: 34px; font-size: 15px; }
}

/* ============================================================
   Seitliche Blätterpfeile (nur Vollseite/Vollbild sichtbar)
   ============================================================ */
.moos-fb-nav {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	width: 54px;
	height: 54px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 34px;
	line-height: 50px;
	cursor: pointer;
	transition: background 0.15s ease;
}
.moos-fb-nav:hover { background: rgba(0, 0, 0, 0.65); }
.moos-fb-nav-prev { left: 18px; }
.moos-fb-nav-next { right: 18px; }

.moos-fb-fullpage-mode .moos-fb-nav,
.moos-fb-wrapper.moos-fb-isfull .moos-fb-nav {
	display: block;
}

/* ============================================================
   Vollseiten-Modus: eigenständige Flipbook-Seite (Direkt-Link)
   ============================================================ */
body.moos-flipbook-fullpage {
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.moos-fb-fullpage-mode {
	position: fixed;
	inset: 0;
	max-width: none !important;
	margin: 0;
	display: flex;
	flex-direction: column;
	z-index: 100000;
}
.moos-fb-fullpage-mode .moos-fb-stage {
	flex: 1 1 auto;
	border-radius: 0;
	min-height: 0;
}
.moos-fb-fullpage-mode .moos-fb-toolbar {
	border-radius: 0;
}

/* Platz für die WordPress-Adminleiste lassen, wenn eingeloggt */
body.admin-bar .moos-fb-fullpage-mode { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .moos-fb-fullpage-mode { top: 46px; }
}

/* ============================================================
   Echtes Browser-Vollbild eines eingebetteten Flipbooks
   ============================================================ */
.moos-fb-wrapper.moos-fb-isfull {
	max-width: none !important;
	display: flex;
	flex-direction: column;
	background: #2b2b2b;
}
.moos-fb-wrapper.moos-fb-isfull .moos-fb-stage {
	flex: 1 1 auto;
	border-radius: 0;
	min-height: 0;
}
