.ws-pdf-viewer--mode-flip .ws-pdf-viewer__canvas-wrap {
    background: #f4f4f4;
}

.ws-pdf-viewer__flip-host {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 200px;
    display: block;
    cursor: default;
    touch-action: none;
}

.ws-pdf-viewer__flip-page {
    display: block;
    background: #fff;
}

.ws-pdf-viewer__flip-host .stf__block {
    cursor: grab;
    touch-action: none;
}

.ws-pdf-viewer__flip-host .stf__block:active {
    cursor: grabbing;
}

/* Hide only the static duplicate (no clip-path) */
.ws-pdf-viewer__flip-page--ghost-hide {
    visibility: hidden;
}

.ws-pdf-viewer__flip-page--dummy {
    background: #fff;
}

.ws-pdf-viewer__flip-page canvas {
    display: block;
}

.ws-pdf-viewer__lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 99999;
    padding: 24px;
    overflow: auto;
    overscroll-behavior: contain;
}

.ws-pdf-viewer__lightbox.is-centered {
    justify-content: center;
}

.ws-pdf-viewer__lightbox.is-hidden {
    display: none;
}

.ws-pdf-viewer__lightbox-close {
    position: fixed;
    top: 16px;
    right: 32px;
    z-index: 100000;
    border: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
}

.ws-pdf-viewer__lightbox-help {
    position: fixed;
    top: 16px;
    right: 84px;
    z-index: 100000;
    border: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ws-pdf-viewer__lightbox-help .ws-pdf-viewer__help-tooltip {
    position: absolute;
    right: 0;
    top: 46px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 12px 14px;
    border-radius: 8px;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    min-width: 240px;
    max-width: 320px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.ws-pdf-viewer__lightbox-help:hover .ws-pdf-viewer__help-tooltip,
.ws-pdf-viewer__lightbox-help:focus .ws-pdf-viewer__help-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.ws-pdf-viewer__help-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.ws-pdf-viewer__help-title {
    font-weight: 600;
    margin: 4px 0 6px 0;
    display: block;
}

.ws-pdf-viewer__help-icon {
    font-size: 16px;
    opacity: 0.9;
}

.ws-pdf-viewer__help-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.ws-pdf-viewer__help-spacer {
    height: 6px;
}

.ws-pdf-viewer__flip-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

.ws-pdf-viewer__flip-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font-size: 12px;
}

.ws-pdf-viewer__flip-download .material-symbols-rounded {
    font-size: 18px;
    line-height: 1;
}

.ws-pdf-viewer__flip-help {
    position: relative;
    border: 0;
    background: transparent;
    color: inherit;
    width: 24px;
    height: 24px;
    border-radius: 0;
    cursor: pointer;
}

.ws-pdf-viewer__flip-hint > * {
    flex: 0 0 33.333%;
}

.ws-pdf-viewer__flip-hint .ws-pdf-viewer__flip-count {
    text-align: left;
}

.ws-pdf-viewer__flip-hint .ws-pdf-viewer__flip-download {
    justify-content: center;
}

.ws-pdf-viewer__flip-hint .ws-pdf-viewer__flip-help {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.ws-pdf-viewer__flip-hint.ws-pdf-viewer__flip-hint--no-download > * {
    flex: 0 0 50%;
}

.ws-pdf-viewer__flip-hint.ws-pdf-viewer__flip-hint--no-download .ws-pdf-viewer__flip-help {
    margin-left: auto;
}

.ws-pdf-viewer__flip-hint--no-help .ws-pdf-viewer__flip-help {
    display: none;
}

.ws-pdf-viewer__flip-hint--no-help > .ws-pdf-viewer__flip-count,
.ws-pdf-viewer__flip-hint--no-help > .ws-pdf-viewer__flip-download {
    flex: 0 0 100%;
}

@media (max-width: 600px) {
    .ws-pdf-viewer__flip-hint {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .ws-pdf-viewer__flip-hint > .ws-pdf-viewer__flip-count {
        flex: 1 1 auto;
        order: 1;
    }

    .ws-pdf-viewer__flip-hint > .ws-pdf-viewer__flip-help {
        flex: 0 0 auto;
        width: 28px;
        order: 2;
    }

    .ws-pdf-viewer__flip-hint > .ws-pdf-viewer__flip-download {
        flex: 0 0 100%;
        justify-content: flex-start;
        order: 3;
    }

    .ws-pdf-viewer__flip-hint.ws-pdf-viewer__flip-hint--no-download > .ws-pdf-viewer__flip-count {
        flex: 1 1 auto;
    }

    .ws-pdf-viewer__flip-hint.ws-pdf-viewer__flip-hint--no-download > .ws-pdf-viewer__flip-help {
        flex: 0 0 auto;
        width: 28px;
    }

    .ws-pdf-viewer__lightbox-nav {
        top: auto !important;
        bottom: 24px !important;
        transform: none !important;
    }
}

.ws-pdf-viewer__flip-help .material-symbols-rounded {
    font-size: 18px;
    line-height: 24px;
}

.ws-pdf-viewer__flip-help-tooltip {
    position: absolute;
    right: 0;
    top: 34px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    min-width: 220px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    z-index: 5;
}

.ws-pdf-viewer__flip-help:hover .ws-pdf-viewer__flip-help-tooltip,
.ws-pdf-viewer__flip-help:focus .ws-pdf-viewer__flip-help-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.ws-pdf-viewer__flip-help-title {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.ws-pdf-viewer__flip-help-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.ws-pdf-viewer__lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100000;
    border: 0;
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ws-pdf-viewer__lightbox-nav--prev { left: 16px; }
.ws-pdf-viewer__lightbox-nav--next { right: 32px; }

.ws-pdf-viewer__lightbox-zoom {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100000;
    display: flex;
    gap: 8px;
}

.ws-pdf-viewer__lightbox-zoom button {
    border: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ws-pdf-viewer__lightbox-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .ws-pdf-viewer__lightbox {
        padding: 16px;
    }

    .ws-pdf-viewer__lightbox-close {
        right: 16px;
    }

    .ws-pdf-viewer__lightbox-help {
        right: 64px;
    }

    .ws-pdf-viewer__lightbox-nav--prev { left: 16px; }
    .ws-pdf-viewer__lightbox-nav--next { right: 16px; }

    .ws-pdf-viewer__lightbox-zoom {
        left: 16px;
    }
}

.ws-pdf-viewer__lightbox img {
    width: 92vw;
    height: auto;
    max-width: none;
    max-height: none;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    background: #fff;
}
.ws-pdf-viewer__flip-hint {
    margin-top: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.ws-pdf-viewer__flip-hint .ws-pdf-viewer__flip-count {
    font-weight: 600;
    font-size: 14px;
}
.ws-pdf-viewer__lightbox img {
    pointer-events: none;
}
