/*
 * GFlipBook Plugin Styles
 * Caricato solo quando lo shortcode [gflipbook] è in uso.
 */

/* --- Contenitore Principale --- */
.gfb-container {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 30px auto;
    min-height: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--accent-yellow) !important;
    box-shadow: none;
    border-radius: 8px;
    padding: 10px;
}
.l-section-shape.type_custom.pos_bottom {
    display: none;
}

/* Loader */
.gfb-container #loader { 
    color: #333; 
    padding: 50px; 
    font-size: 1.2rem; 
}

/* Contenitore interno del libro */
.gfb-container #main-container {
    width: 100%;
    max-width: 1300px;
    height: 80vh; /* Altezza base del visualizzatore */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
}

/* Wrapper per lo Zoom */
.gfb-container #zoom-wrapper {
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
:fullscreen #zoom-wrapper {
    cursor: pointer;
}

/* Il libro StPageFlip */
.gfb-container .flip-book {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: none;
    /* cursor: grab; */
    background-color: #fff;
}

.gfb-container .page {
    background-color: white;
    overflow: hidden;
}

.gfb-container canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    object-fit: cover;
}

/* --- ICONA FULLSCREEN --- */
.gfb-fullscreen-btn {
    position: absolute;
    bottom: -77px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 50%;
    z-index: 60;
    transition: background 0.3s;
    cursor: pointer;
    display: flex;
}

.gfb-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* --- FULLSCREEN FIX --- */
:fullscreen #main-container {
    max-width: none;
    width: 100vw;
    height: 100vh;
    background: #2b2b2b;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Nasconde i controlli esterni quando si è a schermo intero */
:fullscreen .gfb-nav-controls, :fullscreen .gfb-fullscreen-btn {
    display: none !important;
}

/* --- CONTROLLI DI NAVIGAZIONE --- */
.gfb-nav-controls {
    margin-top: 80px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    display: none;
}

.gfb-nav-btn {
    background: #0073aa; /* Colore WordPress Blue */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.gfb-nav-btn:hover {
    background: #005177;
}

.gfb-page-counter {
    font-weight: bold;
    color: #333;
}