/* ==========================================================================
   PDF Display Styles
   ========================================================================== */
   #pdf-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.pdf-controls {
    margin-bottom: 1rem;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pdf-controls button {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.pdf-controls button:hover {
    background: #eee;
}

#pdf-viewer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    font-size: 0;
    line-height: 0;
    overflow-x: auto; /* Add horizontal scroll */
    overflow-y: hidden; /* Prevent vertical scroll */
    white-space: nowrap; /* Keep content in single line */
}

#pdf-container:fullscreen {
    background: white;
    padding: 20px;
    overflow: auto;
}

#pdf-container:fullscreen .pdf-controls {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Ensure the same spacing in fullscreen mode */
#pdf-container:fullscreen .page-wrapper {
    font-size: 0;
    line-height: 0;
}

#pdf-container:fullscreen .page-wrapper canvas {
    margin: 0; /* Explicitly set margin to 0 in fullscreen */
    padding: 0;
}

#pdf-container:fullscreen .page-wrapper canvas:first-child {
    border-right: 1px solid #ddd;
}

#pdf-viewer canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#page-info {
    font-size: calc(var(--base-font-size) * 0.9);
}

#zoom-select {
    padding: 5px;
    border-radius: 4px;
}

.page-wrapper {
    display: inline-flex; /* Changed to inline-flex */
    justify-content: center;
    align-items: flex-start; /* Ensure top alignment */
    gap: 0;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 0; /* Eliminate any white space between inline elements */
    line-height: 0;
}

.page-wrapper canvas {
    margin: 0;
    padding: 0;
    display: block;
}

.page-wrapper canvas:first-child {
    border-right: 1px solid #ddd;
}

.button {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font-size: var(--base-font-size);
}

.button:hover {
    background: #eee;
}

/* Fullscreen styles */
#pdf-container:fullscreen {
    background: white;
    padding: 20px;
    overflow: auto;
}

#pdf-container:fullscreen .pdf-controls {
    position: sticky;
    top: 0;
    z-index: 1000;
}
