/**
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
 */
:root, :host {
  --ck-source-editing-enhanced-height: calc(var(--ck-dialog-max-height)            /* ─▶   Total max height of the dialog     */
		- var(--ck-form-header-height)         /* ─▶   Height of the dialog header        */
		- 2 * var(--ck-spacing-large, var(--ck-spacing-lg))          /* ─┐                                       */
		- var(--ck-ui-component-min-height, var(--ck-size-min-height))    /*  ├─▶ Height of the dialog actions bar   */
		- 2 * var(--ck-spacing-tiny, var(--ck-spacing-xs))           /* ─┘                                       */
		- 2 * var(--ck-dialog-content-padding)           /* ─▶   Padding of the dialog content           */);
  --ck-source-editing-enhanced-width: min(80vw, 1200px);
  --ck-source-editing-enhanced-font-size: var(--ck-font-size-md);
}

.ck.ck-code-editor {
  white-space: initial;
  padding: var(--ck-dialog-content-padding);
  height: var(--ck-source-editing-enhanced-height);
  width: var(--ck-source-editing-enhanced-width);
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  margin: 0 auto;
  display: flex;

  & .cm-editor {
    width: 100%;
    font-size: var(--ck-source-editing-enhanced-font-size);
    border: var(--ck-border-control);
    border-radius: var(--ck-input-border-radius);
    flex-grow: 1;

    &.cm-focused {
      border-color: var(--ck-input-focus-border-color);
      box-shadow: var(--ck-focus-outer-shadow, var(--ck-interactive-focus-shadow)), 0 0;
      outline: none;
    }

    & .cm-scroller {
      border-radius: var(--ck-input-border-radius);
    }
  }
}
