/*
 * Real 3D Flipbook — iOS swipe fix (CSS half)
 *
 * The plugin's IScroll runs with preventDefault:false + eventPassthrough:'vertical',
 * which on iOS means even a slightly-diagonal horizontal swipe can be picked up
 * as a page scroll because the browser's gesture detector is biased toward
 * vertical at the very first frame of motion.
 *
 * pan-y pinch-zoom tells the browser:
 *   - vertical native panning IS allowed -> user can scroll the page past
 *     the book (this was broken in v1.0 of the fix; v1.1 restores it)
 *   - horizontal native panning is NOT allowed -> the browser will not
 *     hijack a horizontal swipe; the plugin's own IScroll handles it
 *   - pinch-zoom stays available -> plugin's zoom UI still works
 *
 * Same pattern Swiper.js / Slick use for horizontal carousels embedded in
 * vertically-scrolling pages.
 */

.flipbook-main-wrapper,
.flipbook-main-wrapper .flipbook-book,
.flipbook-main-wrapper .flipbook-book3,
.flipbook-main-wrapper .flipbook-book-webgl,
.flipbook-main-wrapper .flipbook-carousel-slide,
.flipbook-main-wrapper .flipbook-carousel-scroller {
    touch-action: pan-y pinch-zoom;
    -ms-touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* When the book is zoomed in, the plugin adds .flipbook-zoomed and starts
   panning the magnified page in both axes via its own iscroll instance.
   Open touch-action back up so the user's pan inside zoom feels native. */
.flipbook-main-wrapper.flipbook-zoomed,
.flipbook-main-wrapper.flipbook-zoomed * {
    touch-action: auto;
    -ms-touch-action: auto;
}

/* UI chrome (menus, toolbars, thumbnails) keeps default touch behaviour so
   thumb strips and toolbars stay scrollable. */
.flipbook-menu,
.flipbook-menu *,
.flipbook-thumbHolder,
.flipbook-thumbHolder *,
.flipbook-toc,
.flipbook-toc * {
    touch-action: auto;
    -ms-touch-action: auto;
}
