/* ── Nezri Flipbook — styles ─────────────────── */

.nfb-wrapper {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

/* Loading overlay */
.nfb-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    letter-spacing: .08em;
    color: #888;
    background: #fafafa;
    z-index: 20;
    transition: opacity .4s ease;
}
.nfb-loading.nfb-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Stage — perspective container */
.nfb-stage {
    position: relative;
    width: 100%;
    /* height set by JS after PDF loads */
    perspective: 2400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Book — the double-page spread */
.nfb-book {
    position: relative;
    display: flex;
    transform-style: preserve-3d;
    /* width/height set by JS */
    box-shadow: 0 24px 80px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.10);
}

/* Spine shadow */
.nfb-book::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to right, rgba(0,0,0,.18), rgba(0,0,0,.06), rgba(0,0,0,.18));
    z-index: 5;
    pointer-events: none;
}

/* Individual pages */
.nfb-page {
    position: relative;
    overflow: hidden;
    background: #fff;
}
.nfb-page--left  { border-radius: 2px 0 0 2px; }
.nfb-page--right { border-radius: 0 2px 2px 0; }

.nfb-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Hit zones — invisible click areas on page edges */
.nfb-hit {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    cursor: pointer;
    z-index: 4;
}
.nfb-hit--prev { left: 0; }
.nfb-hit--next { right: 0; }

/* Flip animation layer */
.nfb-flip-layer {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transform-origin: right center;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
}
.nfb-flip--prev {
    left: 0;
    transform-origin: right center;
}
.nfb-flip--next {
    right: 0;
    transform-origin: left center;
}

.nfb-flip-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Arrows */
.nfb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.92);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.14);
    color: #222;
    z-index: 15;
    transition: background .15s, box-shadow .15s, opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.nfb-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
}
.nfb-arrow--prev { left: -22px; }
.nfb-arrow--next { right: -22px; }

.nfb-arrow:disabled,
.nfb-arrow[disabled] {
    opacity: 0;
    pointer-events: none;
}

/* Single-page mode (cover, last page) */
.nfb-wrapper.nfb-single .nfb-page--left {
    visibility: hidden;
}

/* Responsive */
@media (max-width: 640px) {
    .nfb-arrow--prev { left: 4px; }
    .nfb-arrow--next { right: 4px; }
    .nfb-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
