/* ==========================================================================
   Papperpop Secure Strict PDF Reader Stylesheet
   Strict High Security: No download, No print, No copy, Anti-screenshot
   ========================================================================== */

/* Strict Print Blocker */
@media print {
    body, html, * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

.secure-pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #121212;
    z-index: 999999;
    display: none;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow: hidden;
    color: #ffffff;
    font-family: 'Figtree', sans-serif;
}

.secure-pdf-modal.active {
    display: flex;
}

/* Header Toolbar */
.secure-pdf-header {
    height: 60px;
    background-color: #1c1c1c;
    border-bottom: 1px solid #2b2b2b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 10;
}

.secure-pdf-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.secure-pdf-badge {
    background-color: #ffce28;
    color: #111111;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-transform: uppercase;
}

.secure-pdf-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Reader Navigation & Zoom Controls */
.secure-pdf-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.secure-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.18s ease;
    padding: 0;
}

.secure-pdf-btn:hover:not(:disabled) {
    background-color: #383838;
    border-color: #ffce28;
    color: #ffce28;
}

.secure-pdf-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.secure-pdf-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin="round";
}

.secure-pdf-page-indicator {
    font-size: 13.5px;
    font-weight: 600;
    color: #cccccc;
    padding: 0 8px;
    white-space: nowrap;
}

.secure-pdf-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #e53935;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    margin-left: 14px;
}

.secure-pdf-close-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.02);
}

/* Viewer Viewport & Canvas Stage */
.secure-pdf-viewport {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 24px 16px;
    background-color: #0d0d0d;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    touch-action: pan-y pinch-zoom;
}

.secure-pdf-canvas-wrapper {
    position: relative;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    background-color: #ffffff;
    max-width: 100%;
    margin: auto;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

#securePdfCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    pointer-events: none; /* User cannot drag or interact with canvas */
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* Transparent Safety Shield directly over the canvas */
.secure-pdf-canvas-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
    cursor: default;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* Interactive Touch-to-Read Privacy Shield (Hold to Read Mobile Anti-Screenshot) */
.secure-pdf-touch-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.12s ease, visibility 0.12s ease;
    cursor: pointer;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

.secure-pdf-touch-shield.touch-revealed {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.secure-pdf-touch-shield-card {
    background: #181818;
    border: 1.5px solid rgba(255, 206, 40, 0.35);
    border-radius: 16px;
    padding: 28px 22px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    animation: touchCardPulse 2s infinite ease-in-out;
}

@keyframes touchCardPulse {
    0%, 100% { border-color: rgba(255, 206, 40, 0.3); transform: scale(1); }
    50% { border-color: rgba(255, 206, 40, 0.7); transform: scale(1.015); }
}

.secure-shield-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.secure-shield-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffce28;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.secure-shield-desc {
    font-size: 12.5px;
    color: #a3a3a3;
    margin: 0 0 18px;
    line-height: 1.45;
}

.secure-touch-action-box {
    background: #242424;
    border: 1.5px dashed #ffce28;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.secure-touch-hand-icon {
    font-size: 24px;
    animation: touchBounce 1.2s infinite alternate ease-in-out;
}

@keyframes touchBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

.secure-touch-action-text {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    text-align: left;
    line-height: 1.2;
}

.secure-touch-action-text small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #ffce28;
    margin-top: 2px;
}

.secure-touch-sub {
    display: block;
    font-size: 11px;
    color: #737373;
    line-height: 1.4;
}

/* Anti-Screenshot / Blur Privacy Shield & Panic Blackout */
.secure-pdf-blur-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.secure-pdf-blur-shield.active {
    display: flex !important;
}

.secure-pdf-blur-shield.panic-blackout {
    background: #000000 !important;
    opacity: 1 !important;
}

.secure-pdf-blur-shield h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.secure-pdf-blur-shield p {
    font-size: 13.5px;
    color: #cccccc;
    max-width: 440px;
    line-height: 1.5;
}

/* Security Toggle Button in Toolbar */
.secure-pdf-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #111111;
    color: #ffce28;
    border: 1px solid #ffce28;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.secure-pdf-toggle-btn:hover {
    background: #ffce28;
    color: #111111;
}

/* Loading Spinner */
.secure-pdf-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 20;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.secure-pdf-spinner {
    width: 42px;
    height: 42px;
    border: 3.5px solid rgba(255, 206, 40, 0.2);
    border-top-color: #ffce28;
    border-radius: 50%;
    animation: securePdfSpin 0.9s linear infinite;
}

@keyframes securePdfSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .secure-pdf-header {
        height: auto;
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .secure-pdf-title-area {
        width: 100%;
        order: 1;
        margin-bottom: 2px;
    }
    .secure-pdf-controls {
        order: 2;
        flex: 1;
        justify-content: space-between;
        gap: 6px;
    }
    .secure-pdf-close-btn {
        order: 3;
        margin-left: 4px;
        padding: 6px 12px;
    }
    .secure-pdf-viewport {
        padding: 10px 4px;
    }
    .secure-pdf-touch-shield-card {
        padding: 22px 16px;
    }
}

/* ==========================================
   Tombol Lihat Dalam Buku Trigger Button
   ========================================== */
.btn-lihat-dalam-buku {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent !important;
    color: #000000 !important;
    border: 1.5px solid #000000 !important;
    border-radius: 30px;
    padding: 8px 24px;
    font-size: 13.5px;
    font-weight: 800;
    font-family: 'Figtree', sans-serif;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: none !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-decoration: none;
}

.btn-lihat-dalam-buku span {
    color: #000000 !important;
    font-weight: 800 !important;
}

.btn-lihat-dalam-buku:hover {
    background: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}

.btn-lihat-dalam-buku:hover span {
    color: #ffffff !important;
}

.btn-lihat-dalam-buku svg {
    stroke: #000000 !important;
    stroke-width: 2.2 !important;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

.btn-lihat-dalam-buku:hover svg {
    stroke: #ffffff !important;
    transform: scale(1.15);
}

