/**
 * @license Copyright (c) 2014-2020, CKSource - Frederico Knabben. All rights reserved.
 * This file is licensed under the terms of the MIT License (see LICENSE.md).
 */

 :root {
	--ck-sample-base-spacing: 2em;
	--ck-sample-color-white: #fff;
	--ck-sample-color-green: #279863;
	--ck-sample-color-blue: #1a9aef;
	--ck-sample-container-width: 1285px;
	--ck-sample-sidebar-width: 350px;
	--ck-sample-editor-min-height: 400px;

	 /* Overrides the border radius setting in the theme. */
	 --ck-border-radius: 4px;

	 /* Overrides the default font size in the theme. */
	 --ck-font-size-base: 14px;

	 /* Helper variables to avoid duplication in the colors. */
	 --ck-custom-background: hsl(270, 1%, 29%);
	 --ck-custom-foreground: hsl(255, 3%, 18%);
	 --ck-custom-border: hsl(300, 1%, 22%);
	 --ck-custom-white: hsl(0, 0%, 100%);

	 /* -- Overrides generic colors. ------------------------------------------------------------- */

	 --ck-color-base-foreground: var(--ck-custom-background);
	 --ck-color-focus-border: hsl(208, 90%, 62%);
	 --ck-color-text: hsl(0, 0%, 98%);
	 --ck-color-shadow-drop: hsla(0, 0%, 0%, 0.2);
	 --ck-color-shadow-inner: hsla(0, 0%, 0%, 0.1);

	 /* -- Overrides the default .ck-button class colors. ---------------------------------------- */

	 --ck-color-button-default-background: var(--ck-custom-background);
	 --ck-color-button-default-hover-background: hsl(270, 1%, 22%);
	 --ck-color-button-default-active-background: hsl(270, 2%, 20%);
	 --ck-color-button-default-active-shadow: hsl(270, 2%, 23%);
	 --ck-color-button-default-disabled-background: var(--ck-custom-background);

	 --ck-color-button-on-background: var(--ck-custom-foreground);
	 --ck-color-button-on-hover-background: hsl(255, 4%, 16%);
	 --ck-color-button-on-active-background: hsl(255, 4%, 14%);
	 --ck-color-button-on-active-shadow: hsl(240, 3%, 19%);
	 --ck-color-button-on-disabled-background: var(--ck-custom-foreground);

	 --ck-color-button-action-background: hsl(168, 76%, 42%);
	 --ck-color-button-action-hover-background: hsl(168, 76%, 38%);
	 --ck-color-button-action-active-background: hsl(168, 76%, 36%);
	 --ck-color-button-action-active-shadow: hsl(168, 75%, 34%);
	 --ck-color-button-action-disabled-background: hsl(168, 76%, 42%);
	 --ck-color-button-action-text: var(--ck-custom-white);

	 --ck-color-button-save: hsl(120, 100%, 46%);
	 --ck-color-button-cancel: hsl(15, 100%, 56%);

	 /* -- Overrides the default .ck-dropdown class colors. -------------------------------------- */

	 --ck-color-dropdown-panel-background: var(--ck-custom-background);
	 --ck-color-dropdown-panel-border: var(--ck-custom-foreground);

	 /* -- Overrides the default .ck-splitbutton class colors. ----------------------------------- */

	 --ck-color-split-button-hover-background: var(--ck-color-button-default-hover-background);
	 --ck-color-split-button-hover-border: var(--ck-custom-foreground);

	 /* -- Overrides the default .ck-input class colors. ----------------------------------------- */

	 --ck-color-input-background: var(--ck-custom-foreground);
	 --ck-color-input-border: hsl(257, 3%, 43%);
	 --ck-color-input-text: hsl(0, 0%, 98%);
	 --ck-color-input-disabled-background: hsl(255, 4%, 21%);
	 --ck-color-input-disabled-border: hsl(250, 3%, 38%);
	 --ck-color-input-disabled-text: hsl(0, 0%, 46%);

	 /* -- Overrides the default .ck-list class colors. ------------------------------------------ */

	 --ck-color-list-background: var(--ck-custom-background);
	 --ck-color-list-button-hover-background: var(--ck-color-base-foreground);

	 /* -- Overrides the default .ck-balloon-panel class colors. --------------------------------- */

	 --ck-color-panel-background: var(--ck-custom-background);
	 --ck-color-panel-border: var(--ck-custom-border);

	 /* -- Overrides the default .ck-toolbar class colors. --------------------------------------- */

	 --ck-color-toolbar-background: var(--ck-custom-background);
	 --ck-color-toolbar-border: var(--ck-custom-border);

	 /* -- Overrides the default .ck-tooltip class colors. --------------------------------------- */

	 --ck-color-tooltip-background: hsl(252, 7%, 14%);
	 --ck-color-tooltip-text: hsl(0, 0%, 93%);

	 /* -- Overrides the default colors used by the ckeditor5-image package. --------------------- */

	 --ck-color-image-caption-background: hsl(0, 0%, 97%);
	 --ck-color-image-caption-text: hsl(0, 0%, 20%);

	 /* -- Overrides the default colors used by the ckeditor5-widget package. -------------------- */

	 --ck-color-widget-blurred-border: hsl(0, 0%, 87%);
	 --ck-color-widget-hover-border: hsl(43, 100%, 68%);
	 --ck-color-widget-editable-focus-background: var(--ck-custom-white);

	 /* -- Overrides the default colors used by the ckeditor5-link package. ---------------------- */

	 --ck-color-link-default: hsl(190, 100%, 75%);
}
/* --------- EDITOR STYLES  ---------------------------------------------------------------------------------------- */

.editor__editable,
/* Classic build. */
main .ck-editor[role='application'] .ck.ck-content,
/* Decoupled document build. */
.ck.editor__editable[role='textbox'],
.ck.ck-editor__editable[role='textbox'],
/* Inline & Balloon build. */
.ck.editor[role='textbox'] {
	width: 100%;
	background: #fff;
	font-size: 1em;
	line-height: 1.6em;
	min-height: var(--ck-sample-editor-min-height);
	padding: 1.5em 2em;
}

.ck.ck-editor__editable {
	background: #fff;
	border: 1px solid hsl(0, 0%, 70%);
	width: 100%;
}

.ck.ck-editor {
	/* To enable toolbar wrapping. */
	width: 100%;
	overflow-x: hidden;
}

/* Because of sidebar `position: relative`, Edge is overriding the outline of a focused editor. */
.ck.ck-editor__editable {
	position: relative;
	z-index: 10;
}

/* --------- DECOUPLED (DOCUMENT) BUILD. ---------------------------------------------*/
body[data-editor='DecoupledDocumentEditor'] .document-editor__toolbar {
	width: 100%;
}

body[ data-editor='DecoupledDocumentEditor'] .collaboration-demo__editable,
body[ data-editor='DecoupledDocumentEditor'] .row-editor .editor {
	width: 18.5cm;
	height: 100%;
	min-height: 26.25cm;
	padding: 1.75cm 1.5cm;
	margin: 2.5rem;
	border: 1px hsl( 0, 0%, 82.7% ) solid;
	background-color: var(--ck-sample-color-white);
	box-shadow: 0 0 5px hsla( 0, 0%, 0%, .1 );
}

body[ data-editor='DecoupledDocumentEditor'] .row-editor {
	display: flex;
	position: relative;
	justify-content: center;
	overflow-y: auto;
	background-color: #f2f2f2;
	border: 1px solid hsl(0, 0%, 77%);
}

body[data-editor='DecoupledDocumentEditor'] .sidebar {
	background: transparent;
	border: 0;
	box-shadow: none;
}

/* Do not inherit styles related to the editable editor content. See line 25.*/
.sidebar .ck-content[role='textbox'],
.ck.ck-annotation-wrapper .ck-content[role='textbox'] {
	min-height: unset;
	width: unset;
	padding: 0;
	background: transparent;
}

#sidebar-display-toggle {
	position: absolute;
	z-index: 1;
	width: 30px;
	height: 30px;
	text-align: center;
	left: 15px;
	top: 30px;
	border: 0;
	padding: 0;
	color: hsl( 0, 0%, 50% );
	transition: 250ms ease color;
	background-color: transparent;
}

#sidebar-display-toggle:hover {
	color: hsl( 0, 0%, 30% );
	cursor: pointer;
}

#sidebar-display-toggle:focus,
#sidebar-display-toggle:active {
	outline: none;
	border: 1px solid #a9d29d;
}

#sidebar-display-toggle svg {
	fill: currentColor;
}

/* --------- COLLABORATION FEATURES (USERS) ------------------------------------------------------------------------ */
.row-presence {
	width: 100%;
	border: 1px solid hsl(0, 0%, 77%);
	border-bottom: 0;
	background: hsl(0, 0%, 98%);
	padding: var(--ck-spacing-small);

	/* Make `border-bottom` as `box-shadow` to not overlap with the editor border. */
	box-shadow: 0 1px 0 0 hsl(0, 0%, 77%);

	/* Make `z-index` bigger than `.editor` to properly display tooltips. */
	z-index: 20;
}

.ck.ck-presence-list {
    flex: 1;
    padding: 1.25rem .75rem;
}

.presence .ck.ck-presence-list__counter {
	order: 2;
	margin-left: var(--ck-spacing-large)
}

/* --------- REAL TIME COLLABORATION FEATURES (SHARE TOPBAR CONTAINER) --------------------------------------------- */
.collaboration-demo__row {
	display: flex;
	position: relative;
	justify-content: center;
	overflow-y: auto;
	background-color: #f2f2f2;
	border: 1px solid hsl(0, 0%, 77%);
}

body[ data-editor='InlineEditor'] .collaboration-demo__row {
	border: 0;
}

.collaboration-demo__container {
	max-width: var(--ck-sample-container-width);
	margin: 0 auto;
	padding: 1.25rem;
}

.presence, .collaboration-demo__row {
	transition: .2s opacity;
}

.collaboration-demo__topbar {
	background: #fff;
	border: 1px solid var(--ck-color-toolbar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}

.collaboration-demo__topbar .btn {
	margin-right: 1em;
	outline-offset: 2px;
	outline-width: 2px;
	background-color: var( --ck-sample-color-blue );
}

.collaboration-demo__topbar .btn:focus,
.collaboration-demo__topbar .btn:hover {
	border-color: var( --ck-sample-color-blue );
}

.collaboration-demo__share {
	display: flex;
	align-items: center;
	padding: 1.25rem .75rem
}

.collaboration-demo__share-description p {
	margin: 0;
	font-weight: bold;
	font-size: 0.9em;
}

.collaboration-demo__share input {
	height: auto;
	font-size: 0.9em;
	min-width: 220px;
	margin: 0 10px;
	border-radius: 4px;
	border: 1px solid var(--ck-color-toolbar-border)
}

.collaboration-demo__share button,
.collaboration-demo__share input {
	height: 40px;
	padding: 5px 10px;
}

.collaboration-demo__share button {
	position: relative;
}

.collaboration-demo__share button:focus {
	outline: none;
}

.collaboration-demo__share button[data-tooltip]::before,
.collaboration-demo__share button[data-tooltip]::after {
	position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all .15s cubic-bezier(.5,1,.25,1);
	z-index: 1;
}

.collaboration-demo__share button[data-tooltip]::before {
	content: attr(data-tooltip);
    padding: 5px 15px;
    border-radius: 3px;
    background: #111;
    color: #fff;
    text-align: center;
    font-size: 11px;
	top: 100%;
    left: 50%;
    margin-top: 5px;
    transform: translateX(-50%);
}

.collaboration-demo__share button[data-tooltip]::after {
    content: '';
	border: 5px solid transparent;
    width: 0;
    font-size: 0;
    line-height: 0;
	top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom: 5px solid #111;
	border-top: none;
}

.collaboration-demo__share button[data-tooltip]:hover:before,
.collaboration-demo__share button[data-tooltip]:hover:after {
	visibility: visible;
    opacity: 1;
}

.collaboration-demo--ready {
	overflow: visible;
	height: auto;
}

.collaboration-demo--ready .presence,
.collaboration-demo--ready .collaboration-demo__row {
	opacity: 1;
}

/* --------- RWD --------------------------------------------------------------------------------------------------- */
@media screen and ( max-width: 800px ) {
	:root {
		--ck-sample-base-spacing: 1em;
	}

	header h1 {
		width: 100%;
	}

	header h1 img {
		height: 40px;
	}

	header nav ul {
		text-align: right;
	}

	main .message h2 {
		font-size: 1.5em;
	}
}