PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more / trunk
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more vtrunk
4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / assets / css / pdf-gallery.css
embedpress / assets / css Last commit date
fonts 9 months ago vendor 8 months ago admin-notices.css 2 months ago admin.build.css 2 months ago admin.css 7 months ago analytics.build.css 1 month ago blocks.build.css 1 week ago carousel.min.css 2 years ago custom-player.build.css 1 month ago el-icon.css 2 months ago embedpress-elementor.css 2 years ago embedpress.css 1 week ago ep-pdf-lightbox.css 2 months ago feature-notices.css 7 months ago font.css 7 years ago glider.min.css 2 years ago index.html 7 years ago instagram-shortcode-generator.css 1 month ago lazy-load.css 6 months ago meetup-events.css 7 months ago modal.css 8 months ago onboarding.build.css 2 months ago pdf-gallery.css 2 months ago plyr.css 9 months ago preview.css 6 years ago settings-icons.css 9 months ago settings.css 1 month ago
pdf-gallery.css
860 lines
1 /**
2 * EmbedPress PDF Gallery Styles
3 * Layouts: Grid, Masonry, Carousel, Bookshelf
4 * Popup/Lightbox with prev/next navigation
5 */
6
7 /* ============================================
8 1. Gallery Container
9 ============================================ */
10 .ep-pdf-gallery {
11 --ep-gallery-columns: var(--ep-gallery-columns-desktop, 3);
12 --ep-gallery-columns-tablet: 2;
13 --ep-gallery-columns-mobile: 1;
14 --ep-gallery-gap: 20px;
15 --ep-gallery-radius: 8px;
16 width: 100%;
17 }
18
19 /* ============================================
20 2. Grid Layout
21 ============================================ */
22 .ep-pdf-gallery[data-layout="grid"] .ep-pdf-gallery__grid {
23 display: grid;
24 grid-template-columns: repeat(var(--ep-gallery-columns), 1fr);
25 gap: var(--ep-gallery-gap);
26 }
27
28 /* ============================================
29 2b. Carousel Layout (editor preview — horizontal scroll)
30 ============================================ */
31 .ep-pdf-gallery[data-layout="carousel"] .ep-pdf-gallery__grid {
32 display: flex;
33 gap: var(--ep-gallery-gap);
34 overflow-x: auto;
35 scroll-snap-type: x mandatory;
36 padding-bottom: 8px;
37 }
38
39 .ep-pdf-gallery[data-layout="carousel"] .ep-pdf-gallery__grid > .ep-pdf-gallery__item,
40 .ep-pdf-gallery[data-layout="carousel"] .ep-pdf-gallery__grid > .ep-pdf-gallery-editor__add-btn {
41 flex: 0 0 var(--ep-carousel-slide-width, 280px);
42 scroll-snap-align: start;
43 min-width: 150px;
44 }
45
46 /* ============================================
47 3. Masonry Layout (CSS columns)
48 ============================================ */
49 .ep-pdf-gallery[data-layout="masonry"] .ep-pdf-gallery__grid {
50 display: block;
51 column-count: var(--ep-gallery-columns);
52 column-gap: var(--ep-gallery-gap);
53 }
54
55 .ep-pdf-gallery[data-layout="masonry"] .ep-pdf-gallery__item {
56 display: inline-block;
57 width: 100%;
58 break-inside: avoid;
59 margin-bottom: var(--ep-gallery-gap);
60 }
61
62 /* Masonry: let thumbnails use natural height instead of forced aspect ratio */
63 .ep-pdf-gallery[data-layout="masonry"] .ep-pdf-gallery__thumbnail-wrap {
64 aspect-ratio: auto !important;
65 }
66
67 .ep-pdf-gallery[data-layout="masonry"] .ep-pdf-gallery__thumbnail-wrap img {
68 width: 100%;
69 height: auto;
70 object-fit: contain;
71 }
72
73 /* ============================================
74 4. Gallery Items
75 ============================================ */
76 .ep-pdf-gallery__item {
77 cursor: pointer;
78 position: relative;
79 overflow: hidden;
80 border-radius: var(--ep-gallery-radius);
81 background: #f5f5f5;
82 transition: transform 0.2s ease, box-shadow 0.2s ease;
83 }
84
85 .ep-pdf-gallery__item:hover {
86 transform: translateY(-2px);
87 box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
88 }
89
90 .ep-pdf-gallery__thumbnail-wrap {
91 position: relative;
92 width: 100%;
93 overflow: hidden;
94 background: #e8e8e8;
95 }
96
97 /* Aspect ratios */
98 .ep-pdf-gallery__thumbnail-wrap[data-ratio="1:1"] { aspect-ratio: 1/1; }
99 .ep-pdf-gallery__thumbnail-wrap[data-ratio="4:3"] { aspect-ratio: 4/3; }
100 .ep-pdf-gallery__thumbnail-wrap[data-ratio="3:4"] { aspect-ratio: 3/4; }
101 .ep-pdf-gallery__thumbnail-wrap[data-ratio="16:9"] { aspect-ratio: 16/9; }
102
103 .ep-pdf-gallery__canvas,
104 .ep-pdf-gallery__thumbnail-wrap img {
105 width: 100%;
106 height: 100%;
107 object-fit: contain;
108 display: block;
109 }
110
111 /* Hover overlay */
112 .ep-pdf-gallery__overlay {
113 position: absolute;
114 inset: 0;
115 background: rgba(0, 0, 0, 0);
116 display: flex;
117 align-items: center;
118 justify-content: center;
119 transition: background 0.2s ease;
120 pointer-events: none;
121 }
122
123 .ep-pdf-gallery__item:hover .ep-pdf-gallery__overlay {
124 background: var(--ep-overlay-color, rgba(0, 0, 0, 0.35));
125 }
126
127 .ep-pdf-gallery__view-icon {
128 width: 44px;
129 height: 44px;
130 fill: #fff;
131 background-color: rgba(0, 0, 0, 0.6);
132 border-radius: 50%;
133 padding: 10px;
134 box-sizing: content-box;
135 opacity: 0;
136 transform: scale(0.8);
137 transition: opacity 0.2s ease, transform 0.2s ease;
138 }
139
140 .ep-pdf-gallery__item:hover .ep-pdf-gallery__view-icon {
141 opacity: 1;
142 transform: scale(1);
143 }
144
145 /* Always-show variant — overlay and icon visible without hover */
146 .ep-pdf-gallery__item--always-show .ep-pdf-gallery__overlay {
147 background: var(--ep-overlay-color, rgba(0, 0, 0, 0.35));
148 }
149
150 .ep-pdf-gallery__item--always-show .ep-pdf-gallery__view-icon {
151 opacity: 1;
152 transform: scale(1);
153 }
154
155 /* Play button shape — Elementor prefix classes */
156 .ep-play-shape-circle .ep-pdf-gallery__view-icon {
157 border-radius: 50%;
158 }
159
160 .ep-play-shape-rounded-square .ep-pdf-gallery__view-icon {
161 border-radius: 12px;
162 }
163
164 .ep-play-shape-none .ep-pdf-gallery__view-icon {
165 border-radius: 0;
166 }
167
168 /* Fallback placeholder for PDFs without thumbnails */
169 .ep-pdf-gallery__placeholder {
170 width: 100%;
171 height: 100%;
172 display: flex;
173 flex-direction: column;
174 align-items: center;
175 justify-content: center;
176 gap: 8px;
177 background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
178 color: #666;
179 padding: 12px;
180 }
181
182 .ep-pdf-gallery__placeholder svg {
183 width: 40px;
184 height: 48px;
185 flex-shrink: 0;
186 }
187
188 .ep-pdf-gallery__placeholder-name {
189 font-size: 11px;
190 font-weight: 500;
191 text-align: center;
192 overflow: hidden;
193 text-overflow: ellipsis;
194 white-space: nowrap;
195 max-width: 100%;
196 opacity: 0.7;
197 }
198
199 /* ============================================
200 5. Carousel Layout
201 ============================================ */
202 .ep-pdf-gallery[data-layout="carousel"] .ep-pdf-gallery__carousel {
203 position: relative;
204 overflow: hidden;
205 }
206
207 .ep-pdf-gallery__carousel-track {
208 display: flex;
209 transition: transform 0.4s ease;
210 }
211
212 .ep-pdf-gallery[data-layout="carousel"] .ep-pdf-gallery__item {
213 flex: 0 0 auto;
214 min-width: 0;
215 }
216
217 .ep-pdf-gallery__carousel-prev,
218 .ep-pdf-gallery__carousel-next {
219 position: absolute;
220 top: 50%;
221 transform: translateY(-50%);
222 z-index: 2;
223 background: rgba(255, 255, 255, 0.92);
224 border: 1px solid #ddd;
225 border-radius: 50%;
226 width: 40px;
227 height: 40px;
228 cursor: pointer;
229 display: flex;
230 align-items: center;
231 justify-content: center;
232 transition: opacity 0.2s, background 0.2s;
233 opacity: 0;
234 padding: 0;
235 }
236
237 .ep-pdf-gallery__carousel:hover .ep-pdf-gallery__carousel-prev,
238 .ep-pdf-gallery__carousel:hover .ep-pdf-gallery__carousel-next {
239 opacity: 1;
240 }
241
242 .ep-pdf-gallery__carousel-prev:hover,
243 .ep-pdf-gallery__carousel-next:hover {
244 background: #fff;
245 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
246 }
247
248 .ep-pdf-gallery__carousel-prev { left: 10px; }
249 .ep-pdf-gallery__carousel-next { right: 10px; }
250
251 .ep-pdf-gallery__carousel-prev svg,
252 .ep-pdf-gallery__carousel-next svg {
253 width: 18px;
254 height: 18px;
255 fill: #333;
256 }
257
258 .ep-pdf-gallery__carousel-dots {
259 display: flex;
260 justify-content: center;
261 gap: 8px;
262 margin-top: 16px;
263 }
264
265 .ep-pdf-gallery__carousel-dot {
266 width: 8px;
267 height: 8px;
268 border-radius: 50%;
269 background: #ccc;
270 border: none;
271 padding: 0;
272 cursor: pointer;
273 transition: background 0.2s;
274 }
275
276 .ep-pdf-gallery__carousel-dot.active {
277 background: #5b4e96;
278 }
279
280 /* ============================================
281 6. Popup / Lightbox
282 ============================================ */
283 .ep-pdf-gallery__popup {
284 position: fixed;
285 inset: 0;
286 z-index: 100000;
287 display: none;
288 }
289
290 .ep-pdf-gallery__popup.ep-pdf-gallery__popup--open {
291 display: flex;
292 }
293
294 .ep-pdf-gallery__popup-overlay {
295 position: absolute;
296 inset: 0;
297 background: rgba(0, 0, 0, 0.92);
298 display: flex;
299 align-items: center;
300 justify-content: center;
301 animation: epGalleryFadeIn 0.25s ease-out;
302 }
303
304 @keyframes epGalleryFadeIn {
305 from { opacity: 0; }
306 to { opacity: 1; }
307 }
308
309 .ep-pdf-gallery__popup-close {
310 position: absolute;
311 top: 15px;
312 right: 15px;
313 background: rgba(255, 255, 255, 0.12);
314 color: #fff;
315 border: none;
316 border-radius: 50%;
317 width: 44px;
318 height: 44px;
319 font-size: 24px;
320 cursor: pointer;
321 z-index: 3;
322 display: flex;
323 align-items: center;
324 justify-content: center;
325 transition: background 0.2s;
326 line-height: 1;
327 padding: 0;
328 }
329
330 .ep-pdf-gallery__popup-close:hover {
331 background: rgba(255, 255, 255, 0.25);
332 }
333
334 .ep-pdf-gallery__popup-prev,
335 .ep-pdf-gallery__popup-next {
336 position: absolute;
337 top: 50%;
338 transform: translateY(-50%);
339 background: rgba(255, 255, 255, 0.1);
340 color: #fff;
341 border: none;
342 padding: 14px 10px;
343 cursor: pointer;
344 z-index: 3;
345 border-radius: 6px;
346 transition: background 0.2s, opacity 0.2s;
347 }
348
349 .ep-pdf-gallery__popup-prev:hover,
350 .ep-pdf-gallery__popup-next:hover {
351 background: rgba(255, 255, 255, 0.22);
352 }
353
354 .ep-pdf-gallery__popup-prev { left: 12px; }
355 .ep-pdf-gallery__popup-next { right: 12px; }
356
357 .ep-pdf-gallery__popup-prev svg,
358 .ep-pdf-gallery__popup-next svg {
359 width: 24px;
360 height: 24px;
361 fill: #fff;
362 }
363
364 .ep-pdf-gallery__popup-prev.ep-hidden,
365 .ep-pdf-gallery__popup-next.ep-hidden {
366 opacity: 0.3;
367 pointer-events: none;
368 }
369
370 .ep-pdf-gallery__popup-counter {
371 position: absolute;
372 top: 20px;
373 left: 50%;
374 transform: translateX(-50%);
375 color: rgba(255, 255, 255, 0.8);
376 font-size: 14px;
377 font-weight: 500;
378 z-index: 3;
379 user-select: none;
380 }
381
382 .ep-pdf-gallery__popup-viewer {
383 width: 90vw;
384 height: 90vh;
385 max-width: 1400px;
386 position: relative;
387 }
388
389 .ep-pdf-gallery__popup-iframe {
390 width: 100%;
391 height: 100%;
392 border: none;
393 border-radius: 6px;
394 background: #fff;
395 }
396
397 /* ============================================
398 7. Loading / Skeleton
399 ============================================ */
400 .ep-pdf-gallery__canvas[data-loading="true"] {
401 background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
402 background-size: 200% 100%;
403 animation: epGalleryShimmer 1.5s infinite;
404 }
405
406 @keyframes epGalleryShimmer {
407 0% { background-position: 200% 0; }
408 100% { background-position: -200% 0; }
409 }
410
411 /* ============================================
412 8. Responsive
413 ============================================ */
414 @media (max-width: 1024px) {
415 .ep-pdf-gallery {
416 --ep-gallery-columns: var(--ep-gallery-columns-tablet, 2);
417 }
418
419 .ep-pdf-gallery__popup-viewer {
420 width: 95vw;
421 height: 90vh;
422 }
423
424 /* Bookshelf: smaller books on tablet */
425 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item {
426 flex: 0 0 120px;
427 width: 120px;
428 min-width: 120px;
429 }
430
431 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item {
432 flex: 0 0 120px;
433 width: 120px;
434 }
435
436 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item img,
437 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item canvas {
438 height: 150px;
439 }
440
441 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__add-btn {
442 flex: 0 0 120px;
443 width: 120px;
444 height: 180px;
445 }
446 }
447
448 @media (max-width: 767px) {
449 .ep-pdf-gallery {
450 --ep-gallery-columns: var(--ep-gallery-columns-mobile, 1);
451 }
452
453 .ep-pdf-gallery__popup-prev,
454 .ep-pdf-gallery__popup-next {
455 opacity: 1;
456 top: auto;
457 bottom: 12px;
458 transform: none;
459 padding: 10px 14px;
460 }
461
462 .ep-pdf-gallery__popup-prev { left: 16px; }
463 .ep-pdf-gallery__popup-next { right: 16px; }
464
465 .ep-pdf-gallery__popup-counter {
466 top: auto;
467 bottom: 18px;
468 }
469
470 .ep-pdf-gallery__popup-viewer {
471 width: 100vw;
472 height: calc(100vh - 60px);
473 max-width: none;
474 border-radius: 0;
475 margin-top: 0;
476 }
477
478 .ep-pdf-gallery__popup-close {
479 top: 8px;
480 right: 8px;
481 }
482
483 .ep-pdf-gallery__popup-iframe {
484 border-radius: 0;
485 }
486
487 .ep-pdf-gallery__carousel-prev,
488 .ep-pdf-gallery__carousel-next {
489 opacity: 1;
490 }
491
492 /* Bookshelf: smaller books on mobile */
493 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item {
494 flex: 0 0 100px;
495 width: 100px;
496 min-width: 100px;
497 }
498
499 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item {
500 flex: 0 0 100px;
501 width: 100px;
502 }
503
504 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item img,
505 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item canvas {
506 height: 120px;
507 }
508
509 .ep-pdf-gallery-editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__add-btn {
510 flex: 0 0 100px;
511 width: 100px;
512 height: 150px;
513 }
514 }
515
516 /* ============================================
517 9. Editor Styles (Gutenberg block editor)
518 Uses frontend classes with --editor modifier
519 ============================================ */
520
521 /* Editor: disable click-to-open behavior */
522 .ep-pdf-gallery--editor .ep-pdf-gallery__item {
523 cursor: default;
524 }
525
526 /* Editor: softer hover — don't lift items as much */
527 .ep-pdf-gallery--editor .ep-pdf-gallery__item:hover {
528 transform: translateY(-1px);
529 }
530
531 /* Editor: action buttons (move, remove, custom thumbnail) */
532 .ep-pdf-gallery-editor__item-actions {
533 position: absolute;
534 top: 6px;
535 right: 6px;
536 display: flex;
537 gap: 4px;
538 opacity: 0;
539 transition: opacity 0.15s;
540 z-index: 10;
541 }
542
543 .ep-pdf-gallery__item:hover .ep-pdf-gallery-editor__item-actions {
544 opacity: 1;
545 }
546
547 .ep-pdf-gallery-editor__item-btn {
548 background: rgba(0, 0, 0, 0.65);
549 color: #fff;
550 border: none;
551 border-radius: 4px;
552 width: 28px;
553 height: 28px;
554 cursor: pointer;
555 display: flex;
556 align-items: center;
557 justify-content: center;
558 padding: 0;
559 font-size: 14px;
560 line-height: 1;
561 transition: background 0.15s;
562 }
563
564 .ep-pdf-gallery-editor__item-btn:hover {
565 background: rgba(0, 0, 0, 0.85);
566 }
567
568 /* Editor: "Add PDF" button */
569 .ep-pdf-gallery-editor__add-btn {
570 display: flex;
571 align-items: center;
572 justify-content: center;
573 flex-direction: column;
574 border: 2px dashed #ccc;
575 border-radius: var(--ep-gallery-radius, 8px);
576 background: transparent;
577 cursor: pointer;
578 transition: border-color 0.2s, background 0.2s;
579 color: #999;
580 font-size: 13px;
581 gap: 6px;
582 min-height: 120px;
583 aspect-ratio: 4/3;
584 }
585
586 .ep-pdf-gallery-editor__add-btn:hover {
587 border-color: #5b4e96;
588 background: rgba(91, 78, 150, 0.05);
589 color: #5b4e96;
590 }
591
592 .ep-pdf-gallery-editor__add-btn svg {
593 width: 20px;
594 height: 20px;
595 fill: currentColor;
596 }
597
598 /* ============================================
599 9b. Editor Bookshelf Preview
600 ============================================ */
601
602 /* Editor bookshelf: reuse frontend shelf-row structure */
603 .ep-pdf-gallery--editor[data-layout="bookshelf"] .ep-pdf-gallery__bookshelf-container {
604 width: 100%;
605 }
606
607 /* Add PDF button row in editor bookshelf */
608 .ep-pdf-gallery--editor[data-layout="bookshelf"] .ep-pdf-gallery__shelf-add-row {
609 display: flex;
610 justify-content: center;
611 padding: 20px 0;
612 }
613
614 .ep-pdf-gallery--editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__add-btn {
615 flex: 0 0 120px;
616 width: 120px;
617 height: 180px;
618 aspect-ratio: auto;
619 border-radius: 4px !important;
620 }
621
622 /* Hide action buttons in bookshelf */
623 .ep-pdf-gallery--editor[data-layout="bookshelf"] .ep-pdf-gallery-editor__item-actions {
624 display: none;
625 }
626
627 /* ============================================
628 10. Bookshelf Layout — realistic shelf with book covers
629 ============================================ */
630
631 /* Book title — hidden by default, shown only in bookshelf */
632 .ep-pdf-gallery__book-title {
633 display: none;
634 }
635
636 /* Generic carousel track — keep for carousel layout */
637 .ep-pdf-gallery__carousel-track {
638 position: relative;
639 }
640
641 /* Outer gallery — clip the excess shelf overhang, not the books */
642 .ep-pdf-gallery[data-layout="bookshelf"] {
643 overflow: hidden;
644 }
645
646 /* Bookshelf container — multi-row shelves */
647 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__bookshelf-container {
648 width: 100%;
649 }
650
651 /* Each shelf row — books centered, gap from CSS variable */
652 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__shelf-row {
653 display: flex;
654 justify-content: center;
655 align-items: flex-end;
656 gap: var(--ep-gallery-gap, 40px);
657 position: relative;
658 padding: 10px 24px 0;
659 margin-bottom: 10px;
660 padding-bottom: 50px;
661 }
662
663 /* Shelf image per row — extends wider than the books so they never hang off */
664 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__shelf-row::after {
665 content: '';
666 position: absolute;
667 bottom: 10px;
668 left: -100px;
669 right: -100px;
670 height: 50px;
671 z-index: 0;
672 pointer-events: none;
673 background: url('../images/book-shelf-2.png') no-repeat center / 100% 100%;
674 }
675
676 /* Shelf style variants */
677 .ep-pdf-gallery[data-layout="bookshelf"][data-shelf-style="light-wood"] .ep-pdf-gallery__shelf-row::after {
678 background-image: url('../images/book-shelf-4.png');
679 }
680 .ep-pdf-gallery[data-layout="bookshelf"][data-shelf-style="glass"] .ep-pdf-gallery__shelf-row::after {
681 background-image: url('../images/book-shelf-1.png');
682 }
683
684 /* Book items — fixed width, aligned to bottom of shelf */
685 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item {
686 flex: 0 0 140px;
687 width: 140px;
688 min-width: 140px;
689 overflow: visible;
690 background: transparent;
691 border-radius: 0;
692 padding: 0;
693 display: flex;
694 flex-direction: column;
695 align-items: center;
696 position: relative;
697 z-index: 1;
698 perspective: 600px;
699 }
700
701 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item:hover {
702 transform: none;
703 box-shadow: none;
704 }
705
706 /* Book cover — 3D book with spine and pages */
707 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__thumbnail-wrap {
708 position: relative;
709 width: 100%;
710 aspect-ratio: 3 / 4;
711 overflow: visible;
712 border-radius: 2px calc(var(--ep-gallery-radius, 6px)) calc(var(--ep-gallery-radius, 6px)) 2px;
713 background: #e8e8e8;
714 box-shadow:
715 6px 6px 18px rgba(0, 0, 0, 0.30),
716 2px 2px 6px rgba(0, 0, 0, 0.15);
717 transition: transform 0.35s ease, box-shadow 0.35s ease;
718 z-index: 2;
719 padding: 0;
720 transform-style: preserve-3d;
721 transform: rotateY(-8deg);
722 transform-origin: left center;
723 }
724
725 /* Book spine — left edge with depth */
726 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__thumbnail-wrap::before {
727 content: '';
728 position: absolute;
729 top: 0;
730 left: 0;
731 width: 14px;
732 height: 100%;
733 background: linear-gradient(
734 to right,
735 rgba(0, 0, 0, 0.25) 0%,
736 rgba(0, 0, 0, 0.08) 30%,
737 rgba(255, 255, 255, 0.08) 70%,
738 rgba(0, 0, 0, 0.05) 100%
739 );
740 border-radius: 2px 0 0 2px;
741 z-index: 5;
742 pointer-events: none;
743 transform: translateZ(0);
744 }
745
746 /* Page edges — right side thickness */
747 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__thumbnail-wrap::after {
748 content: '';
749 position: absolute;
750 top: 3px;
751 right: -10px;
752 width: 10px;
753 height: calc(100% - 6px);
754 background: linear-gradient(
755 to right,
756 #f5f0e8 0%,
757 #ede7dd 20%,
758 #e8e2d8 40%,
759 #e0dace 60%,
760 #ddd7cb 80%,
761 #d8d2c6 100%
762 );
763 border-radius: 0 2px 2px 0;
764 transform: rotateY(30deg);
765 transform-origin: left center;
766 z-index: 1;
767 box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
768 }
769
770 /* Cover image */
771 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__thumbnail-wrap img {
772 border-radius: 2px 6px 6px 2px;
773 width: 100%;
774 height: 100%;
775 object-fit: contain;
776 display: block;
777 position: relative;
778 z-index: 2;
779 }
780
781 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__canvas {
782 border-radius: 2px 6px 6px 2px;
783 display: block;
784 width: 100%;
785 height: 100%;
786 object-fit: contain;
787 position: relative;
788 z-index: 2;
789 }
790
791 /* Cover shine/gloss effect */
792 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__overlay {
793 background: linear-gradient(
794 135deg,
795 rgba(255, 255, 255, 0.12) 0%,
796 rgba(255, 255, 255, 0) 40%,
797 rgba(0, 0, 0, 0) 60%,
798 rgba(0, 0, 0, 0.04) 100%
799 );
800 border-radius: 2px 6px 6px 2px;
801 margin: 0;
802 inset: 0;
803 width: auto;
804 height: auto;
805 z-index: 3;
806 transition: background 0.3s ease;
807 }
808
809 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item:hover .ep-pdf-gallery__overlay {
810 background: rgba(0, 0, 0, 0.2);
811 }
812
813 /* Hover: open the book slightly */
814 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item:hover .ep-pdf-gallery__thumbnail-wrap {
815 transform: rotateY(-16deg) translateY(-6px);
816 box-shadow:
817 10px 10px 28px rgba(0, 0, 0, 0.35),
818 4px 4px 10px rgba(0, 0, 0, 0.18);
819 }
820
821 /* View icon — circular badge on hover */
822 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__view-icon {
823 display: block;
824 width: 36px;
825 height: 36px;
826 opacity: 0;
827 transform: scale(0.6);
828 transition: opacity 0.25s ease, transform 0.25s ease;
829 z-index: 4;
830 fill: var(--ep-play-btn-color, #fff);
831 background: var(--ep-play-btn-bg, rgba(30, 115, 220, 0.85));
832 border-radius: 50%;
833 padding: 8px;
834 box-sizing: content-box;
835 }
836
837 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__item:hover .ep-pdf-gallery__view-icon {
838 opacity: 1;
839 transform: scale(1);
840 }
841
842 /* No play button pseudo-elements */
843 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__overlay::before,
844 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__overlay::after {
845 display: none;
846 }
847
848 /* Book title — hidden in bookshelf */
849 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__book-title {
850 display: none;
851 }
852
853 /* Bookshelf replaces carousel — hide any leftover carousel elements */
854 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__carousel-dots,
855 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__carousel-prev,
856 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__carousel-next,
857 .ep-pdf-gallery[data-layout="bookshelf"] .ep-pdf-gallery__carousel {
858 display: none !important;
859 }
860