/* CSS for collabora online Drupal module */
/*
 * Copyright the Collabora Online contributors.
 *
 * SPDX-License-Identifier: MPL-2.0
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

html {
    height: 100%;
}

.collabora-frame {
    height: 100%;
    margin: 0;
}

.collabora-frame__preview {
    width: 100%;
    height: 100%;
    border: 0;
}

.collabora-frame__iframe {
    border: 1px solid;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.collabora-editor__dialog {
    --collabora-outer-padding: 10px;
    --collabora-right-margin: (100wv - var(--wp--style--global--content-size)) / 2;
    position: fixed;
    top: calc(var(--wp-admin--admin-bar--height) + var(--collabora-outer-padding));
    width: calc(100% - var(--collabora-right-margin));
    height: calc(100% - var(--wp-admin--admin-bar--height) - var(--collabora-outer-padding) * 2);
    /* seems to be a reasonable value to be above of it all */
    z-index: 501;
    box-sizing: border-box;
    padding: 0;
    /* These need to be 'important' as they are overriden by WP. */
    margin-left: var(--collabora-outer-padding) !important;
    margin-right: var(--collabora-outer-padding) !important;
    margin-block-start: 0;
}

dialog.collabora-editor__dialog.alignfull {
    /* These need to be 'important' as they are overriden by WP 2022 them as important. */
    margin-left: var(--collabora-outer-padding) !important;
    margin-right: var(--collabora-outer-padding) !important;
    width: calc(100% - var(--collabora-right-margin)) !important;
    /* TwentyTwenty override this */
    position: fixed;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    /* Neve theme override this */
    padding: 0;
}

.collabora-editor__body {
    margin: 0;
    height: 100%;
}
