/**
 * PDF Preview Popup - Styles
 */

/* Overlay */
.pdf-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.pdf-preview-modal {
    background: #1e1e1e;
    border-radius: 8px;
    max-width: 1200px;
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.pdf-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.pdf-preview-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.pdf-nav-btn,
.pdf-action-btn,
.pdf-close-btn {
    background: #007bff;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pdf-nav-btn:hover,
.pdf-action-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.pdf-nav-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.pdf-nav-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.pdf-close-btn {
    background: #dc3545;
    padding: 6px 12px;
    font-size: 24px;
    line-height: 1;
    font-weight: 300;
}

.pdf-close-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

.pdf-download-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #28a745;
}

.pdf-download-btn:hover {
    background: #218838;
}

/* Page Info */
.pdf-page-info {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* Zoom Level Display */
.pdf-zoom-level {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
    padding: 0 8px;
}

/* Content Area */
.pdf-preview-content {
    flex: 1;
    overflow: auto;
    display: block;
    background: #121212;
    padding: 20px;
    position: relative;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

/* Canvas */
.pdf-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    display: inline-block;
    vertical-align: top;
    margin-top: 0;
    margin-left:auto;
    margin-right:auto;
}

/* Loading Indicator */
.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #e0e0e0;
    text-align: center;
    z-index: 10;
}

.pdf-loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 15px auto 0;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Visual indicator for PDF links - DISABLED */
.pdf-preview-link {
    position: relative;
}

/* Removed PDF icon
.pdf-preview-link::after {
    content: '📄';
    margin-left: 4px;
    font-size: 0.9em;
    opacity: 0.7;
}
*/

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-preview-overlay {
        padding: 10px;
    }
    
    .pdf-preview-modal {
        max-height: 98vh;
    }
    
    .pdf-preview-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .pdf-preview-controls,
    .pdf-preview-actions {
        width: 100%;
        justify-content: center;
    }
    
    .pdf-nav-btn,
    .pdf-action-btn,
    .pdf-close-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .pdf-preview-content {
        padding: 10px;
    }
}

/* Scrollbar Styling */
.pdf-preview-content::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pdf-preview-content::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.pdf-preview-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
}

.pdf-preview-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Accessibility */
.pdf-nav-btn:focus,
.pdf-action-btn:focus,
.pdf-close-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print hiding */
@media print {
    .pdf-preview-overlay {
        display: none !important;
    }
}
