body.penshurst-flipbook-open {
    overflow: hidden;
}

.pdf-flipbook-trigger {
    cursor: pointer;
}

.pdf-flipbook-description-trigger {
    cursor: pointer;
}

.pdf-flipbook-description-trigger:focus {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.penshurst-pdf-flipbook-modal[hidden] {
    display: none !important;
}

.penshurst-pdf-flipbook-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 18px;
    background: rgba(8, 14, 35, 0.88);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 180ms ease;
}

.penshurst-pdf-flipbook-modal.is-open {
    opacity: 1;
}

.penshurst-pdf-flipbook-panel {
    width: min(1500px, 96vw);
    height: min(930px, 96vh);
    min-height: 460px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 10px;
    background: #eef1f6;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.penshurst-pdf-flipbook-panel:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
}

.penshurst-pdf-flipbook-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
    padding: 11px 18px 11px 22px;
    color: #fff;
    background: #00185c;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

.penshurst-pdf-flipbook-heading {
    min-width: 0;
}

.penshurst-pdf-flipbook-kicker {
    display: block;
    margin-bottom: 1px;
    color: #fed966;
    font: 700 11px/1.3 "Roboto", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.penshurst-pdf-flipbook-heading h2 {
    overflow: hidden;
    margin: 0;
    color: #fff;
    font: 500 20px/1.25 "Roboto", sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.penshurst-pdf-flipbook-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.penshurst-pdf-flipbook-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.penshurst-pdf-flipbook-zoom-controls .penshurst-pdf-flipbook-tool {
    min-width: 40px;
    padding-left: 9px;
    padding-right: 9px;
}

.penshurst-pdf-flipbook-zoom-reset {
    min-width: 58px !important;
}

.penshurst-pdf-flipbook-tool:disabled {
    cursor: default;
    opacity: 0.38;
}

.penshurst-pdf-flipbook-tool,
.penshurst-pdf-flipbook-close,
.penshurst-pdf-flipbook-footer-nav,
.penshurst-pdf-flipbook-nav {
    appearance: none;
    border: 0;
    font-family: "Roboto", sans-serif;
    cursor: pointer;
}

.penshurst-pdf-flipbook-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    box-sizing: border-box;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 5px;
    color: #fff !important;
    background: rgba(255,255,255,0.08);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 160ms ease, border-color 160ms ease;
}

.penshurst-pdf-flipbook-tool:hover,
.penshurst-pdf-flipbook-tool:focus {
    color: #00185c !important;
    border-color: #fed966;
    background: #fed966;
}

.penshurst-pdf-flipbook-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    transition: color 160ms ease, background 160ms ease;
}

.penshurst-pdf-flipbook-close:hover,
.penshurst-pdf-flipbook-close:focus {
    color: #00185c;
    background: #fed966;
}

.penshurst-pdf-flipbook-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 18px 74px;
    background:
        radial-gradient(circle at 50% 38%, rgba(255,255,255,0.98) 0, rgba(240,243,248,0.96) 45%, rgba(217,223,233,0.98) 100%);
}

.penshurst-pdf-flipbook-stage::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 8%;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.16);
    filter: blur(22px);
    pointer-events: none;
}

.penshurst-pdf-flipbook-pan-viewport {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

.penshurst-pdf-flipbook-pan-viewport.is-zoomed {
    cursor: grab;
    touch-action: none;
}

.penshurst-pdf-flipbook-pan-viewport.is-panning {
    cursor: grabbing;
}

.penshurst-pdf-flipbook-zoom-layer {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: 50% 50%;
    will-change: transform;
}

.penshurst-pdf-flipbook-host {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.penshurst-pdf-flipbook-book {
    position: relative;
    margin: auto;
}

/* Each flipbook leaf is a live PDF.js canvas. PDF pages are re-rendered
   from the vector source at the resolution needed for the current zoom. */
.penshurst-pdf-flipbook-page {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.penshurst-pdf-flipbook-canvas {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    background: #fff;
}

.penshurst-pdf-flipbook-nav {
    position: absolute;
    top: 50%;
    z-index: 15;
    width: 50px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: #fff;
    background: rgba(0, 24, 92, 0.86);
    transform: translateY(-50%);
    box-shadow: 0 7px 22px rgba(0,0,0,0.18);
    transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.penshurst-pdf-flipbook-nav span {
    margin-top: -6px;
    font-size: 48px;
    font-weight: 200;
    line-height: 1;
}

.penshurst-pdf-flipbook-prev {
    left: 14px;
}

.penshurst-pdf-flipbook-next {
    right: 14px;
}

.penshurst-pdf-flipbook-nav:hover,
.penshurst-pdf-flipbook-nav:focus {
    color: #00185c;
    background: #fed966;
}

.penshurst-pdf-flipbook-nav:disabled,
.penshurst-pdf-flipbook-footer-nav:disabled {
    cursor: default;
    opacity: 0.28;
}

.penshurst-pdf-flipbook-footer {
    min-height: 54px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    color: #fff;
    background: #00185c;
    z-index: 20;
}

.penshurst-pdf-flipbook-page-status {
    min-width: 150px;
    text-align: center;
    font: 500 14px/1.2 "Roboto", sans-serif;
}

.penshurst-pdf-flipbook-footer-nav {
    color: #fff;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
}

.penshurst-pdf-flipbook-prev-text {
    justify-self: start;
}

.penshurst-pdf-flipbook-next-text {
    justify-self: end;
}

.penshurst-pdf-flipbook-footer-nav:not(:disabled):hover,
.penshurst-pdf-flipbook-footer-nav:not(:disabled):focus {
    color: #fed966;
}

.penshurst-pdf-flipbook-loading {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #00185c;
    background: rgba(238,241,246,0.94);
    font-family: "Roboto", sans-serif;
}

.penshurst-pdf-flipbook-loading[hidden] {
    display: none;
}

.penshurst-pdf-flipbook-loading-text {
    font-size: 17px;
    font-weight: 600;
}

.penshurst-pdf-flipbook-progress {
    font-size: 13px;
    opacity: 0.72;
}

.penshurst-pdf-flipbook-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(0,24,92,0.16);
    border-top-color: #00185c;
    border-radius: 50%;
    animation: penshurst-pdf-spin 800ms linear infinite;
}

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

.penshurst-pdf-flipbook-error {
    max-width: 480px;
    padding: 30px;
    border-radius: 8px;
    color: #212932;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0,0,0,0.14);
    text-align: center;
    font-family: "Roboto", sans-serif;
}

.penshurst-pdf-flipbook-error strong {
    display: block;
    margin-bottom: 10px;
    color: #00185c;
    font-size: 20px;
}

.penshurst-pdf-flipbook-direct {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 18px;
    border-radius: 4px;
    color: #00185c !important;
    background: #fed966;
    font-weight: 600;
    text-decoration: none !important;
}


@media screen and (max-width: 1050px) and (min-width: 761px) {
    .penshurst-pdf-flipbook-toolbar {
        gap: 12px;
    }

    .penshurst-pdf-flipbook-toolbar-actions {
        gap: 5px;
    }

    .penshurst-pdf-flipbook-tool {
        padding-left: 9px;
        padding-right: 9px;
    }
}

@media screen and (max-width: 760px) {
    .penshurst-pdf-flipbook-modal {
        padding: 0;
    }

    .penshurst-pdf-flipbook-panel {
        width: 100vw;
        height: 100vh;
        min-height: 0;
        border-radius: 0;
    }

    .penshurst-pdf-flipbook-toolbar {
        min-height: 62px;
        padding: 8px 10px 8px 14px;
        gap: 10px;
    }

    .penshurst-pdf-flipbook-toolbar-actions {
        gap: 5px;
    }

    .penshurst-pdf-flipbook-zoom-controls .penshurst-pdf-flipbook-tool {
        min-width: 34px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .penshurst-pdf-flipbook-zoom-reset {
        min-width: 50px !important;
    }

    .penshurst-pdf-flipbook-kicker {
        display: none;
    }

    .penshurst-pdf-flipbook-heading h2 {
        font-size: 16px;
    }

    .penshurst-pdf-flipbook-tool {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .penshurst-pdf-flipbook-fullscreen,
    .penshurst-pdf-flipbook-open {
        display: none;
    }

    .penshurst-pdf-flipbook-close {
        width: 38px;
        height: 38px;
        font-size: 30px;
    }

    .penshurst-pdf-flipbook-stage {
        padding: 10px 40px;
    }

    .penshurst-pdf-flipbook-nav {
        width: 36px;
        height: 62px;
        border-radius: 0;
        box-shadow: none;
    }

    .penshurst-pdf-flipbook-nav span {
        font-size: 40px;
    }

    .penshurst-pdf-flipbook-prev {
        left: 0;
    }

    .penshurst-pdf-flipbook-next {
        right: 0;
    }

    .penshurst-pdf-flipbook-footer {
        min-height: 48px;
        padding: 0 12px;
    }

    .penshurst-pdf-flipbook-page-status {
        min-width: 120px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .penshurst-pdf-flipbook-modal,
    .penshurst-pdf-flipbook-tool,
    .penshurst-pdf-flipbook-close,
    .penshurst-pdf-flipbook-nav {
        transition: none;
    }

    .penshurst-pdf-flipbook-spinner {
        animation-duration: 1.6s;
    }
}
