/*!
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
.k-pdf-viewer {
    display: flex;
    flex-direction: column;
    overflow: hidden;

    // Toolbar
    .k-toolbar {
        border-top-width: 0;
        border-right-width: 0;
        border-left-width: 0;
        border-color: inherit;
        flex: 0 0 auto;
        z-index: 2;
    }

    // Pager
    .k-pager-wrap {
        display: flex;
        flex: 0 0 auto;
        padding: 0;
        min-height: auto;
        align-items: center;
        background: none;
        color: inherit;
    }

    // Canvas
    .k-list-scroller {
        flex: 1 1 auto;
        outline: none;

        .k-enable-text-select {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
            cursor: text;
        }

        .k-enable-panning {
            cursor: grab;
        }
        .k-enable-panning span::selection {
            background-color: transparent;
        }
    }

    // Page
    .k-page {
        position: relative;
        margin: @pdf-viewer-page-spacing auto;

        canvas {
            direction: ltr;
        }

        .k-text-layer {
            position: absolute;
            top: 0;
            left: 0;
            opacity: .2;
            overflow: hidden;

            > span {
                position: absolute;
                transform-origin: 0% 0%;
                color: transparent;
            }

            mark {
                color: transparent;
            }
        }
    }

}

// Window
.k-pdf-viewer-window {
    flex: 1 1 auto;

    .k-edit-field {
        .k-textbox,
        .k-file-format {
            width: 100%;
        }
    }

    .k-action-buttons {
        top: @pdf-viewer-action-buttons-top-offset;
        padding: @pdf-viewer-action-buttons-padding;
        margin-bottom: calc(@pdf-viewer-action-buttons-padding - 1em);
    }
}

// Search
.k-pdf-viewer-search-dialog {
    padding: @pdf-viewer-search-dialog-spacing;

    .k-search-container {
        display: flex;
        flex: 0 0 auto;
        justify-content: flex-start;
        align-items: center;

        .k-textbox {
            display: inline-flex;
            align-items: center;
            background: none;
            padding-right: @pdf-viewer-search-dialog-textbox-padding-x;
            margin: 0 @pdf-viewer-search-dialog-spacing;

            .k-icon {
                position: relative;
                top: auto;
                margin: 0;
                font-size: inherit;
            }

            .k-search-dialog-input::-ms-clear {
                display: none;
            }

            &:after {
                content: "";
            }
        }

        .k-match-case-button {
            height: @pdf-viewer-search-dialog-input-button-height;
        }

        .k-search-matches {
            display: inline-block;
            min-width: @pdf-viewer-search-dialog-matches-width;
            margin: 0 @pdf-viewer-search-dialog-spacing 0 @pdf-viewer-search-dialog-button-spacing;
            vertical-align: middle;
        }

        > .k-button {
            margin-left: @pdf-viewer-search-dialog-button-spacing;
        }

        .k-search-dialog-draghandle  {
            cursor: move;
            margin-left: 0;
        }
    }
}
