/**
 * Custom PDF.js Viewer Styles
 * Dark background with hidden toolbar for clean viewing experience
 */

/* Hide toolbar and sidebar completely */
#toolbarContainer,
#toolbarViewer,
.toolbar,
#sidebarContainer,
#sidebarResizer {
    display: none !important;
}

/* Dark background for main viewer container */
#viewerContainer {
    background-color: #1a1a1a !important;
    /* Adjust position since toolbar is hidden */
    inset: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Dark background for outer container */
#outerContainer {
    background-color: #1a1a1a !important;
}

/* Dark background for main container */
#mainContainer {
    background-color: #1a1a1a !important;
    /* Remove toolbar height offset */
    inset: 0 !important;
}

/* Dark background for the entire body */
body {
    background-color: #1a1a1a !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure PDF pages are well-presented on dark background */
.page {
    margin: 15px auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #333 !important;
}

/* Hide additional UI elements for clean viewing */
#secondaryToolbar,
#findbar,
#editorModeButtons,
#toolbar,
#toolbarSidebar {
    display: none !important;
}

/* Ensure sidebar is completely hidden */
#outerContainer.sidebarOpen #viewerContainer {
    inset-inline-start: 0 !important;
}

/* Hide any loading bars or messages */
#loadingBar {
    background-color: #1a1a1a !important;
}

/* Style scrollbars for dark theme (webkit browsers) */
#viewerContainer::-webkit-scrollbar {
    width: 8px;
    background-color: #1a1a1a;
}

#viewerContainer::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 4px;
}

#viewerContainer::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* Ensure text selection on PDF remains visible */
::selection {
    background-color: rgba(100, 150, 255, 0.3) !important;
}

/* Hide any error messages or dialogs with dark styling */
.dialog {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}

/* Dark theme for context menus if they appear */
.contextMenu {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}