/**
 * Estilos para Custom PDF Flipbook Ultimate v4.0.0 (DearFlip PRO + Real3D PRO Suite)
 *
 * Incluye:
 * - Los 6 Modos de Visor: 3D WebGL, CSS 3D, 2D Flipbook, Swipe Viewer, Scroll Viewer y Simple Viewer
 * - Los 4 Layouts de Barra de Herramientas: Bottom Floating, Top Bar, Bottom Full y Minimal
 * - Buscador de Texto en PDF con resaltado (<mark>), Page Editor Overlays (YouTube/Vimeo/HTML) y Preview Mode Lock
 * - Encuadernación: Tapa Dura Realista 3D (Hardcover) y Cuaderno en Espiral 3D (Spiral)
 * - Estanterías 3D (Bookshelves) con acabados Madera, Moderna y Cristal
 */

.cpf-elementor-host,
.cpf-root {
	--cpf-accent: #3b82f6;
	--cpf-stage-padding: 20px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	flex: 1 1 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==========================================================================
   1. CONTENEDOR PRINCIPAL, SKINS Y MODOS DE APERTURA
   ========================================================================== */
.cpf-wrapper {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto 2rem auto;
	padding: 24px 18px 18px;
	border-radius: 18px;
	box-sizing: border-box;
	outline: none;
	user-select: none;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Layout Top Bar: invierte el orden para que la barra quede arriba */
.cpf-wrapper.cpf-toolbar-top-bar {
	padding-top: 12px;
}

.cpf-wrapper.cpf-toolbar-top-bar .cpf-controls {
	order: -1;
	margin-top: 4px;
	margin-bottom: 14px;
}

.cpf-wrapper.cpf-toolbar-bottom-full {
	padding-bottom: 0;
}

.cpf-wrapper.cpf-toolbar-bottom-full .cpf-controls {
	width: calc(100% + 36px);
	margin-left: -18px;
	margin-right: -18px;
	border-radius: 0 0 18px 18px;
	border-left: none;
	border-right: none;
	border-bottom: none;
	padding: 12px 20px;
}

.cpf-wrapper.cpf-toolbar-minimal .cpf-btn-label {
	display: none;
}

/* Modo Ancho/Alto Completo en Página */
.cpf-wrapper.cpf-mode-page-fullscreen {
	max-width: 100%;
	min-height: 85vh;
	border-radius: 0;
}

.cpf-wrapper.cpf-theme-dark {
	background: radial-gradient(circle at 50% 35%, #2a313d 0%, #161920 65%, #0f1117 100%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow:
		0 24px 56px rgba(0, 0, 0, 0.42),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
	color: #f1f3f5;
}

.cpf-wrapper.cpf-theme-light {
	background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f1f5f9 65%, #e2e8f0 100%);
	border: 1px solid rgba(15, 23, 42, 0.09);
	box-shadow:
		0 18px 44px rgba(15, 23, 42, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	color: #1e293b;
}

.cpf-wrapper.cpf-theme-glass {
	background: linear-gradient(145deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.72) 100%);
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	box-shadow:
		0 20px 48px rgba(0, 0, 0, 0.24),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
	color: #f1f3f5;
}

.cpf-wrapper.cpf-theme-transparent {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: inherit;
}

.cpf-wrapper:fullscreen {
	max-width: 100% !important;
	width: 100vw !important;
	height: 100vh !important;
	margin: 0 !important;
	border-radius: 0 !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 28px;
}

.cpf-progress-bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: rgba(128, 128, 128, 0.2);
	z-index: 25;
}

.cpf-progress-fill {
	height: 100%;
	background: var(--cpf-accent, #3b82f6);
	transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Toast de enlace compartido y Banner de Preview Mode */
.cpf-share-toast,
.cpf-preview-lock-banner {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translate(-50%, -20px);
	z-index: 50;
	background: rgba(16, 185, 129, 0.95);
	color: #ffffff;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	pointer-events: none;
}

.cpf-preview-lock-banner {
	top: auto;
	bottom: 78px;
	background: rgba(220, 38, 38, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.cpf-share-toast.is-visible,
.cpf-preview-lock-banner.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

/* ==========================================================================
   2. ESTANTERÍAS 3D (BOOKSHELVES) Y TARJETAS DE PORTADA 3D
   ========================================================================== */
.cpf-bookshelf-wrapper {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 2rem auto 3rem;
	padding: 28px 24px 0;
	box-sizing: border-box;
}

.cpf-bookshelf-grid {
	display: grid;
	grid-template-columns: repeat(var(--cpf-shelf-cols, 4), 1fr);
	gap: 28px;
	align-items: end;
	padding-bottom: 4px;
	position: relative;
	z-index: 2;
}

.cpf-shelf-plank {
	height: 24px;
	width: 100%;
	border-radius: 4px 4px 10px 10px;
	position: relative;
	z-index: 1;
	margin-top: -10px;
}

.cpf-shelf-wood .cpf-shelf-plank {
	background: linear-gradient(180deg, #8b5a2b 0%, #6b4226 55%, #4a2c18 100%);
	box-shadow: 0 18px 28px rgba(0, 0, 0, 0.45), inset 0 2px 3px rgba(255, 255, 255, 0.25);
}

.cpf-shelf-modern .cpf-shelf-plank {
	background: linear-gradient(180deg, #343a40 0%, #212529 100%);
	box-shadow: 0 16px 26px rgba(0, 0, 0, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.15);
}

.cpf-shelf-glass .cpf-shelf-plank {
	background: linear-gradient(180deg, rgba(200, 235, 255, 0.45) 0%, rgba(120, 190, 230, 0.25) 100%);
	border: 1px solid rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(8px);
	box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
}

.cpf-lightbox-trigger-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 240px;
	margin: 0 auto;
	padding: 12px;
	cursor: pointer;
	text-align: center;
	perspective: 900px;
}

.cpf-cover-preview.cpf-cover-3d-book {
	position: relative;
	width: 185px;
	min-height: 250px;
	background: linear-gradient(135deg, #2b303c 0%, #1a1d24 100%);
	border-radius: 3px 8px 8px 3px;
	box-shadow:
		-8px 12px 24px rgba(0, 0, 0, 0.42),
		4px 0 0 #e9ecef,
		7px 0 0 #dee2e6,
		inset 5px 0 10px rgba(255, 255, 255, 0.2);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	transform: rotateY(-10deg);
	transform-style: preserve-3d;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.cpf-lightbox-trigger-card:hover .cpf-cover-preview.cpf-cover-3d-book {
	transform: rotateY(-2deg) translateY(-8px) scale(1.04);
	box-shadow:
		-12px 20px 32px rgba(0, 0, 0, 0.48),
		5px 0 0 #f1f3f5,
		9px 0 0 #ced4da;
}

.cpf-book-spine {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 12px;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, rgba(255, 255, 255, 0.22) 50%, rgba(0, 0, 0, 0.2) 100%);
	z-index: 3;
	pointer-events: none;
}

.cpf-cover-canvas,
.cpf-cover-img {
	width: 100%;
	height: auto;
	display: block;
}

.cpf-cover-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 4;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 7px;
	border-radius: 99px;
}

.cpf-trigger-title {
	margin: 2px 0 10px;
	font-size: 15px;
	font-weight: 600;
}

.cpf-trigger-btn {
	background: var(--cpf-accent, #3b82f6);
	color: #ffffff !important;
	border: none;
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
	transition: filter 0.2s ease, transform 0.15s ease;
}

.cpf-trigger-btn:hover {
	filter: brightness(1.1);
}

.cpf-trigger-link {
	color: var(--cpf-accent, #3b82f6);
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

/* Modal Lightbox */
.cpf-wrapper.cpf-mode-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	max-width: 100vw;
	width: 100vw;
	height: 100vh;
	margin: 0;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.cpf-wrapper.cpf-mode-lightbox.is-lightbox-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.cpf-lightbox-close {
	position: absolute;
	top: 18px;
	right: 22px;
	z-index: 45;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cpf-lightbox-close:hover {
	background: #e03131;
	transform: rotate(90deg);
}

/* ==========================================================================
   3. ESCENARIO Y LOS 6 MODOS DE VISOR (3D WebGL / CSS3D / 2D / Swipe / Scroll / Simple)
   ========================================================================== */
.cpf-stage {
	position: relative;
	width: 100%;
	min-height: 440px;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
	padding: var(--cpf-stage-padding, 20px);
	box-sizing: border-box;
	flex: 1;
}

.cpf-viewer-3d .cpf-stage,
.cpf-viewer-css3d .cpf-stage {
	perspective: 2200px;
}

.cpf-viewer-3d .cpf-container {
	transform: rotateX(3.2deg);
	box-shadow: none !important;
	border-radius: 4px;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpf-viewer-css3d .cpf-container {
	transform: rotateX(2deg);
	box-shadow: none !important;
	border-radius: 4px;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpf-viewer-2d .cpf-container {
	box-shadow: none !important;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Centrado automático de portada y contraportada (elimina el hueco de página fantasma a los lados) */
.cpf-viewer-3d .cpf-container.cpf-on-front-cover {
	transform: rotateX(3.2deg) translateX(-25%);
}

.cpf-viewer-3d .cpf-container.cpf-on-back-cover {
	transform: rotateX(3.2deg) translateX(25%);
}

.cpf-viewer-css3d .cpf-container.cpf-on-front-cover {
	transform: rotateX(2deg) translateX(-25%);
}

.cpf-viewer-css3d .cpf-container.cpf-on-back-cover {
	transform: rotateX(2deg) translateX(25%);
}

.cpf-viewer-2d .cpf-container.cpf-on-front-cover {
	transform: translateX(-25%);
}

.cpf-viewer-2d .cpf-container.cpf-on-back-cover {
	transform: translateX(25%);
}

/* Las envolturas del motor PageFlip deben ser transparentes sin sombras artificiales */
.stf__wrapper,
.stf__parent,
.stf__block {
	background: transparent !important;
	box-shadow: none !important;
}

.cpf-webgl-curl-overlay,
canvas.cpf-webgl-curl-overlay,
.cpf-stage canvas.cpf-webgl-curl-overlay,
.cpf-stage > canvas {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
}

.cpf-wrapper:fullscreen .cpf-stage,
.cpf-wrapper.cpf-mode-lightbox .cpf-stage {
	flex: 1;
	max-height: calc(100vh - 110px);
}

.cpf-stage.is-zoomed {
	cursor: grab;
}

.cpf-stage.is-zoomed.is-panning {
	cursor: grabbing;
}

.cpf-zoom-viewport {
	transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
	transform-origin: center center;
	will-change: transform;
	width: 100%;
	display: flex;
	justify-content: center;
}

.cpf-stage.is-panning .cpf-zoom-viewport {
	transition: none;
}

.cpf-container {
	margin: 0 auto;
	box-shadow: none !important;
	background: transparent !important;
	border-radius: 3px;
}

/* MODO 4 y 6: SWIPE VIEWER y SIMPLE VIEWER (con proporción exacta del PDF) */
.cpf-container.cpf-slider-track,
.cpf-container.cpf-simple-track {
	position: relative;
	width: 100%;
	max-width: 1200px;
	min-height: 520px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	box-shadow: none;
}

.cpf-container.cpf-slider-track .cpf-page,
.cpf-container.cpf-simple-track .cpf-page {
	display: none;
	width: auto;
	height: min(84vh, 860px);
	max-height: calc(100vh - 110px);
	max-width: 100%;
	aspect-ratio: var(--cpf-page-aspect, 0.7071);
	border-radius: 6px;
	box-shadow:
		0 20px 48px rgba(0, 0, 0, 0.38),
		0 4px 12px rgba(0, 0, 0, 0.18);
}

/* En Lightbox / Modal a pantalla completa: maximizar altura y anchura útil para máxima legibilidad de fuentes pequeñas */
.cpf-wrapper.cpf-mode-lightbox .cpf-container.cpf-slider-track,
.cpf-wrapper.cpf-mode-lightbox .cpf-container.cpf-simple-track,
.cpf-wrapper.is-lightbox-open .cpf-container.cpf-slider-track,
.cpf-wrapper.is-lightbox-open .cpf-container.cpf-simple-track {
	max-width: 96vw;
	width: 100%;
}

.cpf-wrapper.cpf-mode-lightbox .cpf-container.cpf-slider-track .cpf-page,
.cpf-wrapper.cpf-mode-lightbox .cpf-container.cpf-simple-track .cpf-page,
.cpf-wrapper.is-lightbox-open .cpf-container.cpf-slider-track .cpf-page,
.cpf-wrapper.is-lightbox-open .cpf-container.cpf-simple-track .cpf-page {
	height: calc(100vh - 110px) !important;
	max-height: calc(100vh - 110px) !important;
	max-width: 94vw !important;
	width: auto !important;
}

.cpf-container.cpf-slider-track .cpf-page {
	animation: cpf-slide-fade 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpf-container.cpf-slider-track .cpf-page.is-active-slide,
.cpf-container.cpf-simple-track .cpf-page.is-active-slide {
	display: block;
}

@keyframes cpf-slide-fade {
	from {
		opacity: 0;
		transform: translateX(18px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

/* MODO 5: SCROLL / EMBED VIEWER (con proporción exacta del PDF y scrollbar estilizado) */
.cpf-container.cpf-embed-scroll {
	width: 100%;
	max-width: 820px;
	max-height: 74vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	padding: 24px 20px;
	background: rgba(15, 18, 24, 0.32);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.28);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.cpf-container.cpf-embed-scroll::-webkit-scrollbar {
	width: 8px;
}

.cpf-container.cpf-embed-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.cpf-container.cpf-embed-scroll::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.24);
	border-radius: 99px;
}

.cpf-container.cpf-embed-scroll .cpf-page {
	width: 100%;
	max-width: 680px;
	aspect-ratio: var(--cpf-page-aspect, 0.7071);
	min-height: 360px;
	margin: 0 auto;
	border-radius: 6px;
	box-shadow:
		0 14px 34px rgba(0, 0, 0, 0.34),
		0 3px 10px rgba(0, 0, 0, 0.18);
	flex-shrink: 0;
}

/* ==========================================================================
   4. HOJAS, PLIEGUE CENTRAL DEL LOMO (SPINE GUTTER), TAPA DURA 3D Y ESPIRAL
   ========================================================================== */
.cpf-page {
	position: relative;
	background-color: #ffffff;
	overflow: hidden;
	box-sizing: border-box;
	border: 1px solid rgba(0, 0, 0, 0.09);
}

.cpf-cover-hardcover .cpf-page.cpf-is-hardcover {
	border: 4px solid #1e2430;
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.16),
		inset 0 0 22px rgba(0, 0, 0, 0.26);
}

/* Cantos laterales de hojas y sombra interior del lomo */
.cpf-page.--left {
	border-right: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 3px 0 0 3px;
	box-shadow:
		-4px 8px 24px rgba(0, 0, 0, 0.18),
		inset -24px 0 36px -10px rgba(0, 0, 0, 0.22);
}

.cpf-page.--right {
	border-left: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 0 3px 3px 0;
	box-shadow:
		4px 8px 24px rgba(0, 0, 0, 0.18),
		inset 24px 0 36px -10px rgba(0, 0, 0, 0.22);
}

/* Sombra cilíndrica y brillo especular realista en el lomo central del libro abierto */
.cpf-page.--left::after,
.cpf-page.--right::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}

.cpf-page.--left::after {
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.03) 0%,
		rgba(255, 255, 255, 0) 12%,
		rgba(255, 255, 255, 0) 82%,
		rgba(255, 255, 255, 0.28) 91%,
		rgba(0, 0, 0, 0.08) 96%,
		rgba(0, 0, 0, 0.28) 100%
	);
}

.cpf-page.--right::after {
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.3) 0%,
		rgba(0, 0, 0, 0.09) 4%,
		rgba(255, 255, 255, 0.32) 9%,
		rgba(255, 255, 255, 0) 18%,
		rgba(255, 255, 255, 0) 88%,
		rgba(0, 0, 0, 0.03) 100%
	);
}

.cpf-spiral-rings {
	position: absolute;
	top: 12px;
	bottom: 12px;
	width: 18px;
	z-index: 6;
	pointer-events: none;
	background-image: repeating-linear-gradient(
		to bottom,
		transparent 0px,
		transparent 14px,
		#495057 14px,
		#ced4da 17px,
		#212529 20px,
		transparent 21px
	);
}

.cpf-page.--left .cpf-spiral-rings {
	right: 0;
}

.cpf-page.--right .cpf-spiral-rings {
	left: 0;
}

.cpf-canvas {
	position: relative;
	z-index: 2;
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	background-color: #ffffff;
	opacity: 0;
	transition: opacity 0.24s ease-out;
	image-rendering: auto;
}

.cpf-page.is-rendered .cpf-canvas {
	opacity: 1;
}

/* Capa de Hipervínculos y Page Editor Overlays */
.cpf-annotation-layer {
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: auto;
	transition: opacity 0.15s ease;
}

.cpf-container.is-flipping .cpf-annotation-layer {
	opacity: 0;
	pointer-events: none;
}

.cpf-pdf-link {
	position: absolute;
	display: block;
	border-radius: 3px;
	background: rgba(59, 130, 246, 0.04);
	border-bottom: 1px dashed rgba(59, 130, 246, 0.35);
	cursor: pointer;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cpf-pdf-link:hover {
	background: rgba(59, 130, 246, 0.22);
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}

/* Elementos Multimedia / HTML del Page Editor Add-on */
.cpf-page-editor-item {
	position: absolute;
	z-index: 5;
	box-sizing: border-box;
	pointer-events: auto;
}

.cpf-page-cta {
	background: var(--cpf-accent, #3b82f6);
	color: #ffffff !important;
	padding: 8px 14px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none !important;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Esqueleto de carga editorial con efecto Shimmer suave */
.cpf-page-placeholder {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 10px;
	background: linear-gradient(
		110deg,
		#f8fafc 8%,
		#f1f5f9 18%,
		#f8fafc 33%
	);
	background-size: 200% 100%;
	animation: cpf-shimmer 1.6s linear infinite;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

@keyframes cpf-shimmer {
	to {
		background-position-x: -200%;
	}
}

.cpf-page.is-rendered .cpf-page-placeholder {
	display: none;
}

.cpf-page-number-badge {
	position: absolute;
	bottom: 10px;
	right: 14px;
	z-index: 4;
	font-size: 11px;
	font-weight: 600;
	color: rgba(15, 23, 42, 0.55);
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(4px);
	padding: 2px 7px;
	border-radius: 99px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	pointer-events: none;
}

.cpf-page.--left .cpf-page-number-badge {
	right: auto;
	left: 14px;
}

/* ==========================================================================
   5. CAJÓN LATERAL: MINIATURAS, ÍNDICE (TOC) Y BUSCADOR DE TEXTO
   ========================================================================== */
.cpf-sidebar {
	position: absolute;
	top: 4px;
	left: 0;
	bottom: 0;
	width: 310px;
	max-width: 85vw;
	z-index: 35;
	background: rgba(20, 23, 29, 0.96);
	backdrop-filter: blur(12px);
	border-right: 1px solid rgba(255, 255, 255, 0.12);
	display: flex;
	flex-direction: column;
	transform: translateX(-102%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	color: #f1f3f5;
}

.cpf-sidebar.is-open {
	transform: translateX(0);
	box-shadow: 14px 0 36px rgba(0, 0, 0, 0.45);
}

.cpf-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cpf-sidebar-tabs {
	display: flex;
	gap: 5px;
}

.cpf-tab-btn {
	background: rgba(255, 255, 255, 0.08);
	color: #ced4da;
	border: none;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.cpf-tab-btn.is-active {
	background: var(--cpf-accent, #3b82f6);
	color: #ffffff;
}

.cpf-sidebar-close {
	background: transparent;
	border: none;
	color: #adb5bd;
	font-size: 16px;
	cursor: pointer;
	padding: 4px 8px;
}

.cpf-sidebar-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
}

.cpf-tab-panel {
	display: none;
}

.cpf-tab-panel.is-active {
	display: block;
}

/* Buscador de texto en el PDF */
.cpf-search-box {
	display: flex;
	gap: 6px;
	margin-bottom: 12px;
}

.cpf-search-input {
	flex: 1;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	padding: 7px 10px;
	color: #ffffff;
	font-size: 13px;
}

.cpf-search-submit {
	background: var(--cpf-accent, #3b82f6);
	border: none;
	border-radius: 6px;
	padding: 0 12px;
	color: #ffffff;
	cursor: pointer;
}

.cpf-search-results {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cpf-search-result-item {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 9px 11px;
	text-align: left;
	color: #e9ecef;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	line-height: 1.4;
}

.cpf-search-result-item:hover {
	border-color: var(--cpf-accent, #3b82f6);
	background: rgba(59, 130, 246, 0.12);
}

.cpf-search-result-item mark {
	background: rgba(250, 204, 21, 0.35);
	color: #fde047;
	padding: 0 2px;
	border-radius: 2px;
}

.cpf-search-info {
	font-size: 12px;
	color: #adb5bd;
	text-align: center;
}

.cpf-thumbs-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.cpf-thumb-item {
	background: rgba(255, 255, 255, 0.04);
	border: 2px solid transparent;
	border-radius: 8px;
	padding: 8px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #dee2e6;
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.cpf-thumb-item:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.25);
}

.cpf-thumb-item.is-current {
	border-color: var(--cpf-accent, #3b82f6);
	background: rgba(59, 130, 246, 0.14);
}

.cpf-thumb-box {
	width: 100%;
	min-height: 120px;
	background: #ffffff;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cpf-thumb-box canvas {
	width: 100%;
	height: auto;
	display: block;
}

.cpf-thumb-label {
	font-size: 11px;
	font-weight: 500;
}

.cpf-toc-tree {
	list-style: none;
	margin: 0 0 10px 0;
	padding-left: 8px;
}

.cpf-toc-link {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-align: left;
	background: transparent;
	border: none;
	color: #e9ecef;
	padding: 7px 10px;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cpf-toc-link small {
	opacity: 0.6;
	font-size: 11px;
}

.cpf-toc-link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--cpf-accent, #3b82f6);
}

/* ==========================================================================
   6. LOADER Y BARRA DE CONTROLES
   ========================================================================== */
.cpf-loader {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 14px;
	background: rgba(20, 23, 28, 0.88);
	backdrop-filter: blur(4px);
	color: #f1f3f5;
	font-size: 15px;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cpf-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.cpf-spinner,
.cpf-page-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: var(--cpf-accent, #3b82f6);
	border-radius: 50%;
	animation: cpf-spin 0.8s linear infinite;
}

.cpf-page-spinner {
	width: 24px;
	height: 24px;
	border-color: rgba(0, 0, 0, 0.12);
	border-top-color: var(--cpf-accent, #3b82f6);
}

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

.cpf-controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 7px;
	margin-top: 16px;
	padding: 9px 16px;
	background: rgba(15, 23, 42, 0.86);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
	backdrop-filter: blur(14px) saturate(160%);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	box-shadow: none;
}

.cpf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.09);
	color: #ffffff !important;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	padding: 7px 13px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cpf-btn:hover,
.cpf-btn.is-active {
	background: var(--cpf-accent, #3b82f6);
	border-color: var(--cpf-accent, #3b82f6);
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.cpf-btn:focus-visible,
.cpf-side-arrow:focus-visible,
.cpf-page-input:focus-visible {
	outline: 2px solid var(--cpf-accent, #3b82f6);
	outline-offset: 2px;
}

.cpf-btn:active {
	transform: scale(0.95);
}

.cpf-btn-icon {
	padding: 7px 10px;
	font-size: 14px;
}

.cpf-btn-icon.is-muted {
	opacity: 0.5;
}

.cpf-zoom-badge {
	font-size: 12px;
	font-weight: 600;
	color: #dee2e6;
	min-width: 42px;
	text-align: center;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 6px;
}

.cpf-zoom-badge:hover {
	background: rgba(255, 255, 255, 0.12);
}

.cpf-controls-divider {
	width: 1px;
	height: 20px;
	background: rgba(255, 255, 255, 0.18);
	margin: 0 2px;
}

.cpf-page-indicator {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #e9ecef;
	font-size: 13px;
	font-weight: 600;
	padding: 0 4px;
}

.cpf-page-input {
	width: 48px;
	padding: 4px 6px;
	text-align: center;
	background: rgba(0, 0, 0, 0.42);
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 6px;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	transition: border-color 0.2s ease, background 0.2s ease;
	-moz-appearance: textfield;
}

.cpf-page-input:focus {
	background: rgba(0, 0, 0, 0.65);
	border-color: var(--cpf-accent, #3b82f6);
}

.cpf-page-input::-webkit-outer-spin-button,
.cpf-page-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cpf-notice {
	padding: 16px 20px;
	border-radius: 8px;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	color: #664d03;
	font-size: 14px;
	margin: 1rem 0;
}

.cpf-error {
	padding: 16px 24px;
	border-radius: 8px;
	background: rgba(220, 53, 69, 0.15);
	border: 1px solid rgba(220, 53, 69, 0.4);
	color: #ff8787;
	max-width: 480px;
	text-align: center;
	line-height: 1.5;
}

/* ==========================================================================
   7. NOVEDADES v5.0 ENTERPRISE (TOOLS MENU, SHARE MODAL, FLECHAS REDONDAS,
      MINIMAL VIEW, CORNER CURL, DRAG-TO-PAN, CAPTIONS Y RTL SIDEBAR)
   ========================================================================== */

/* Flechas laterales redondas por defecto (Real3D 5.4) */
.cpf-side-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 18;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(20, 23, 29, 0.72);
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	backdrop-filter: blur(6px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.cpf-side-arrow:hover {
	background: var(--cpf-accent, #3b82f6);
	border-color: var(--cpf-accent, #3b82f6);
	transform: translateY(-50%) scale(1.08);
}

.cpf-side-prev {
	left: 10px;
}

.cpf-side-next {
	right: 10px;
}

/* Menú desplegable "Tools (⋯)" (Real3D 5.5 / 3.79) */
.cpf-tools-menu-wrap {
	position: relative;
	display: inline-flex;
}

.cpf-tools-dropdown {
	position: absolute;
	bottom: calc(100% + 10px);
	right: 0;
	min-width: 195px;
	background: rgba(20, 23, 29, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 12px;
	padding: 6px;
	z-index: 45;
	backdrop-filter: blur(12px);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.cpf-toolbar-top-bar .cpf-tools-dropdown {
	bottom: auto;
	top: calc(100% + 10px);
}

.cpf-tools-dropdown[hidden] {
	display: none !important;
}

.cpf-tools-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 12px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #f1f3f5 !important;
	font-size: 13px;
	font-weight: 500;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cpf-tools-item:hover,
.cpf-tools-item.is-active {
	background: var(--cpf-accent, #3b82f6);
	color: #ffffff !important;
}

/* Modal / Popover de Compartir en Redes Sociales (Real3D 4.9.7 / DearFlip 2.3.67) */
.cpf-share-modal {
	position: absolute;
	bottom: 74px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 48;
	width: 320px;
	max-width: 92vw;
	background: rgba(20, 23, 29, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 14px;
	padding: 14px;
	color: #ffffff;
	backdrop-filter: blur(14px);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.cpf-share-modal[hidden] {
	display: none !important;
}

.cpf-share-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 13px;
}

.cpf-share-modal-close {
	background: transparent;
	border: none;
	color: #adb5bd;
	cursor: pointer;
	font-size: 15px;
}

.cpf-share-networks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 7px;
}

.cpf-share-net-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.07);
	color: #f8f9fa;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.12s ease;
}

.cpf-share-net-btn:hover {
	background: var(--cpf-accent, #3b82f6);
	border-color: var(--cpf-accent, #3b82f6);
	transform: translateY(-1px);
}

/* Minimal View para contenedores pequeños (Real3D 5.4 / 4.19) */
.cpf-minimal-expand-btn {
	display: none;
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 30;
	background: rgba(20, 23, 29, 0.88);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.cpf-wrapper.is-minimal-view .cpf-controls,
.cpf-wrapper.is-minimal-view .cpf-side-arrow {
	display: none !important;
}

.cpf-wrapper.is-minimal-view .cpf-minimal-expand-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Levantamiento de esquinas en Hover (Corner Curl - Real3D 5.3) */
.cpf-corner-curl {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 34px;
	height: 34px;
	z-index: 7;
	pointer-events: auto;
	cursor: pointer;
	background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.12) 50%, #f1f3f5 58%, #dee2e6 100%);
	border-top-left-radius: 6px;
	box-shadow: -3px -3px 8px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: scale(0.5);
	transform-origin: bottom right;
	transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpf-page.--left .cpf-corner-curl {
	right: auto;
	left: 0;
	background: linear-gradient(225deg, transparent 50%, rgba(0, 0, 0, 0.12) 50%, #f1f3f5 58%, #dee2e6 100%);
	border-top-left-radius: 0;
	border-top-right-radius: 6px;
	transform-origin: bottom left;
}

.cpf-page:hover .cpf-corner-curl {
	opacity: 0.92;
	transform: scale(1);
}

/* Drag-to-Pan cuando hay Zoom activo (Real3D 5.3 / 5.0.4 / 5.1.3) */
.cpf-zoom-viewport.is-zoomed {
	cursor: grab;
}

.cpf-zoom-viewport.is-zoomed.is-panning {
	cursor: grabbing;
	transition: none !important;
}

/* Leyendas por página (Page Captions - Real3D 4.9.6) */
.cpf-page-caption-badge {
	position: absolute;
	bottom: 8px;
	left: 12px;
	z-index: 6;
	background: rgba(20, 23, 29, 0.78);
	color: #ffffff;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 999px;
	cursor: help;
	pointer-events: auto;
	backdrop-filter: blur(4px);
}

.cpf-page-caption-tooltip {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	min-width: 180px;
	max-width: 260px;
	background: rgba(15, 23, 42, 0.95);
	color: #f8f9fa;
	padding: 7px 10px;
	border-radius: 8px;
	font-size: 11px;
	line-height: 1.4;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.18s ease, visibility 0.18s ease;
	pointer-events: none;
}

.cpf-page-caption-badge:hover .cpf-page-caption-tooltip {
	opacity: 1;
	visibility: visible;
}

/* Soporte RTL para el panel lateral (abre a la derecha - Real3D 5.0.4) */
.cpf-wrapper.cpf-is-rtl .cpf-sidebar {
	left: auto;
	right: 0;
	border-right: none;
	border-left: 1px solid rgba(255, 255, 255, 0.12);
	transform: translateX(102%);
}

.cpf-wrapper.cpf-is-rtl .cpf-sidebar.is-open {
	transform: translateX(0);
	box-shadow: -14px 0 36px rgba(0, 0, 0, 0.45);
}

/* Fondo sólido en Fullscreen para libros con tema Glass en iOS (Real3D 5.4 / DearFlip 1.6.1) */
.cpf-wrapper.cpf-theme-glass:fullscreen,
.cpf-wrapper.cpf-theme-glass.is-lightbox-open {
	background: radial-gradient(circle at center, #1e2229 0%, #111318 100%) !important;
}

/* Adaptación por ancho real del contenedor (Simulador Tablet 768px y Dispositivos Tablet) */
.cpf-wrapper.cpf-is-tablet-layout {
	padding: 18px 12px 14px;
	border-radius: 14px;
}

.cpf-wrapper.cpf-is-tablet-layout .cpf-stage {
	min-height: 360px;
	padding: 12px 8px;
}

.cpf-wrapper.cpf-is-tablet-layout .cpf-btn-label {
	display: none;
}

.cpf-wrapper.cpf-is-tablet-layout .cpf-controls {
	padding: 8px 12px;
	gap: 6px;
}

/* Adaptación por ancho real del contenedor (Simulador Teléfono 375px y Smartphones reales) */
.cpf-wrapper.cpf-is-mobile-layout {
	padding: 12px 6px 10px;
	border-radius: 12px;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-stage {
	min-height: 280px;
	padding: 8px 4px;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-btn-label,
.cpf-wrapper.cpf-is-mobile-layout .cpf-controls-divider,
.cpf-wrapper.cpf-is-mobile-layout [data-action="first"],
.cpf-wrapper.cpf-is-mobile-layout [data-action="last"],
.cpf-wrapper.cpf-is-mobile-layout .cpf-zoom-badge {
	display: none !important;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-controls {
	flex-wrap: nowrap;
	max-width: calc(100% - 8px);
	overflow-x: auto;
	padding: 6px 10px;
	gap: 4px;
	margin-top: 10px;
	border-radius: 999px;
	scrollbar-width: none;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-controls::-webkit-scrollbar {
	display: none;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-btn {
	padding: 6px 9px;
	font-size: 12px;
	flex-shrink: 0;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-page-input {
	width: 36px;
	padding: 3px 4px;
	font-size: 12px;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-page-indicator {
	font-size: 12px;
	flex-shrink: 0;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-side-arrow {
	width: 32px;
	height: 32px;
	font-size: 18px;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-side-prev {
	left: 4px;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-side-next {
	right: 4px;
}

.cpf-wrapper.cpf-is-mobile-layout .cpf-sidebar {
	width: 100%;
	max-width: 100%;
}

@media (max-width: 768px) {
	.cpf-bookshelf-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.cpf-wrapper {
		padding: 12px 6px 10px;
		border-radius: 12px;
	}
	.cpf-stage {
		min-height: 280px;
		padding: 8px 4px;
	}
	.cpf-btn-label,
	.cpf-controls-divider {
		display: none;
	}
	.cpf-controls {
		flex-wrap: nowrap;
		max-width: calc(100% - 8px);
		overflow-x: auto;
		padding: 6px 10px;
		gap: 4px;
	}
	/* Buscador y panel lateral a ancho completo en móviles */
	.cpf-sidebar {
		width: 100%;
		max-width: 100vw;
	}
	.cpf-wrapper.cpf-hide-mobile-pagenum .cpf-page-indicator {
		display: none;
	}
	.cpf-side-arrow {
		width: 32px;
		height: 32px;
		font-size: 18px;
	}
}

/* ==========================================================================
   MODO LECTURA PARA SMARTPHONES EN VERTICAL (SWIPE TÁCTIL Y 100% DE PANTALLA)
   ========================================================================== */
.cpf-wrapper.cpf-smartphone-portrait-mode {
	padding-left: 2px !important;
	padding-right: 2px !important;
}

.cpf-wrapper.cpf-smartphone-portrait-mode .cpf-side-arrow {
	display: none !important;
}

.cpf-wrapper.cpf-smartphone-portrait-mode .cpf-stage {
	padding: 4px 0 !important;
	min-height: unset !important;
	width: 100% !important;
}

.cpf-wrapper.cpf-smartphone-portrait-mode .cpf-zoom-viewport {
	width: 100% !important;
	padding: 0 !important;
	display: flex;
	justify-content: center;
}

.cpf-wrapper.cpf-smartphone-portrait-mode .cpf-container.cpf-slider-track {
	min-height: unset !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 auto !important;
	padding: 0 !important;
}

.cpf-wrapper.cpf-smartphone-portrait-mode .cpf-container.cpf-slider-track .cpf-page {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	margin: 0 auto !important;
	border-radius: 4px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12) !important;
}

.cpf-wrapper.cpf-smartphone-portrait-mode .cpf-container.cpf-slider-track .cpf-page canvas {
	width: 100% !important;
	height: auto !important;
	display: block;
}

@media (max-width: 640px) and (orientation: portrait) {
	.cpf-wrapper .cpf-side-arrow {
		display: none !important;
	}
	.cpf-container.cpf-slider-track {
		min-height: unset !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	.cpf-container.cpf-slider-track .cpf-page {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
	}
}

/* ==========================================================================
   TABLA / DIRECTORIO DE DOCUMENTOS PDF (Circolink & Resources Style)
   ========================================================================== */
.cpf-pdf-table-wrapper {
	margin: 28px 0;
	width: 100%;
	font-family: inherit;
	--cpf-table-header-bg: #0b5c39;
}

.cpf-table-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}

.cpf-table-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.cpf-table-tab {
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 600;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	background: #ffffff;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
}

.cpf-table-tab:hover:not(.is-active) {
	background: #f1f5f9;
	color: #0f172a;
	border-color: #94a3b8;
}

.cpf-table-tab.is-active {
	background: var(--cpf-table-header-bg, #0b5c39);
	color: #ffffff;
	border-color: var(--cpf-table-header-bg, #0b5c39);
	box-shadow: 0 2px 4px rgba(11, 92, 57, 0.2);
}

.cpf-table-search-box {
	display: flex;
	align-items: center;
}

.cpf-table-search-input {
	padding: 7px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	font-size: 13px;
	outline: none;
	width: 220px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cpf-table-search-input:focus {
	border-color: var(--cpf-table-header-bg, #0b5c39);
	box-shadow: 0 0 0 2px rgba(11, 92, 57, 0.15);
}

.cpf-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	border: 1px solid #e2e8f0;
	background: #ffffff;
}

.cpf-pdf-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 14px;
	margin: 0 !important;
}

.cpf-pdf-table thead {
	background: var(--cpf-table-header-bg, #0b5c39);
	color: #ffffff;
}

.cpf-pdf-table th {
	padding: 13px 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #ffffff !important;
	border: none !important;
}

.cpf-pdf-table td {
	padding: 15px 20px;
	border-top: 1px solid #f1f5f9;
	border-bottom: 1px solid #e2e8f0;
	vertical-align: middle;
	color: #334155;
	border-left: none;
	border-right: none;
}

.cpf-pdf-table .cpf-table-row:hover td {
	background-color: #f8fafc;
}

.cpf-pdf-table th.cpf-col-title,
.cpf-pdf-table td.cpf-col-title {
	width: 58%;
	min-width: 220px;
}

.cpf-pdf-table th.cpf-col-type,
.cpf-pdf-table td.cpf-col-type {
	width: 18%;
	white-space: nowrap;
}

.cpf-pdf-table th.cpf-col-views,
.cpf-pdf-table td.cpf-col-views {
	width: 12%;
	white-space: nowrap;
}

.cpf-pdf-table th.cpf-col-action,
.cpf-pdf-table td.cpf-col-action {
	width: 24%;
	text-align: right !important;
	white-space: nowrap;
}

.cpf-table-title-btn {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	color: var(--cpf-table-header-bg, #0b5c39) !important;
	font-weight: 700;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	text-decoration: none !important;
	display: inline;
	line-height: 1.4;
	transition: opacity 0.15s ease;
}

.cpf-table-title-btn:hover {
	text-decoration: underline !important;
	opacity: 0.85;
}

.cpf-table-type-label {
	font-size: 13px;
	color: #64748b;
	font-weight: 500;
}

.cpf-table-actions-group {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
}

.cpf-table-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #334155 !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cpf-table-btn:hover {
	background: var(--cpf-table-header-bg, #0b5c39) !important;
	color: #ffffff !important;
	border-color: var(--cpf-table-header-bg, #0b5c39) !important;
	box-shadow: 0 2px 6px rgba(11, 92, 57, 0.25);
}

.cpf-table-download-btn {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #475569 !important;
}

.cpf-table-download-btn:hover {
	background: var(--cpf-table-header-bg, #0b5c39) !important;
	color: #ffffff !important;
	border-color: var(--cpf-table-header-bg, #0b5c39) !important;
}

@media (max-width: 640px) {
	.cpf-table-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.cpf-table-search-input {
		width: 100%;
	}
	.cpf-pdf-table th,
	.cpf-pdf-table td {
		padding: 10px 12px;
		font-size: 13px;
	}
}

.cpf-table-modals-container {
	height: 0;
	overflow: visible;
}

.cpf-table-modals-container .cpf-lightbox-trigger-card {
	display: none !important;
}

/* ==========================================================================
   16. VISOR DESTACADO INTEGRADO SOBRE LA TABLA (FEATURED VIEWER)
   ========================================================================== */
.cpf-table-featured-stage {
	background: transparent !important;
	border-radius: 0;
	margin-bottom: 24px;
	box-shadow: none !important;
	overflow: visible;
	border: none !important;
}

.cpf-table-featured-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 4px 12px 4px;
	background: transparent !important;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	margin-bottom: 12px;
}

.cpf-table-featured-header-left {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.cpf-table-featured-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #64748b;
}

.cpf-table-toggle-viewer-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #475569;
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	cursor: pointer;
	line-height: 1.4;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	outline: none;
}

.cpf-table-toggle-viewer-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
	border-color: #94a3b8;
}

.cpf-table-toggle-viewer-btn:focus-visible {
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.cpf-table-toggle-viewer-btn .cpf-toggle-viewer-icon {
	font-size: 8px;
	line-height: 1;
	display: inline-block;
	color: #64748b;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cpf-table-featured-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #ffffff;
	background: var(--cpf-table-header-bg, #0b5c39);
	padding: 4px 10px;
	border-radius: 999px;
}

.cpf-table-featured-title {
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 70%;
	text-align: right;
	transition: opacity 0.15s ease;
}

.cpf-table-featured-stage.is-collapsed {
	margin-bottom: 12px;
}

.cpf-table-featured-viewports {
	position: relative;
	width: 100%;
	background: transparent !important;
	transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
	max-height: 1600px;
	opacity: 1;
	overflow: visible;
}

.cpf-table-featured-stage.is-collapsed .cpf-table-featured-viewports {
	max-height: 0 !important;
	opacity: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
	visibility: hidden;
}

.cpf-table-featured-item {
	width: 100%;
	background: transparent !important;
	opacity: 0;
	transform: scale(0.992);
	transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.cpf-table-featured-item.is-active-item {
	opacity: 1;
	transform: scale(1);
}

/* El visor dentro del contenedor superior se muestra sin marco oscuro ni fondo ni barra gris de progreso */
.cpf-table-featured-stage .cpf-wrapper {
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	margin: 0 auto !important;
	padding-top: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.cpf-table-featured-stage .cpf-progress-bar {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	height: 0 !important;
	pointer-events: none !important;
}

.cpf-table-featured-stage .cpf-stage {
	padding-top: 8px !important;
}

.cpf-wrapper.cpf-theme-transparent .cpf-progress-bar {
	background: transparent !important;
}

.cpf-table-featured-stage .cpf-controls,
.cpf-wrapper.cpf-theme-transparent .cpf-controls {
	box-shadow: none !important;
}

/* Fila de tabla actualmente activa en el visor superior */
.cpf-table-row.is-selected-row {
	background-color: #f0fdf4 !important;
}

.cpf-table-row.is-selected-row td {
	border-top: 1px solid #bbf7d0;
	border-bottom: 1px solid #bbf7d0;
}

.cpf-table-row.is-selected-row td:first-child {
	border-left: 3px solid var(--cpf-table-header-bg, #0b5c39);
}

.cpf-table-row.is-selected-row .cpf-table-view-btn {
	background: var(--cpf-table-header-bg, #0b5c39) !important;
	color: #ffffff !important;
	border-color: var(--cpf-table-header-bg, #0b5c39) !important;
}
