.pdf-viewer-modal .modal-dialog {
    max-width: 900px;
}

.flipbook-modal .modal-dialog {
    max-width: min(1200px, 95vw);
}

.flipbook-modal iframe {
    display: block;
    width: 100%;
    height: 80vh;
    border: 0;
}

.flipbook-modal .modal-body {
    position: relative;
}

.flipbook-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s, background 0.2s;
}

/* Solo referencia visual: el click pasa al flipbook que está debajo */
.flipbook-arrow.is-hint {
    pointer-events: none;
}

.flipbook-arrow-prev {
    left: 8px;
}

.flipbook-arrow-next {
    right: 8px;
}

.flipbook-arrow:hover:not(:disabled),
.flipbook-arrow:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

.flipbook-arrow:disabled {
    opacity: 0;
    cursor: default;
}

.pdf-viewer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #525659;
    min-height: 70vh;
    max-height: 75vh;
    overflow: auto;
    position: relative;
}

.pdf-viewer-canvas-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 24px 0;
}

.pdf-viewer-canvas-wrap canvas {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    max-width: 100%;
    height: auto;
}

.pdf-viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(82, 86, 89, 0.85);
}

.pdf-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
}

.pdf-viewer-toolbar-sep {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 0 6px;
}

.pdf-viewer-btn {
    border: 1.5px solid var(--primary, #2351ff);
    color: var(--primary, #2351ff);
    background: transparent;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    line-height: 1;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-viewer-btn:hover:not(:disabled) {
    background: var(--primary, #2351ff);
    color: #fff;
}

.pdf-viewer-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.pdf-viewer-page-indicator {
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}
