/* FILE: editor-block/_base.scss */

.editor-styles-wrapper {
	// Not using `$selector_editor_wrapper` here because
	// specificity should be as low as possible!

	*,
	*::after,
	*::before {
		border-color: inherit;
	}

}

#{ $selector_editor_wrapper } {
	padding-top: 0; // This is being taken care of in of _post-title.scss.
	// For bottom padding see below.

	// Colors.

		body & {
			background-color: var(--color_content_background);
			color: var(--color_content_text);
			border-color: var(--color_content_border);
		}

	// Elements.

		a {
			color: var(--color_accent);
		}

		li {

			ul,
			ol {

				&:last-child {
					margin-bottom: 0;
				}

			}

		}

		ul,
		ol {
			padding: 0;

			ul {
				list-style: disc;
			}

		}

		ul[class^="wp-block-"],
		ol[class^="wp-block-"] {
			padding-#{$left}: 0;
		}

		[data-type*="gallery"] ul {
			margin: 0;
			list-style: none;
		}

		#{ $selectors_margin_bottom } {

			&:last-child {
				margin-bottom: calc( var(--typography_size_html) * #{ $golden } ); // Simulating rem unit for block editor.
			}

		}

		blockquote,
		.wp-block-quote {
			border: 0;
		}

		blockquote {

			p {

				&,
				&:last-child {
					margin-bottom: 1em;
				}

			}

		}

		.wp-block:not(:first-child) {

			h2, h3, h4, h5, h6 {

				&:first-child {
					margin-top: calc( var(--white_space) / 2 );
				}

			}

		}

		[style*="font-size:"] {

			h1, h2, h3, h4, h5, h6 {
				font-size: inherit;
			}

		}

		[style*="font-weight:"] {

			h1, h2, h3, h4, h5, h6 {
				font-weight: inherit;
			}

		}

}

.block-editor-block-list__layout {
	padding-bottom: var(--white_space);
	// No need to match bottom padding to front-end content.

	&.wp-block,
	.wp-block & {
		padding-bottom: 0;
	}

}

h1, h2, h3, h4, h5, h6 {

	#{ $selector_editor_wrapper } &:focus,
	.wp-block.is-selected > & {
		text-transform: none;
		letter-spacing: 0;
	}

}
