/**
 * Flipbooks Frontend Styles
 * File: assets/css/flipbooks.css
 */

/* Flipbooks Tab Container */
.pz-flipbooks-tab {
    padding: 20px 0;
}

.pz-flipbooks-tab h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.pz-flipbooks-intro {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Flipbooks Grid */
.pz-flipbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Flipbook Card */
.pz-flipbook-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pz-flipbook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #4A90E2;
}

/* Flipbook Icon */
.pz-flipbook-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pz-flipbook-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

/* Flipbook Title */
.pz-flipbook-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Flipbook Description */
.pz-flipbook-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Open Book Button */
.pz-open-flipbook-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.pz-open-flipbook-btn svg {
    width: 18px;
    height: 18px;
}

.pz-open-flipbook-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* Modal Styles */
.pz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pz-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.pz-modal-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1000000;
}

.pz-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.pz-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.pz-modal-close {
    background: #e0e0e0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.pz-modal-close:hover {
    background: #d0d0d0;
    color: #333;
    transform: rotate(90deg);
}

.pz-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

#pz-flipbook-content {
    width: 100%;
    height: 100%;
    position: relative;
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#pz-flipbook-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    /* Prevent iframe interaction shortcuts */
    pointer-events: auto;
}

/* Loading Spinner */
.pz-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Flipbooks State */
.pz-no-flipbooks {
    margin: 40px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pz-flipbooks-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pz-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .pz-modal-header {
        padding: 15px 20px;
    }
    
    .pz-modal-header h3 {
        font-size: 18px;
    }
    
    .pz-flipbook-card {
        padding: 25px 20px;
    }
}

/* Print Protection */
@media print {
    .pz-flipbooks-tab,
    .pz-modal {
        display: none !important;
    }
}

/* Additional Security - Disable DevTools Detection */
.pz-modal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}