$headersSizeBase: 34px;
$headersFont: 'Open sans', Helvetica, sans-serif;
$bodyFont: 'Open sans', Helvetica, sans-serif;


/* 	Modify the height of a specific CSS class to fix an issue in Chrome 77 with Gutenberg.
 * 	@see https://github.com/WordPress/gutenberg/issues/17406
 */

.block-editor-writing-flow {
	height: auto;
}

.wp-block,
.wp-block[data-type="core/more"] {
	max-width: 1000px;
	color: #656565;
}


.editor-rich-text__tinymce.mce-content-body, 
.mce-content-body > *,
.editor-rich-text {
	line-height: 1.75;
}

.editor-post-title__block .editor-post-title__input {
	font-family: $headersFont;
	font-size: 48px;
	font-weight: 400;
	line-height: 1.2em;
	margin-bottom: 25px;
	text-transform: uppercase;
	margin: 0;

	.post-type-page & { 
		font-family: $headersFont;
		font-size: 50px;
		font-weight: 400;
		line-height: 1.2em;
		text-transform: uppercase;
		margin: 0;
	}
}

.editor-styles-wrapper > * {
	font-family: $bodyFont;
	color: #656565;
	font-size: 16px;
	
	a {
		color: inherit;
		text-decoration: none;
		
		&:hover {
			text-decoration: underline;
		}
	}
}

.editor-styles-wrapper {
	font-family: $bodyFont;
	
	p, 
	ol,
	ul,
	.wp-block-latest-posts	{
		margin: 0 0 1.563rem 0;
		line-height: 1.7;
	}

	.block-library-list {
		ol,
		ul	{
			line-height: 1.7;
			padding-left: 1.25em;
			margin: 0 0 1.563rem 0;
			
			> li {
				ol, ul {
					padding-left: 1.25em;
					margin-bottom: 0;
				}
			}
			
			&:last-child {
				margin-bottom: 0;
			}
		}
	}
	
	[data-align*='center'] ul {
		list-style: none;
		text-align: center;
		padding-left: 0;
		
		ul {
			list-style: none;
			padding-left: 0;
			margin-top: 0;
		}
	}
	
	hr,
	.wp-block-separator	{
		clear: both;
		background-color: currentColor;
		margin: 40px 0;
		height: 4px;
		border: 0;
		max-width: 100%;
		
		&:not(.is-style-wide):not(.is-style-dots) {
			max-width: 30px;	
		}
		
		&.is-style-dots {
			margin: 40px auto;
			background: none;
			border: none;
			text-align: center;
			max-width: none;
			line-height: 1;
			height: auto;
			
			&:before {
				color: inherit;
				font-weight: bold;
				letter-spacing: normal;
			}
		}
		&.is-style-wide {
			margin: 40px auto;
			height: 2px;
		}
	}
	
	.wp-block-latest-posts,
	ul.wp-block-archives	{
		line-height: 1.7em;
		padding-left: 1.25em;
		margin: 0 0 1.563rem 0; 
		
		> li {
			ol, ul {
				padding-left: 1.25em;
				margin-bottom: 0;
			}
		}
		
		&:last-child {
			margin-bottom: 0;
		}
	}
}


.wp-block-heading > * {
	font-family: $headersFont;
}

.editor-styles-wrapper {
	.wp-block,
	.wp-block-heading,
	.wp-block-freeform.block-library-rich-text__tinymce {

		h1, h2, h3, h4, h5, h6 {
			font-family: $headersFont;
			color: #222;
			margin: 1.2em 0 1.165em;
			line-height: 1.2;
			font-weight: 300;
		}

		h1, h2, h3, h4, h5, h6 {
			&:first-child {
				margin-top: 0;
			}
		}
		
		h1{
			font-size: 34px;
		}

		h2 {
			font-size: 26px;
		}

		h3  {
			font-size: 20px;
		}

		h4 {
			font-size: 17px;
		}

		h5 {
			font-size: 15px;
		}

		h6 {
			font-size: 13px;
		}
	}
}



.wp-block-table,
table {
	width: 100%;
	margin: 0 0 1.563rem 0;
	border-collapse: collapse;
    border-spacing: 0;

	thead th {
		font-weight: 600;
		background-color: #8a97a0;
		color: #FFF;
	}

	tr {
		background-color: #f4f7f8;
		border-bottom: 2px solid #FFF;
		margin-bottom: 5px;
	}

	tr:nth-child(even) {
		background-color: #e8eeef;
	}

	th, td {
		text-align: left;
		padding: 16px;
		border: 0;
	}

	tfoot tr {
		background-color: none;
	}

	tfoot td {
		padding: 10px 2px;
		font-size: 0.8em;
		font-style: italic;
		color: #8a97a0;
	}
}

.wp-block-table__cell-content {
	padding: 0;
}


.wp-block-freeform.core-blocks-rich-text__tinymce,
.core-blocks-list {
	
	dl {
		margin: 0 0 1.563rem;
	}

	dt {
		font-weight: 600;
	}

	dd {
		margin: 0 1.563rem 1.563rem;
	}	

	address {
		font-style: italic;
		margin: 0 0 1.563rem;
		line-height: 1.4;
	}
	
	p,
	ol,
	ul {
		margin: 0 0 1.563rem 0;
		
		&:last-child {
			margin-bottom: 0;
		}
	}

	ol,
	ul {
		line-height: 1.7;
		padding-left: 1.25em;
		
		> li {
			margin-bottom: 0;
			
			ol, ul {
				padding-left: 1.25em;
				margin-bottom: 0;
			}
		}
	}
}

.wp-block-verse pre, 
pre.wp-block-verse,
pre,
samp {
	font-family: monospace, monospace;
    max-width: 100%;
    padding: 1.35em;
    display: block;
    background-color: #f7f7f7;
    overflow: auto;
    font-size: 14px;
    line-height: 1.375;
    margin: 0 0 1.563rem 0;
    color: #444;
  
  .wp-block-preformatted & {
	font-family: monospace, monospace; /* 1 */
  }
}
code,
kbd {
    font-family: monospace, monospace;
    background-color: #ebebeb;
    line-height: 1.6em;
    padding: 0 5px;
}
q {
	quotes: unset;
	
	&::before {
		content: open-quote;
	}
	::after {
		content: close-quote;
	}
}


.wp-block-button__link {
	border-radius: 5px;
	padding: 10px 20px 9px 20px;
	line-height: 12px;
	font-size: 11px;
	font-weight: 600;	
	
	.is-style-outline & {
		border-color: #ccc;
	}
	
	&:hover {
		opacity: 0.7;
	}
}

.wp-block-separator {
    border: none;
    border-bottom: 2px solid #8f98a1;
    max-width: 100px;
    margin: 1.65em auto;

}

.wp-block-pullquote {
	border-left: 0;
	border-top: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
	
	blockquote {
		>.block-editor-rich-text p {
			font-size: 20px;
		}
	}
	
	&.alignleft,
	&.alignright {	
		border-top: 0;
		border-bottom: 0;
		text-align: left;
		padding: 0;
	
		> blockquote {
			margin: 20px;
			padding: 0;
		}
	}
	&.alignright {
		margin: 0.375em 0 0.375em 1.75em;
	}
	&.alignleft {
		margin: 0.375em 1.75em 0.375em 0;
	}
	
	.wp-block-pullquote__citation {
		font-size: 12px;
		font-family: Arial, sans-serif;
		font-style: normal;
		text-transform: none;
	}
}

.wp-block-quote,
blockquote {
	font-weight: 600;
    text-transform: uppercase;
    margin: 20px 25px;
    border-left: 2px solid currentColor;
    background-color: #f7f7f7;
    padding: 15px 20px;
    font-size: 14px;
	color: #444;
	
	&.wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:right"], 
	&.wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: right"] {
		border-right: 2px solid currentColor;
		border-left: 0;
		padding: 15px 20px;
	}
	
	&.wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:center"], 
	&.wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: center"] {
		border-left: 2px solid currentColor;
		border-right: 0;
		padding: 15px 20px;
	}
	
	.wp-block-pullquote & {
		border-left: 0;
		border-right: 0;
		background-color: transparent;
		margin: 0;
		padding: 0;
	}
	
	cite,
	.wp-block-quote__citation {
		font-style: normal;
		font-size: 80%;
	}
	
	pre, samp {
		padding: 0 1.35em;
		line-height: normal;
	}
	
	p {
		font-size: inherit;
		line-height: inherit;
		
		&:last-child {
			margin: 0 0 1.563rem 0;
		}
	}
	
	&.is-large,
	&.is-style-large {
		border: none;
		padding: 0;
		font-family: 'Times New Roman', serif;
		background-color: transparent;
		margin: 40px;
		font-weight: 400;
		text-transform: none;
		
		p {
			font-size: 32px;
			line-height: 1.4;
		}
		
		.wp-block-quote__citation,
		cite {
			font-size: 14px;
		}
	}
}

.alignleft {
	float: left;
	margin: 0.375em 1.75em 0.375em 0;
	
	@media ( max-width: 440px ) {
		margin: 0.375em auto 1.75em auto;
		float: none;
	}
}

.alignright {
	float: right;
	margin: 0.375em 0 0.375em 1.75em;
	
	@media ( max-width: 440px ) {
		margin: 0.375em auto 1.75em auto;
		float: none;
	}
}

.aligncenter {
	clear: both;
	display: block;
	margin: 0 auto 1.75em;
}

figcaption,
[class*="wp-block-"] figcaption,
caption {
	color: inherit;
    font-style: normal;
	text-align: center;
	font-size: 13px;
}