/* ==========================================================
   CONVERTODO
   PDF A FLIPBOOK
========================================================== */

.hidden {
    display: none !important;
}


/* ==========================================================
   GENERAL
========================================================== */

.bookpdf-workspace {
    padding: 38px 0 55px;
    background: #f5f6fa;
}


.bookpdf-main-container {
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
}


/* ==========================================================
   SUBIDA
========================================================== */

.bookpdf-upload-stage {
    width: min(920px, 100%);
    margin: 0 auto;
}


.bookpdf-drop-zone {
    min-height: 420px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 50px 30px;

    text-align: center;

    border: 2px dashed #d8dbe8;
    border-radius: 25px;

    background: #ffffff;

    box-shadow:
        0 12px 35px
        rgba(20, 23, 43, 0.05);

    transition: 0.2s;
}


.bookpdf-drop-zone.drag-over {
    border-color: var(--primary);
    background: #f4f4ff;
}


.bookpdf-upload-icon {
    width: 84px;
    height: 84px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    border-radius: 24px;

    color: var(--primary);
    background: var(--primary-light);

    font-size: 36px;
}


.bookpdf-drop-zone h2 {
    color: var(--dark);

    font-size: 29px;
    letter-spacing: -0.9px;
}


.bookpdf-drop-zone > p {
    max-width: 640px;

    margin: 9px auto 25px;

    color: var(--text-light);

    font-size: 14px;
}


.bookpdf-select-button {
    min-height: 55px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 13px 26px;

    cursor: pointer;

    border-radius: 13px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #6d64eb
        );

    box-shadow:
        0 12px 28px
        rgba(91, 92, 240, 0.25);

    font-size: 14px;
    font-weight: 800;

    transition: 0.2s;
}


.bookpdf-select-button:hover {
    transform: translateY(-2px);
}


.bookpdf-drop-help {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    margin-top: 18px;

    color: #989cab;

    font-size: 11px;
}


/* ==========================================================
   LOADING
========================================================== */

.bookpdf-loading-stage,
.bookpdf-processing-stage {
    width: min(720px, 100%);
    min-height: 380px;

    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 42px;

    text-align: center;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 24px;

    box-shadow:
        0 12px 36px
        rgba(20, 23, 43, 0.06);
}


.bookpdf-spinner {
    width: 60px;
    height: 60px;

    margin-bottom: 18px;

    border: 5px solid #ececff;
    border-top-color: var(--primary);

    border-radius: 50%;

    animation:
        bookpdf-spin
        0.8s linear infinite;
}


@keyframes bookpdf-spin {

    to {
        transform: rotate(360deg);
    }

}


.bookpdf-loading-stage h2,
.bookpdf-processing-stage h2 {
    color: var(--dark);
    font-size: 25px;
}


.bookpdf-loading-stage > p,
.bookpdf-processing-stage > p {
    max-width: 560px;

    margin-top: 6px;

    color: var(--text-light);

    font-size: 11px;
}


.bookpdf-progress {
    width: min(500px, 100%);
    height: 8px;

    overflow: hidden;

    margin-top: 25px;

    border-radius: 50px;

    background: #e8eaf1;
}


.bookpdf-progress-bar {
    width: 0;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    transition: width 0.25s ease;
}


/* ==========================================================
   EDITOR
========================================================== */

.bookpdf-editor {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #dfe2eb;
    border-radius: 20px;

    box-shadow:
        0 12px 40px
        rgba(20, 23, 43, 0.07);
}


/* ==========================================================
   CABECERA EDITOR
========================================================== */

.bookpdf-editor-header {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 11px 16px;

    border-bottom: 1px solid #e6e8ef;

    background: #ffffff;
}


.bookpdf-file-info {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}


.bookpdf-file-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 11px;

    color: #ef4444;
    background: #fff0f0;

    font-size: 19px;
}


.bookpdf-file-info > div:last-child {
    min-width: 0;
}


.bookpdf-file-info strong {
    max-width: 420px;

    display: block;

    overflow: hidden;

    color: var(--dark);

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.bookpdf-file-info span {
    display: block;

    margin-top: 2px;

    color: #969aaa;

    font-size: 8px;
}


.bookpdf-editor-top-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}


.bookpdf-outline-button,
.bookpdf-preview-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 14px;

    border-radius: 10px;

    font-size: 9px;
    font-weight: 800;
}


.bookpdf-outline-button {
    cursor: pointer;

    color: #5d6274;
    background: #ffffff;

    border: 1px solid #dce0e8;
}


.bookpdf-outline-button:hover {
    color: var(--primary);
    border-color: var(--primary);
}


.bookpdf-preview-button {
    border: none;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #6964e8
        );
}


/* ==========================================================
   LAYOUT
========================================================== */

.bookpdf-editor-layout {
    min-height: 760px;

    display: grid;

    grid-template-columns:
        190px
        minmax(0, 1fr)
        285px;

    background: #eef0f5;
}


/* ==========================================================
   PÁGINAS LATERALES
========================================================== */

.bookpdf-pages-sidebar {
    max-height: calc(100vh - 90px);

    overflow-y: auto;

    padding: 13px 11px;

    background: #ffffff;

    border-right: 1px solid #dfe2ea;
}


.bookpdf-sidebar-heading {
    padding: 2px 2px 11px;
}


.bookpdf-sidebar-heading strong {
    display: block;

    color: var(--dark);

    font-size: 11px;
}


.bookpdf-sidebar-heading span {
    display: block;

    margin-top: 2px;

    color: #999dac;

    font-size: 7px;
}


.bookpdf-page-actions {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 5px;

    margin-bottom: 11px;
}


.bookpdf-page-action {
    min-width: 0;
    min-height: 55px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 5px;

    border: 1px solid #dfe2ea;
    border-radius: 8px;

    color: #6e7385;
    background: #ffffff;

    font-size: 6.6px;

    transition: 0.2s;
}


.bookpdf-page-action i {
    font-size: 15px;
}


.bookpdf-page-action:hover {
    color: var(--primary);

    border-color: var(--primary);

    background: var(--primary-light);
}


.bookpdf-page-action.cover {
    color: #8065dd;
}


.bookpdf-sort-help {
    display: flex;
    align-items: flex-start;

    gap: 5px;

    margin-bottom: 10px;

    padding: 7px;

    border-radius: 7px;

    color: #8b8f9f;
    background: #f5f6f9;

    font-size: 6.5px;
    line-height: 1.35;
}


.bookpdf-sort-help i {
    color: var(--primary);
}


/* ==========================================================
   MINIATURAS
========================================================== */

.bookpdf-page-list {
    display: flex;
    flex-direction: column;

    gap: 9px;
}


.bookpdf-page-thumbnail {
    position: relative;

    padding: 7px;

    cursor: grab;

    border: 2px solid transparent;
    border-radius: 10px;

    background: #f6f7fa;

    transition: 0.2s;
}


.bookpdf-page-thumbnail:hover {
    border-color:
        rgba(91, 92, 240, 0.28);
}


.bookpdf-page-thumbnail.active {
    border-color: var(--primary);
    background: #f2f2ff;
}


.bookpdf-page-thumbnail:active {
    cursor: grabbing;
}


.bookpdf-thumb-preview {
    min-height: 135px;

    display: grid;
    place-items: center;

    overflow: hidden;

    border-radius: 5px;

    background: #eceef3;
}


.bookpdf-thumb-preview canvas,
.bookpdf-thumb-preview img {
    max-width: 100%;
    max-height: 135px;

    display: block;

    object-fit: contain;

    background: #ffffff;

    box-shadow:
        0 2px 7px
        rgba(20, 23, 43, 0.13);
}


.bookpdf-thumb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 5px;

    margin-top: 6px;
}


.bookpdf-thumb-footer strong {
    display: block;

    color: #555a6c;

    font-size: 7px;
}


.bookpdf-thumb-footer small {
    display: block;

    margin-top: 1px;

    color: #989cac;

    font-size: 6px;
}


.bookpdf-thumb-grip {
    color: #999dac;
    font-size: 12px;
}


.bookpdf-thumb-type {
    position: absolute;

    left: 10px;
    top: 10px;

    z-index: 5;

    padding: 3px 5px;

    border-radius: 5px;

    color: #ffffff;

    background:
        rgba(91, 92, 240, 0.92);

    font-size: 5.8px;
    font-weight: 800;
}


.bookpdf-thumb-type.blank {
    color: #676c7e;

    background:
        rgba(255, 255, 255, 0.95);
}


.bookpdf-sortable-ghost {
    opacity: 0.35;
}


.bookpdf-sortable-chosen {
    border-color: var(--primary);
}


.bookpdf-delete-page-button {
    width: 100%;
    min-height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 11px;

    border: 1px solid #ffd8d5;
    border-radius: 8px;

    color: #ef4444;
    background: #fff5f5;

    font-size: 7px;
    font-weight: 700;
}


.bookpdf-delete-page-button:hover {
    color: #ffffff;
    background: #ef4444;
}


/* ==========================================================
   ÁREA CENTRAL
========================================================== */

.bookpdf-canvas-area {
    min-width: 0;

    overflow: auto;

    padding-bottom: 45px;
}


.bookpdf-toolbar {
    min-height: 59px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 8px;

    background: #ffffff;

    border-bottom: 1px solid #dfe2ea;
}


.bookpdf-tool-button {
    min-height: 41px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 8px 11px;

    border: 1px solid transparent;
    border-radius: 9px;

    color: #656a7d;
    background: transparent;

    font-size: 8px;
    font-weight: 700;

    transition: 0.2s;
}


.bookpdf-tool-button i {
    font-size: 14px;
}


.bookpdf-tool-button:hover,
.bookpdf-tool-button.active {
    color: var(--primary);

    border-color:
        rgba(91, 92, 240, 0.2);

    background: var(--primary-light);
}


.bookpdf-tool-button.danger:hover {
    color: #ef4444;

    border-color: #ffd6d4;

    background: #fff2f2;
}


.bookpdf-tool-button:disabled {
    cursor: not-allowed;

    opacity: 0.35;
}


.bookpdf-editor-tip {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 9px;

    color: #8f93a3;

    font-size: 7px;
}


.bookpdf-editor-tip i {
    color: var(--primary);
}


.bookpdf-page-viewport {
    width: 100%;

    display: flex;
    justify-content: center;

    overflow: auto;

    padding: 13px 24px 26px;
}


.bookpdf-page-stage {
    position: relative;

    flex-shrink: 0;

    background: #ffffff;

    box-shadow:
        0 8px 28px
        rgba(20, 23, 43, 0.18);
}


.bookpdf-page-stage > canvas.bookpdf-background-canvas {
    position: absolute;

    left: 0;
    top: 0;

    z-index: 1;

    pointer-events: none;
}


.bookpdf-page-stage .canvas-container {
    position: absolute !important;

    left: 0 !important;
    top: 0 !important;

    z-index: 2;
}


.bookpdf-pagination-preview {
    position: absolute;

    z-index: 6;

    pointer-events: none;

    line-height: 1;

    font-weight: 500;
}


.bookpdf-pagination-preview.bottom-left {
    left: 20px;
    bottom: 16px;
}


.bookpdf-pagination-preview.bottom-center {
    left: 50%;
    bottom: 16px;

    transform: translateX(-50%);
}


.bookpdf-pagination-preview.bottom-right {
    right: 20px;
    bottom: 16px;
}


.bookpdf-pagination-preview.top-left {
    left: 20px;
    top: 16px;
}


.bookpdf-pagination-preview.top-center {
    left: 50%;
    top: 16px;

    transform: translateX(-50%);
}


.bookpdf-pagination-preview.top-right {
    right: 20px;
    top: 16px;
}


.bookpdf-current-page-info {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    color: #8d91a1;

    font-size: 7px;
}


.bookpdf-current-page-info span:last-child {
    padding: 3px 6px;

    border-radius: 100px;

    color: var(--primary);
    background: var(--primary-light);

    font-weight: 700;
}


/* ==========================================================
   PANEL DERECHO
========================================================== */

.bookpdf-properties-panel {
    max-height: calc(100vh - 90px);

    overflow-y: auto;

    padding: 15px;

    background: #ffffff;

    border-left: 1px solid #dfe2ea;
}


.bookpdf-panel-heading {
    display: flex;
    align-items: center;

    gap: 8px;

    padding-bottom: 13px;

    border-bottom: 1px solid #e7e9ef;
}


.bookpdf-panel-heading > span {
    width: 37px;
    height: 37px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 9px;

    color: var(--primary);
    background: var(--primary-light);
}


.bookpdf-panel-heading strong {
    display: block;

    color: var(--dark);

    font-size: 10px;
}


.bookpdf-panel-heading small {
    display: block;

    margin-top: 1px;

    color: #999dab;

    font-size: 7px;
}


/* ==========================================================
   PROPIEDADES
========================================================== */

.bookpdf-property-section {
    padding: 14px 0;

    border-bottom: 1px solid #eceef3;
}


.bookpdf-property-section h4 {
    margin-bottom: 10px;

    color: var(--dark);

    font-size: 9px;
}


.bookpdf-property-section > label,
.bookpdf-property-section > div > label {
    display: flex;
    justify-content: space-between;

    margin: 8px 0 5px;

    color: #656a7c;

    font-size: 7.5px;
    font-weight: 700;
}


.bookpdf-property-section input[type="text"],
.bookpdf-property-section input[type="number"],
.bookpdf-property-section select {
    width: 100%;
    height: 37px;

    padding: 0 9px;

    outline: none;

    border: 1px solid #dce0e9;
    border-radius: 8px;

    color: #505568;
    background: #ffffff;

    font-size: 8px;
}


.bookpdf-property-section input:focus,
.bookpdf-property-section select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(91, 92, 240, 0.07);
}


.bookpdf-property-section input[type="color"] {
    width: 100%;
    height: 37px;

    padding: 3px;

    cursor: pointer;

    border: 1px solid #dce0e9;
    border-radius: 8px;

    background: #ffffff;
}


.bookpdf-property-section input[type="range"] {
    width: 100%;

    accent-color: var(--primary);
}


.bookpdf-two-columns {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 8px;
}


.bookpdf-field-note {
    display: block;

    margin-top: 5px;

    color: #a0a4b2;

    font-size: 6.3px;
    line-height: 1.4;
}


.bookpdf-style-buttons {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 5px;

    margin-top: 9px;
}


.bookpdf-style-buttons button {
    height: 35px;

    display: grid;
    place-items: center;

    border: 1px solid #dce0e9;
    border-radius: 8px;

    color: #64697a;
    background: #ffffff;
}


.bookpdf-style-buttons button:hover,
.bookpdf-style-buttons button.active {
    color: var(--primary);

    border-color: var(--primary);

    background: var(--primary-light);
}


/* ==========================================================
   PAGINACIÓN
========================================================== */

.bookpdf-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.bookpdf-section-title-row h4 {
    margin: 0;
}


.bookpdf-switch {
    position: relative;

    width: 42px;
    height: 23px;

    cursor: pointer;
}


.bookpdf-switch input {
    opacity: 0;

    width: 0;
    height: 0;
}


.bookpdf-switch span {
    position: absolute;

    inset: 0;

    border-radius: 50px;

    background: #d6dae4;

    transition: 0.2s;
}


.bookpdf-switch span::after {
    content: "";

    position: absolute;

    left: 3px;
    top: 3px;

    width: 17px;
    height: 17px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 2px 5px
        rgba(20, 23, 43, 0.18);

    transition: 0.2s;
}


.bookpdf-switch input:checked + span {
    background: var(--primary);
}


.bookpdf-switch input:checked + span::after {
    transform: translateX(19px);
}


.bookpdf-pagination-disabled {
    pointer-events: none;

    opacity: 0.4;
}


.bookpdf-checkbox-row {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;

    gap: 7px;

    cursor: pointer;
}


.bookpdf-checkbox-row input {
    accent-color: var(--primary);
}


/* ==========================================================
   BOTÓN VISTA PREVIA
========================================================== */

.bookpdf-preview-warning {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    margin-top: 14px;

    padding: 10px;

    border: 1px solid #dfe2ee;
    border-radius: 10px;

    color: #717688;
    background: #f7f8fc;
}


.bookpdf-preview-warning > i {
    margin-top: 1px;

    color: var(--primary);
}


.bookpdf-preview-warning strong {
    display: block;

    color: var(--dark);

    font-size: 8px;
}


.bookpdf-preview-warning p {
    margin-top: 2px;

    font-size: 6.8px;
    line-height: 1.4;
}


.bookpdf-main-preview-button {
    width: 100%;
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 11px;

    border: none;
    border-radius: 11px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #6b64e9
        );

    box-shadow:
        0 9px 22px
        rgba(91, 92, 240, 0.23);

    font-size: 9px;
    font-weight: 800;
}


/* ==========================================================
   PROCESAMIENTO
========================================================== */

.bookpdf-processing-icon {
    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    border-radius: 50%;

    color: var(--primary);
    background: var(--primary-light);

    font-size: 28px;

    animation:
        bookpdf-pulse
        1.2s ease-in-out infinite;
}


@keyframes bookpdf-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

}


.bookpdf-processing-progress-info {
    width: min(500px, 100%);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 7px;
}


.bookpdf-processing-progress-info span {
    color: #9195a5;

    font-size: 7px;
}


.bookpdf-processing-progress-info strong {
    color: var(--primary);

    font-size: 8px;
}


/* ==========================================================
   PREVIEW
========================================================== */

.bookpdf-preview-stage {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #dfe2eb;
    border-radius: 22px;

    box-shadow:
        0 12px 40px
        rgba(20, 23, 43, 0.07);
}


.bookpdf-preview-header {
    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 14px 20px;

    border-bottom: 1px solid #e7e9ef;
}


.bookpdf-preview-label {
    color: var(--primary);

    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1px;
}


.bookpdf-preview-header h2 {
    margin-top: 2px;

    color: var(--dark);

    font-size: 19px;
}


.bookpdf-preview-header p {
    margin-top: 2px;

    color: #898d9d;

    font-size: 8px;
}


.bookpdf-back-editor-button {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 8px 13px;

    border: 1px solid #dce0e8;
    border-radius: 9px;

    color: #606577;
    background: #ffffff;

    font-size: 8px;
    font-weight: 700;
}


.bookpdf-back-editor-button:hover {
    color: var(--primary);
    border-color: var(--primary);
}


/* ==========================================================
   LECTOR

   CORRECCIÓN:
   El libro ya no tiene un tamaño fijo de 1000 x 570.
   JavaScript calcula el ancho según la proporción real
   de las páginas.
========================================================== */

.bookpdf-flipbook-shell {
    --book-margin: 15px;

    position: relative;

    min-height: 670px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    padding: var(--book-margin);

    perspective: 1800px;

    background: #202333;

    transition:
        background 0.2s,
        padding 0.2s;
}


.bookpdf-flipbook {
    position: relative;

    width: auto;
    height: 620px;

    max-width: calc(100% - 110px);

    display: grid;

    grid-template-columns:
        1fr
        4px
        1fr;

    align-items: stretch;

    flex-shrink: 0;

    perspective: 1800px;

    transition:
        width 0.2s,
        height 0.2s;
}


.bookpdf-preview-page {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #ffffff;

    box-shadow:
        0 14px 40px
        rgba(0, 0, 0, 0.28);

    backface-visibility: hidden;

    transform-style: preserve-3d;
}


.bookpdf-preview-page.left {
    border-radius: 9px 2px 2px 9px;

    transform-origin: right center;
}


.bookpdf-preview-page.right {
    border-radius: 2px 9px 9px 2px;

    transform-origin: left center;
}


.bookpdf-preview-page img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    background: #ffffff;
}


.bookpdf-preview-page.empty {
    background:
        linear-gradient(
            90deg,
            #f0f0f0,
            #ffffff
        );
}


.bookpdf-book-spine {
    position: relative;

    z-index: 6;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.18),
            rgba(255, 255, 255, 0.12),
            rgba(0, 0, 0, 0.18)
        );
}


.bookpdf-flipbook.flip-next .right {
    animation:
        bookpdf-flip-next
        0.38s ease;
}


.bookpdf-flipbook.flip-prev .left {
    animation:
        bookpdf-flip-prev
        0.38s ease;
}


@keyframes bookpdf-flip-next {

    0% {
        transform: rotateY(0);
    }

    50% {
        transform: rotateY(-72deg);
    }

    100% {
        transform: rotateY(0);
    }

}


@keyframes bookpdf-flip-prev {

    0% {
        transform: rotateY(0);
    }

    50% {
        transform: rotateY(72deg);
    }

    100% {
        transform: rotateY(0);
    }

}


/* ==========================================================
   UNA PÁGINA / PRESENTACIÓN
========================================================== */

.bookpdf-flipbook.mode-single,
.bookpdf-flipbook.mode-presentation {
    width: auto;

    grid-template-columns: 1fr;
}


.bookpdf-flipbook.mode-single .left,
.bookpdf-flipbook.mode-presentation .left,
.bookpdf-flipbook.mode-single .bookpdf-book-spine,
.bookpdf-flipbook.mode-presentation .bookpdf-book-spine {
    display: none;
}


.bookpdf-flipbook.mode-single .right,
.bookpdf-flipbook.mode-presentation .right {
    border-radius: 9px;
}


.bookpdf-flipbook.mode-presentation .right {
    transition:
        opacity 0.25s,
        transform 0.25s;
}


.bookpdf-flipbook.mode-presentation.flip-next .right,
.bookpdf-flipbook.mode-presentation.flip-prev .right {
    animation:
        bookpdf-slide-fade
        0.35s ease;
}


@keyframes bookpdf-slide-fade {

    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.96);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }

}


/* ==========================================================
   FLECHAS
========================================================== */

.bookpdf-reader-arrow {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);

    backdrop-filter: blur(8px);

    font-size: 18px;

    transition: 0.2s;
}


.bookpdf-reader-arrow:hover:not(:disabled) {
    background:
        rgba(255, 255, 255, 0.20);
}


.bookpdf-reader-arrow:disabled {
    cursor: not-allowed;

    opacity: 0.25;
}


/* ==========================================================
   NAVEGACIÓN
========================================================== */

.bookpdf-preview-navigation {
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    border-top: 1px solid #e6e8ef;
    border-bottom: 1px solid #e6e8ef;
}


.bookpdf-preview-navigation button {
    width: 35px;
    height: 35px;

    display: grid;
    place-items: center;

    border: 1px solid #dfe2ea;
    border-radius: 8px;

    color: #666b7d;
    background: #ffffff;
}


.bookpdf-preview-navigation span {
    min-width: 130px;

    text-align: center;

    color: #686d7e;

    font-size: 8px;
    font-weight: 700;
}


/* ==========================================================
   DESCARGA
========================================================== */

.bookpdf-download-area {
    padding: 27px;
}


.bookpdf-preview-approved {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    margin-bottom: 20px;
}


.bookpdf-preview-approved > i {
    color: #10b981;

    font-size: 25px;
}


.bookpdf-preview-approved strong {
    display: block;

    color: var(--dark);

    font-size: 10px;
}


.bookpdf-preview-approved p {
    margin-top: 1px;

    color: #969aaa;

    font-size: 7px;
}


.bookpdf-download-buttons {
    width: min(680px, 100%);

    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 10px;

    margin: 0 auto;
}


.bookpdf-download-html-button,
.bookpdf-download-pdf-button {
    min-height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 12px 17px;

    border-radius: 12px;

    font-size: 9px;
}


.bookpdf-download-html-button {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #6d65eb
        );

    box-shadow:
        0 9px 23px
        rgba(91, 92, 240, 0.22);
}


.bookpdf-download-pdf-button {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #e84949,
            #ef5a5a
        );

    box-shadow:
        0 9px 23px
        rgba(239, 68, 68, 0.2);
}


.bookpdf-download-html-button > i,
.bookpdf-download-pdf-button > i {
    font-size: 21px;
}


.bookpdf-download-html-button span,
.bookpdf-download-pdf-button span {
    display: flex;
    flex-direction: column;
}


.bookpdf-download-html-button strong,
.bookpdf-download-pdf-button strong {
    font-size: 9px;
}


.bookpdf-download-html-button small,
.bookpdf-download-pdf-button small {
    margin-top: 2px;

    opacity: 0.82;

    font-size: 6.5px;
}


.bookpdf-new-button {
    display: block;

    margin: 16px auto 0;

    border: none;

    color: var(--primary);
    background: transparent;

    font-size: 8px;
    font-weight: 700;
}


/* ==========================================================
   MENSAJES
========================================================== */

.bookpdf-message {
    width: min(900px, 100%);

    margin: 15px auto 0;

    padding: 12px 14px;

    border: 1px solid #ffd5d1;
    border-radius: 10px;

    color: #b42318;
    background: #fff0ef;

    font-size: 9px;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1150px) {

    .bookpdf-editor-layout {
        grid-template-columns:
            165px
            minmax(0, 1fr);
    }


    .bookpdf-properties-panel {
        grid-column: 1 / -1;

        max-height: none;

        display: grid;

        grid-template-columns:
            repeat(3, 1fr);

        gap: 10px;

        border-left: none;
        border-top: 1px solid #dfe2ea;
    }


    .bookpdf-panel-heading,
    .bookpdf-preview-warning,
    .bookpdf-main-preview-button {
        grid-column: 1 / -1;
    }

}


@media (max-width: 800px) {

    .bookpdf-main-container {
        width: calc(100% - 18px);
    }


    .bookpdf-editor-header {
        flex-direction: column;
        align-items: flex-start;
    }


    .bookpdf-editor-top-actions {
        width: 100%;
    }


    .bookpdf-outline-button,
    .bookpdf-preview-button {
        flex: 1;
    }


    .bookpdf-editor-layout {
        grid-template-columns: 1fr;
    }


    .bookpdf-pages-sidebar {
        max-height: none;

        border-right: none;
        border-bottom: 1px solid #dfe2ea;
    }


    .bookpdf-page-list {
        flex-direction: row;

        overflow-x: auto;
    }


    .bookpdf-page-thumbnail {
        min-width: 120px;
    }


    .bookpdf-thumb-preview {
        min-height: 120px;
    }


    .bookpdf-properties-panel {
        grid-template-columns:
            1fr
            1fr;
    }


    .bookpdf-flipbook-shell {
        min-height: 540px;

        gap: 8px;
    }


    .bookpdf-reader-arrow {
        width: 38px;
        height: 38px;
    }

}


@media (max-width: 560px) {

    .bookpdf-toolbar {
        justify-content: flex-start;

        overflow-x: auto;
    }


    .bookpdf-tool-button {
        flex-shrink: 0;
    }


    .bookpdf-properties-panel {
        grid-template-columns: 1fr;
    }


    .bookpdf-two-columns {
        grid-template-columns: 1fr;
    }


    .bookpdf-page-actions {
        grid-template-columns:
            repeat(3, 1fr);
    }


    .bookpdf-flipbook-shell {
        min-height: 500px;
    }


    .bookpdf-flipbook.mode-book {
        grid-template-columns: 1fr !important;
    }


    .bookpdf-flipbook.mode-book .left,
    .bookpdf-flipbook.mode-book .bookpdf-book-spine {
        display: none;
    }


    .bookpdf-flipbook.mode-book .right {
        border-radius: 8px;
    }


    .bookpdf-download-buttons {
        grid-template-columns: 1fr;
    }


    .bookpdf-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .bookpdf-back-editor-button {
        width: 100%;
    }

}