/* =====================================================
   25h Flipbook – style
   ===================================================== */

/* Wrapper */
.thkf-flipbook-wrapper {
    text-align: center;
    position: relative;
}

/* Viewport */
.thkf-flipbook-viewport {
    width: 100%;
    max-width: 100%;
    position: relative;
    margin: 0 auto;
    padding: 20px 0;
}

/* Cień pod flipbookiem (generowany przez turn.js) */
.thkf-flipbook-viewport .shadow {
    box-shadow: 0 0 20px #ccc;
}

/* Strony */
.thkf-flipbook .page {
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    cursor: pointer;
}

/* Twarda okładka */
.thkf-flipbook .hard {
    background: #f0f0f0;
}

/* Cieniowanie wewnętrzne – lewa strona */
.thkf-flipbook .even .gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0) 95%, rgba(0,0,0,0.15) 100%);
}

/* Cieniowanie wewnętrzne – prawa strona */
.thkf-flipbook .odd .gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, rgba(0,0,0,0) 95%, rgba(0,0,0,0.1) 100%);
}

/* Linki pod flipbookiem */
.thkf-flipbook-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.thkf-flipbook-links a {
    color: #0073aa;
    text-decoration: none;
}

.thkf-flipbook-links a:hover {
    text-decoration: underline;
}

/* Nawigacja */
.thkf-flipbook-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 20;
margin-top: -24px;
}

.thkf-flipbook-nav button {
    pointer-events: auto;
    background: rgba(0,0,0,0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    padding: 0;
    flex-shrink: 0;
}

.thkf-flipbook-nav button img {
    width: 24px;
    height: 24px;
    display: block;
}

.thkf-flipbook-nav button:hover:not(:disabled) {
    background: rgba(0,0,0,0.4);
}

.thkf-flipbook-nav button:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* =====================================================
   MODAL (na całą stronę)
   ===================================================== */

.thkf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    overflow-x: hidden;
}

.thkf-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.thkf-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.thkf-modal-close:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.thkf-modal-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 40px 40px 40px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Kontener flipbooka w modalu */
.thkf-modal-body .thkf-flipbook-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Viewport – centrowanie */
.thkf-modal-body .thkf-flipbook-viewport {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

/* Sama książka */
.thkf-modal-body .thkf-flipbook {
    margin: 0 auto !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

/* Przyciski nawigacji w modalu - na bokach */
.thkf-modal-body .thkf-flipbook-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    width: 100%;
}

.thkf-modal-body .thkf-flipbook-nav button {
    pointer-events: auto;
    position: absolute;
}

.thkf-modal-body .thkf-prev-page {
    left: 10px;
}

.thkf-modal-body .thkf-next-page {
    right: 10px;
}

/* Responsywność */
@media (max-width: 768px) {
    .thkf-modal-body {
        padding: 50px 15px 15px 15px;
    }
    .thkf-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    .thkf-modal-body .thkf-prev-page {
        left: 5px;
    }
    .thkf-modal-body .thkf-next-page {
        right: 5px;
    }
}