/* ============================================
   PDF VIEWER STYLES
   ============================================ */

/* PDF Header */
.pdf-header {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.pdf-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* PDF Controls */
.pdf-controls {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-info .form-control {
    width: 70px;
    text-align: center;
    font-weight: 500;
}

.page-count {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-controls .form-select {
    width: 100px;
}

.btn-group .btn {
    padding: 8px 12px;
}

/* PDF Viewer Container */
.pdf-viewer-container {
    position: relative;
    min-height: 600px;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

/* Loading State */
.pdf-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.pdf-loading .spinner-border {
    width: 60px;
    height: 60px;
}

.pdf-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 1.1rem;
}

/* Error State */
.pdf-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 10;
    padding: 40px;
}

.error-icon {
    font-size: 60px;
    color: #dc3545;
    margin-bottom: 20px;
}

.pdf-error h4 {
    color: #dc3545;
    margin-bottom: 15px;
}

.pdf-error p {
    color: #666;
    text-align: center;
    max-width: 500px;
    margin-bottom: 20px;
}

/* PDF Canvas Container */
.pdf-canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 20px;
}

#pdfCanvas {
    display: block;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    background: white;
    max-width: 100%;
    max-height: 100%;
}

/* PDF Thumbnails */
.pdf-thumbnails-container {
    margin-top: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.thumbnails-title {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.thumbnails-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
}

.thumbnail {
    width: 120px;
    flex-shrink: 0;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
}

.thumbnail:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue);
}

.thumbnail canvas {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-page-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* PDF Info */
.pdf-info {
    padding: 40px 0;
}

.document-info {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #555;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    width: 20px;
    text-align: center;
}

.action-buttons .btn {
    padding: 12px;
    font-weight: 500;
}

/* Fullscreen Styles */
:fullscreen .pdf-viewer-container,
:-webkit-full-screen .pdf-viewer-container,
:-moz-full-screen .pdf-viewer-container,
:-ms-fullscreen .pdf-viewer-container {
    height: 100vh;
    border-radius: 0;
    border: none;
}

:fullscreen .pdf-canvas-container,
:-webkit-full-screen .pdf-canvas-container,
:-moz-full-screen .pdf-canvas-container,
:-ms-fullscreen .pdf-canvas-container {
    height: calc(100vh - 60px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .pdf-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pdf-actions {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 15px;
    }
    
    .pdf-header {
        text-align: center;
    }
    
    .pdf-header .d-flex {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .pdf-viewer-container {
        min-height: 400px;
    }
    
    .thumbnail {
        width: 100px;
    }
    
    .zoom-controls .form-select {
        width: 80px;
    }
    
    .page-info .form-control {
        width: 60px;
    }
}

@media (max-width: 576px) {

    
    .btn-group {
        width: 100%;
        justify-content: center;
    }
    
    .thumbnail {
        width: 80px;
    }
    
    .pdf-canvas-container {
        padding: 10px;
    }
}

/* Scrollbar Styling */
.thumbnails-scroll::-webkit-scrollbar {
    height: 8px;
}

.thumbnails-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.thumbnails-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.thumbnails-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.pdf-canvas-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pdf-canvas-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pdf-canvas-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.pdf-canvas-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.btn-align-custom{
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}