/* PDF Reader Component Styles */

.pdf-reader-container {
    border: 2px solid #e0e0e0;
    min-height: 1200px;
    background: #f9f9f9;
    margin-top: 1.5rem;
}

.placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1200px;
    color: #666;
    font-size: 1.1rem;
}

.pdf-controls button:hover {
    background: #1e40af !important;
    color: white !important;
}

#pdfToolbar button:hover {
    background: #f0f0f0 !important;
    border-color: #999 !important;
}

#pdfToolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pdfPrint:hover {
    background: #1e3a8a !important;
}

.pdf-page {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Wider scrollbar for PDF container */
#pdfCanvasContainer::-webkit-scrollbar {
    width: 16px;
}

#pdfCanvasContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0;
}

#pdfCanvasContainer::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 0;
}

#pdfCanvasContainer::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Text viewer page separators */
.page-separator {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: #999;
    font-size: 0.85rem;
    font-family: 'Segoe UI', sans-serif;
}

.page-separator::before,
.page-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

.page-separator::before {
    margin-right: 1rem;
}

.page-separator::after {
    margin-left: 1rem;
}

/* Search highlighting */
.search-highlight {
    background-color: #ffd700;
    padding: 2px 4px;
    border-radius: 2px;
}

/* PDF.js text layer styles */
.textLayer {
    position: absolute;
    text-align: initial;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.2;
    line-height: 1.0;
    text-size-adjust: none;
    forced-color-adjust: none;
}

.textLayer span,
.textLayer br {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

/* Show text selection */
.textLayer ::selection {
    background: rgba(0, 0, 255, 0.3);
}

.textLayer ::-moz-selection {
    background: rgba(0, 0, 255, 0.3);
}

/* Ensure text is selectable */
.textLayer .highlight {
    margin: -1px;
    padding: 1px;
    background-color: rgba(180, 0, 170, 0.2);
    border-radius: 4px;
}

.textLayer .highlight.appended {
    position: initial;
}

.textLayer .highlight.begin {
    border-radius: 4px 0 0 4px;
}

.textLayer .highlight.end {
    border-radius: 0 4px 4px 0;
}

.textLayer .highlight.middle {
    border-radius: 0;
}

.textLayer .highlight.selected {
    background-color: rgba(0, 100, 0, 0.2);
}

/* Fix text layer opacity on hover/selection */
.textLayer:hover {
    opacity: 0.2;
}

.textLayer ::selection {
    background: rgba(0, 0, 255, 0.3);
    color: transparent;
}

/* Page container needs relative positioning for text layer */
.pdf-page {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.pdf-page-inner {
    position: relative;
}

