html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    background: #666;

    overflow: hidden;

    font-family: Arial, sans-serif;
}

#toolbar {
    height: 56px;

    background: #222;
    color: #fff;

    display: flex;
    align-items: center;

    padding: 0 15px;

    box-sizing: border-box;

    gap: 20px;
}

.toolbar-title {
    flex: 1;

    min-width: 0;

    font-size: 17px;
    font-weight: 500;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar-controls button {
    height: 34px;

    min-width: 34px;

    border: 0;
    border-radius: 3px;

    background: #444;
    color: #fff;

    font-size: 16px;

    cursor: pointer;

    padding: 0 10px;
}

.toolbar-controls button:hover {
    background: #555;
}

#pageNumber {
    width: 48px;
    height: 34px;

    box-sizing: border-box;

    border: 0;
    border-radius: 3px;

    text-align: center;

    font-size: 14px;
}

#zoomValue {
    min-width: 48px;

    text-align: center;

    font-size: 14px;
}

.toolbar-separator {
    width: 1px;
    height: 28px;

    background: #555;

    margin: 0 8px;
}

#viewer {
    height: calc(100% - 56px);

    overflow: auto;

    text-align: center;

    background: #777;

    padding: 20px 0;

    box-sizing: border-box;
}

.pdf-page {
    display: block;

    margin: 0 auto 20px auto;

    background: #fff;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.pdf-page-container {
    position: relative;

    margin: 0 auto 20px auto;

    background: #fff;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.pdf-page {
    display: block;
}

/*
 * PDF Viewer - Popup mode
 */

.pdf-viewer-wrapper {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.pdf-viewer-wrapper #toolbar {
    flex: 0 0 56px;
}

.pdf-viewer-wrapper #viewer {
    flex: 1 1 auto;

    min-height: 0;
}

/*
 * PDF Print
 */

#printContainer {
    display: none;
}

@media print {

    @page {
        margin: 0;
    }

    html,
    body {
        width: 100%;
        height: auto;

        margin: 0;
        padding: 0;

        background: #fff;

        overflow: visible;
    }

    /*
     * Hide the normal viewer while printing.
     */

    #toolbar,
    #viewer {
        display: none !important;
    }

    /*
     * Show the print pages.
     */

    #printContainer {
        display: block !important;

        width: 100%;
        margin: 0;
        padding: 0;
    }

    .print-page {
        display: block;

        width: 100%;

        margin: 0;
        padding: 0;

        page-break-after: always;
        break-after: page;
    }

    .print-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .print-page-canvas {
        display: block;

        margin: 0;
        padding: 0;

        max-width: none;
    }
}
