@import "_variables";

/* ==========================================================================
   CKEditor v5 Variables
   ========================================================================== */
.ck-editor {
  // --ck-z-default: 1;
  // --ck-z-modal: ~"calc(var(--ck-z-default) + 999)";
  --ck-color-base-foreground: @_base-alpha-1;
  --ck-color-base-background: @g_Form-Item-BG;
  --ck-color-base-border: @_base-alpha-4;
  // --ck-color-base-action: #61b045;
  // --ck-color-base-focus: #6cb5f9;
  --ck-color-base-text: @_base;
  --ck-color-base-active: @g_Accent-BG;
  --ck-color-base-active-focus: @g_Focus;
  --ck-color-base-error: @g_Danger-BG;
  --ck-color-focus-border: @g_Focus;
  // --ck-color-focus-outer-shadow: #bcdefb;
  // --ck-color-focus-disabled-shadow: rgba(119, 186, 248, 0.3);
  // --ck-color-focus-error-shadow: rgba(255, 64, 31, 0.3);
  --ck-color-text: var(--ck-color-base-text);
  // --ck-color-shadow-drop: rgba(0, 0, 0, 0.15);
  // --ck-color-shadow-drop-active: rgba(0, 0, 0, 0.2);
  --ck-color-shadow-inner: none;
  // --ck-color-button-default-background: transparent;
  --ck-color-button-default-hover-background: @_base-alpha-3;
  --ck-color-split-button-hover-background: var(--ck-color-button-default-hover-background);
  --ck-color-split-button-hover-border: var(--ck-color-base-border);
  --ck-color-button-default-active-background: @_base-alpha-4;
  --ck-color-button-default-active-shadow: @_base-alpha-4;
  // --ck-color-button-default-disabled-background: transparent;
  --ck-color-button-on-background: @_base-alpha-5;
  --ck-color-button-on-hover-background: @_base-alpha-6;
  --ck-color-button-on-active-background: @_base-alpha-7;
  --ck-color-button-on-active-shadow: @_base-alpha-4;
  --ck-color-button-on-disabled-background: @_base-alpha-4;
  // --ck-color-button-action-background: var(--ck-color-base-action);
  // --ck-color-button-action-hover-background: #579e3d;
  // --ck-color-button-action-active-background: #53973b;
  // --ck-color-button-action-active-shadow: #498433;
  // --ck-color-button-action-disabled-background: #7ec365;
  --ck-color-button-action-text: var(--ck-color-base-background);
  // --ck-color-button-save: #008a00;
  // --ck-color-button-cancel: #db3700;
  // --ck-color-switch-button-off-background: #b0b0b0;
  // --ck-color-switch-button-off-hover-background: #a3a3a3;
  // --ck-color-switch-button-on-background: var(--ck-color-button-action-background);
  // --ck-color-switch-button-on-hover-background: #579e3d;
  --ck-color-switch-button-inner-background: var(--ck-color-base-background);
  // --ck-color-switch-button-inner-shadow: rgba(0, 0, 0, 0.1);
  --ck-color-dropdown-panel-background: var(--ck-color-base-background);
  --ck-color-dropdown-panel-border: var(--ck-color-base-border);
  --ck-color-input-background: var(--ck-color-base-background);
  // --ck-color-input-border: #c7c7c7;
  --ck-color-input-error-border: var(--ck-color-base-error);
  --ck-color-input-text: var(--ck-color-base-text);
  // --ck-color-input-disabled-background: #f2f2f2;
  // --ck-color-input-disabled-border: #c7c7c7;
  // --ck-color-input-disabled-text: #5c5c5c;
  --ck-color-list-background: var(--ck-color-base-background);
  --ck-color-list-button-hover-background: var(--ck-color-button-default-hover-background);
  --ck-color-list-button-on-background: var(--ck-color-base-active);
  --ck-color-list-button-on-background-focus: var(--ck-color-base-active-focus);
  --ck-color-list-button-on-text: @g_Accent-FG;
  --ck-color-panel-background: var(--ck-color-base-background);
  --ck-color-panel-border: var(--ck-color-base-border);
  --ck-color-toolbar-background: var(--ck-color-base-foreground);
  --ck-color-toolbar-border: var(--ck-color-base-border);
  // --ck-color-tooltip-background: var(--ck-color-base-text);
  // --ck-color-tooltip-text: var(--ck-color-base-background);
  // --ck-color-engine-placeholder-text: #707070;
  // --ck-color-upload-bar-background: #6cb5f9;
  // --ck-color-link-default: #0000f0;
  // --ck-color-link-selected-background: rgba(31, 177, 255, 0.1);
  // --ck-color-link-fake-selection: rgba(31, 177, 255, 0.3);
  // --ck-disabled-opacity: .5;
  // --ck-focus-outer-shadow-geometry: 0 0 0 3px;
  // --ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);
  // --ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);
  // --ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);
  --ck-focus-ring: 1px solid var(--ck-color-focus-border);
  // --ck-font-size-base: 13px;
  // --ck-line-height-base: 1.84615;
  --ck-font-face: inherit;
  // --ck-font-size-tiny: 0.7em;
  // --ck-font-size-small: 0.75em;
  // --ck-font-size-normal: 1em;
  // --ck-font-size-big: 1.4em;
  // --ck-font-size-large: 1.8em;
  // --ck-ui-component-min-height: 2.3em;
}

// Form Tweaks
.ck.ck-editor__main > .ck-editor__editable {
  --ck-color-base-background: @g_Form-Item-BG;
}

.ck.ck-editor__editable:not(.ck-editor__nested-editable):hover {
  --ck-color-base-background: @l_Form-Item-hoverBG;
}

.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused {
  --ck-color-base-background: @l_Form-Item-focusBG;
  box-shadow: none !important;
}

// Legacy CKeditor
body .cke_chrome {
  box-shadow: none;
  border-radius: 2px;
}