/*
 * Standalone Flipbook viewer page (catalogue_flipbook.php). Self-contained
 * on purpose - this page doesn't use the main theme.css bundle since it
 * has no header/nav/footer chrome, just its own toolbar + stage.
 */
html, body {
    height: 100%;
    margin: 0;
    background: #1b1b1b;
    color: #fff;
    font-family: var(--theme-body-font, 'Inter', sans-serif);
    overflow: hidden;
}
.flipbook-page-root {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.flipbook-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1rem;
    background: #111;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-wrap: wrap;
}
.flipbook-toolbar-title {
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
}
.flipbook-toolbar-spacer { flex: 1 1 auto; }
.flipbook-toolbar .btn {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255,255,255,.25);
    --bs-btn-hover-bg: rgba(255,255,255,.12);
    --bs-btn-hover-border-color: rgba(255,255,255,.4);
    --bs-btn-hover-color: #fff;
}
.flipbook-page-indicator {
    font-size: .85rem;
    min-width: 70px;
    text-align: center;
    color: rgba(255,255,255,.85);
}
/*
 * #flipbookRoot is the actual flex child that fills the space below the
 * toolbar; .flipbook-stage-wrap/.flipbook-loading/.flipbook-error are all
 * position:absolute siblings stacked on top of each other inside it, so
 * the stage is always in the layout (and therefore always measurable via
 * clientWidth/clientHeight) even while the loading overlay covers it -
 * nothing has to be display:none while Turn.js is being sized.
 */
#flipbookRoot {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.flipbook-stage-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.flipbook-zoom-wrap {
    transition: transform .25s ease;
}
.flipbook-page {
    background: #fff;
}
.flipbook-page canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.flipbook-page-pending {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flipbook-page-spinner {
    color: rgba(0,0,0,.25);
}
.flipbook-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1b1b1b;
    z-index: 5;
}
.flipbook-loading-pct {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-primary, #0f6e9c);
    margin-top: .75rem;
}
.flipbook-loading-bar {
    width: min(320px, 70vw);
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    overflow: hidden;
    margin-top: 1rem;
}
.flipbook-loading-bar-fill {
    height: 100%;
    width: 0;
    background: var(--theme-primary, #0f6e9c);
    transition: width .2s ease;
}
.flipbook-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 6;
}
@media (max-width: 575.98px) {
    .flipbook-toolbar-title { max-width: 50vw; font-size: .85rem; }
    .flipbook-toolbar { gap: .4rem; padding: .5rem .6rem; }
}
