/**
 * Fullscreen (maximize) mode for CKEditor 5 classic instances.
 * Toggled by public/js/ckeditor-fullscreen.js.
 */

/* Toolbar toggle, pushed to the right end of the toolbar. */
.ck.ck-toolbar .ck-editor__fullscreen-button {
    margin-left: auto;
    color: inherit;
}

body.ck-fullscreen-active {
    overflow: hidden;
}

/* Balloon panels (link, image, table toolbars) live in <body>, so they must
   stay above the maximized editor. */
body.ck-fullscreen-active {
    --ck-z-modal: 1210;
}

body.ck-fullscreen-active .ck.ck-balloon-panel {
    z-index: 1210;
}

.ck.ck-editor.ck-editor_fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* Above the AdminLTE sidebar (1100), which is fixed and not trapped in a
       stacking context by .content-wrapper (static, so its z-index is inert). */
    z-index: 1200;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: #fff;
    border-radius: 0;
}

.ck.ck-editor.ck-editor_fullscreen .ck.ck-editor__top {
    flex: 0 0 auto;
}

.ck.ck-editor.ck-editor_fullscreen .ck.ck-editor__main {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.ck.ck-editor.ck-editor_fullscreen .ck.ck-editor__main > .ck-editor__editable {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: none;
    border-radius: 0;
}

/* The sticky toolbar is meaningless once the editor owns the viewport, and its
   inline positioning would break the flex layout. */
.ck.ck-editor.ck-editor_fullscreen .ck.ck-sticky-panel__content {
    position: static !important;
    top: auto !important;
    width: auto !important;
    margin-left: 0 !important;
    box-shadow: none;
}

.ck.ck-editor.ck-editor_fullscreen .ck.ck-sticky-panel__placeholder {
    display: none !important;
}
