/* stylelint-disable scss/at-extend-no-missing-placeholder */
@use '../../styles/mat-selectors' as ms;

.adf-full-screen {
    width: 100%;
    height: 100%;
    background-color: var(--adf-theme-background-card-color);
}

.adf-viewer {
    position: absolute;
    width: 100%;
    height: 100%;

    #{ms.$mat-toolbar} {
        color: var(--adf-theme-foreground-text-color-064);

        .adf-toolbar-title {
            width: auto;
        }
    }

    &-main {
        width: 0;
    }

    &__mimeicon {
        vertical-align: middle;
        height: 18px;
        width: 18px;
        margin-left: 4px;
        margin-right: 4px;
    }

    &-toolbar {
        #{ms.$mat-toolbar} {
            background-color: var(--adf-theme-background-card-color-087);
        }
    }

    &__file-title {
        text-align: center;
        flex: 1 1 auto;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: row;
        align-items: center;

        @media screen and (width <= 1450px) {
            left: 30%;
        }
    }

    &__title-display-name-container,
    &__display-name {
        font-size: var(--theme-subheading-2-font-size);
        line-height: 1.5;
        vertical-align: middle;
        color: var(--adf-theme-foreground-text-color);
        white-space: nowrap;
    }

    &__display-name-value,
    &__title-value {
        margin-top: 0;
        margin-bottom: 0;
        text-align: left;
    }

    &__display-name-value {
        font-size: var(--theme-body-1-font-size);
    }

    &-container {
        .adf-viewer-layout-content {
            @extend .adf-full-screen;

            position: relative;
            overflow: hidden;
            z-index: 1;
            background-color: var(--theme-background-color);
            display: flex;
            flex-direction: row;
            /* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
            flex-wrap: wrap;
            flex: 1;

            & > div {
                display: flex;
                flex-flow: row wrap;
                margin: 0 auto;
                align-items: stretch;
                height: 100%;
            }
        }

        .adf-viewer-layout {
            @extend .adf-full-screen;

            display: flex;
            flex-direction: row;
            overflow: hidden auto;
            position: relative;
        }

        .adf-viewer-content {
            @extend .adf-full-screen;

            flex: 1;
            flex-direction: column;
            display: flex;

            & > div {
                height: 0; // Firefox
            }
        }
    }

    &-overlay-container {
        .adf-viewer-content {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1000;
        }
    }

    &-inline-container {
        @extend .adf-full-screen;
    }

    &-sidebars {
        display: flex;
        flex: 1 1 auto;

        .adf-viewer__sidebar {
            width: 350px;
            display: block;
            padding: 0;
            background-color: var(--theme-background-color);
            box-shadow: 0 2px 4px 0 var(--adf-theme-foreground-text-color-027);
            overflow: auto;

            &__right {
                border-left: 1px solid var(--adf-theme-foreground-text-color-007);
                order: 4;
            }

            &__left {
                border-right: 1px solid var(--adf-theme-foreground-text-color-007);
                order: 1;
            }
        }

        adf-viewer-render {
            order: 1;
            flex: 1 1 auto;
            display: flex;
        }
    }
}
