/**
    It's first part of /includes/pdftron-custom/styles-external.css file.
    Extruded to separate file after DRY refactoring between PDFTron & IIIF OpenLayers.
*/
.CommonLayout-Body {
    background-color: #ddd;
    height: 100%;
}

/* Table rendering to fix pdftron vertical height offset with breadcrumbs height */
.CommonLayout-TableWrapper {
    display: table;
    width: 100%;
    height: 100%;
}

.CommonLayout-TableHeader {
    display: table-row;
}

.CommonLayout-TableHeader_compactPadding {
    padding-top: 7px;
    padding-bottom: 7px;
}

.CommonLayout-TableRow {
    display: table-row;
    height: 100%;
}

.CommonLayout-translationBlock {
    box-shadow: rgba(0, 0, 0, 0.35) 0 5px 15px;
    border-radius: 5px;
    height: 95vh;
    width: 600px;
    max-width: 95vw;
    max-height: 95vh;
    background-color: #fffff7;
    overflow: hidden;
    box-sizing: border-box;
    position: absolute;
}

.CommonLayout-translationBlock--container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.CommonLayout-translationBlock--action:not([disabled]):hover,
.CommonLayout-translationBlock--action:not([disabled]):focus {
    background-color: #e7edf3;
    border-radius: 4px;
}

.CommonLayout-translationBlock--action:disabled,
.CommonLayout-translationBlock--action:disabled {
    opacity: 0.4;
}

.CommonLayout-translationBlock--nav {
    position: sticky;
    top: 0;
    z-index: 10002;
    display: flex;
    justify-content: flex-end;
    padding: 0.5em 0;
    background-color: #f8f9fa;
    border-top: 1px solid #cfd4da;
    border-bottom: 1px solid #cfd4da;
    height: 36px;
    width: 100%;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    cursor: move;
    user-select: none;
}

.CommonLayout-translationBlock--navRight {
    display: flex;
    justify-content: center;
    align-items: center;
}

.CommonLayout-translationBlock--pageSwitchContainer {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-left: 15em;

    /*
       Hiding the pagination component as we now have infinite scrolling
       Keeping the functionality built in so we can bring it back in the
       future if need be.
     */
    display: none;
}

.CommonLayout-translationBlock--backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* A nice background if we want it to be greyed out, simply uncomment */
    /*background: rgba(0, 0, 0, 0.3);*/
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.CommonLayout-translationBlock--goToInput {
    width: 40px;
    height: 20px;
    border: 1px solid #cfd4da;
    border-radius: 4px;
    padding: 1px 2px;
    text-align: center;
}

.CommonLayout-translationBlock--searchInput {
    border: 1px solid #cfd4da;
    border-radius: 4px;
    padding: 4px;
    margin-right: 1em;
}

.CommonLayout-translationBlock--machineTranslationNote {
    margin: 1em;
    font-weight: bold;
    text-align: center;
    font-size: 12px;
    padding: 10px;
}

.CommonLayout-translationBlock--goToInput::-webkit-inner-spin-button,
.CommonLayout-translationBlock--goToInput::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
}

.CommonLayout-translationBlock--closeBtn {
    margin-right: 1em;
}

.CommonLayout-translationBlock--translation {
    overflow-y: auto;
    max-height: 85vh;
    padding: 10px 40px;
}

.CommonLayout-translationBlock--resizeButton {
    width: 24px;
    height: 24px;
    cursor: se-resize;
    background: transparent;
    border: none;
    padding: 0;
    user-select: none;
}

.CommonLayout-translationBlock--resizeButtonSvg {
    display:block;
}

.CommonLayout-translationBlock--translation img {
    width: auto;
    height: auto;
    max-height: 600px;
    max-width: 100%;
}

.CommonLayout-pdfTronToast {
    position: fixed;
    left: 50%;
    bottom: 0.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1em 2em;
    width: fit-content;
    height: 50px;
    border-radius: 10px;
    background-color: #333333;
    color: #ffffff;
    box-shadow: 0 3px 5px -1px rgb(0 0 0 / 20%), 0 6px 10px 0 rgb(0 0 0 / 14%), 0 1px 18px 0 rgb(0 0 0 / 12%);
    animation: slide-in-bottom .4s 1;
}

.CommonLayout-pdfTronToast--error {
    background-color: #9d3939;
}

@keyframes slide-in-bottom {
    from {
        transform: translateY(1000px);
    }
}

/* Used for spinner and error message */
.CommonLayout-CenteredContentWrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    overflow: auto;
    flex-direction: column;
}

/* Display inline to allow long text wrap */
.active.CommonLayout-BreadcrumbTitle {
    display: inline;
}

/* Workaround to keep active breadcrumb selectable but not clickable */
.active.CommonLayout-BreadcrumbTitle > a {
    pointer-events: none;
}

/* Fix strange Breadcrumb offset */
@media (max-width: 768px) {
    .Breadcrumb {
        margin-top: 0;
    }
}

#document-viewer-loading-spinner img,
#document-viewer-loading-error img {
    width: 120px;
    height: 120px;
}

#document-viewer-app {
    width: 100%;
    height: 100%;
}

@media (max-width: 767px) {
    body.CommonLayout-Body {
        padding-top: 0;
    }
}

#resizeWrapper {
    position: sticky;
    bottom: 4px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 10001;
}

#resizeButton {
    pointer-events: auto;
    cursor: se-resize;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    user-select: none;
}

#resizeButton svg line {
    stroke: gray;
    stroke-width: 2;
    opacity: 0.7;
}

#resizeButton:hover svg line {
    opacity: 1;
}
