/**
 * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
 * For more information please see tinymce-advanced.php.
 *
 * Copyright (c) 2007-2019 Andrew Ozz. All rights reserved.
 */

/* Fixes for the Block Editor */
.block-library-classic__toolbar:empty {
    height: 40px;
}

/* Fix top border left over after deselecting */
div.block-library-classic__toolbar {
	border-color: transparent;
	/*transform: translateY(-15px);*/
}

.is-selected div.block-library-classic__toolbar {
	border-left-width: 0;
}

.rtl .is-selected div.block-library-classic__toolbar {
	border-left-width: 1px;
	border-right-width: 0;
}

/* Fix: no left-over top border when an inner block */
.is-selected .block-editor-block-list__block div.block-library-classic__toolbar {
	border-color: transparent;
}

/* Fix the inserter button at the top of the classic block */
.editor-block-list__block[data-type="core/freeform"] > .editor-block-list__insertion-point {
	z-index: 11;
}

/* Fix position of the inserter button at the top of the block */
.editor-block-list__block[data-type="core/freeform"] .editor-block-list__insertion-point-inserter .editor-inserter__toggle {
	margin-top: -2px;
}

/* Fix the stiky "contextual toolbar" from sticking on top of the toolbar when scrolling the block off the screen */
/* Assumes the toolbar has two rown of buttons... */
.editor-block-list__layout .block-editor-block-list__block[data-type="core/freeform"] .block-editor-block-contextual-toolbar {
	margin-bottom: 108px;
}

/* Fix text size and color in drop-downs (overwriten by some themes) */
.block-library-classic__toolbar .mce-btn .mce-txt {
	font-size: 13px;
	color: #454545;
}

/* TinyMCE Menu */
div.mce-menubar,
div.mce-menubar * {
	box-sizing: border-box;
}

/* toolbar after menubar */
div.editor-block-list__layout .block-library-classic__toolbar .mce-menubar + .mce-toolbar-grp .mce-container-body .mce-toolbar {
	padding: 0;
}

@media (min-width: 600px) {
	.block-library-classic__toolbar .mce-menubar > .mce-container-body {
		padding-top: 5px;
		padding-right: 36px;
		white-space: normal;
		width: auto !important;
	}

	.rtl .block-library-classic__toolbar .mce-menubar > .mce-container-body {
		padding-right: 0;
		padding-left: 36px;
	}
}

.block-library-classic__toolbar .mce-menubar {
	min-height: 38px;
}

.block-library-classic__toolbar .mce-menubar i.mce-caret {
	margin-top: 0.32em;
}

.block-library-classic__toolbar .mce-menubar .mce-flow-layout-item {
	margin: 2px 0;
}

div.mce-menu-item.mce-menu-item-preview.mce-active:hover,
div.mce-menu .mce-menu-item:hover,
div.mce-menu .mce-menu-item.mce-selected,
div.mce-menu .mce-menu-item:focus,
div.mce-menu .mce-menu-item-normal.mce-active,
div.mce-menu .mce-menu-item-preview.mce-active {
	background: #0073aa; /* See color scheme. */
	color: #fff;
}

div.mce-menu-item.mce-menu-item-preview.mce-active .mce-text,
div.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico,
div.mce-menu-item:hover .mce-text,
div.mce-menu-item:focus .mce-text,
div.mce-menu-item:hover .mce-ico,
div.mce-menu-item:focus .mce-ico,
div.mce-menu-item:hover .mce-menu-shortcut,
div.mce-menu-item:focus .mce-menu-shortcut,
div.mce-menu-item.mce-active .mce-menu-shortcut,
div.mce-menu-item.mce-disabled:hover .mce-text,
div.mce-menu-item.mce-disabled:hover .mce-ico {
	color: inherit;
}

div.mce-menu .mce-menu-item.mce-disabled {
	cursor: default;
}

div.mce-menu .mce-menu-item.mce-disabled:hover {
    background: #ccc;
}


/* Toolbars (some get appended to <body>) */
div.mce-toolbar-grp .mce-btn:hover button,
div.mce-toolbar-grp .mce-btn:hover i,
div.mce-toolbar-grp .mce-btn.mce-active button,
div.mce-toolbar-grp .mce-btn.mce-active:hover button,
div.mce-toolbar-grp .mce-btn.mce-active i,
div.mce-toolbar-grp .mce-btn.mce-active:hover i
div.mce-inline-toolbar-grp .mce-btn:hover button,
div.mce-inline-toolbar-grp .mce-btn:hover i,
div.mce-inline-toolbar-grp .mce-btn.mce-active button,
div.mce-inline-toolbar-grp .mce-btn.mce-active:hover button,
div.mce-inline-toolbar-grp .mce-btn.mce-active i,
div.mce-inline-toolbar-grp .mce-btn.mce-active:hover i {
	color: #191e23;
}

div.mce-toolbar-grp .mce-btn i,
div.mce-inline-toolbar-grp .mce-btn i {
	font-style: normal;
}

div.mce-widget.mce-tooltip .mce-tooltip-inner {
	font-size: 13px;
	opacity: 1;
}


/* Menubar */
div.mce-menubar.mce-toolbar .mce-btn button {
	padding: 3px 4px 2px;
}

div.mce-menubar {
	border-color: #e5e5e5;
	background: #fff;
	border-width: 0px 0px 1px;
}

div.mce-menubar .mce-menubtn:focus {
	color: #124964;
	box-shadow:
		0 0 0 1px #5b9dd9,
		0 0 2px 1px rgba(30, 140, 190, .8);
}

div.mce-menu .mce-menu-item-sep,
div.mce-menu-item-sep:hover {
	border-bottom: 1px solid #ddd;
	height: 0px;
	margin: 5px 0;
}

div.mce-menubtn span {
	margin-right: 0;
	padding-left: 3px;
}

div.mce-menu-has-icons i.mce-ico:before {
	margin-left: 0;
}

div.mce-menu-has-icons i.mce-ico {
	line-height: 16px;
}

.wp-core-ui .mce-menu-item .mce-text {
	font-size: 13px;
}

.block-library-classic__toolbar .mce-menubar .mce-menubtn:hover,
.block-library-classic__toolbar .mce-menubar .mce-menubtn.mce-active,
.block-library-classic__toolbar .mce-menubar .mce-menubtn:focus {
	border-color: transparent;
}

.block-library-classic__toolbar .mce-menubar .mce-menubtn:hover span,
.block-library-classic__toolbar .mce-menubar .mce-menubtn.mce-active span,
.block-library-classic__toolbar .mce-menubar .mce-menubtn:focus span {
	color: #000;
}

/* Editor content */
.wp-block-freeform.block-library-rich-text__tinymce table {
	width: 100%;
}
