/*-------------------------------------------------------*/
/* Gutenberg Front-end Styles
/*-------------------------------------------------------*/

// Background color
:root .has-red-background-color {
	background-color: $editor-color-1;
}
:root .has-orange-background-color {
	background-color: $editor-color-2;
}
:root .has-pink-background-color {
	background-color: $editor-color-3;
}
:root .has-yellow-background-color {
	background-color: $editor-color-4;
}
:root .has-tiber-background-color {
	background-color: $editor-color-5;
}
:root .has-navy-blue-background-color {
	background-color: $editor-color-6;
}
:root .has-dark-blue-background-color {
	background-color: $editor-color-7;
}
:root .has-silver-background-color {
	background-color: $editor-color-8;
}
:root .has-white-background-color {
	background-color: #ffffff;
}
:root .has-black-background-color {
	background-color: #000000;
}

// Text color
:root .has-red-color {
	color: $editor-color-1;
}
:root .has-orange-color {
	color: $editor-color-2;
}
:root .has-pink-color {
	color: $editor-color-3;
}
:root .has-yellow-color {
	color: $editor-color-4;
}
:root .has-tiber-color {
	color: $editor-color-5;
}
:root .has-navy-blue-color {
	color: $editor-color-6;
}
:root .has-dark-blue-color {
	color: $editor-color-7;
}
:root .has-silver-color {
	color: $editor-color-8;
}

/* Buttons
-------------------------------------------------------*/
.wp-block-button .wp-block-button__link {
	@include editor-button;
}

.wp-block-button__link:not(.has-background),
.wp-block-button__link:not(.has-background):active,
.wp-block-button__link:not(.has-background):focus,
.wp-block-button__link:not(.has-background):hover,
.wp-block-button__link:not(.has-background):visited {
	background-color: $primary-color;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
}

/* Full-width Images
-------------------------------------------------------*/
.everse-fullwidth .entry__article {
	.alignwide {
		width: auto;
		max-width: none;
		position: relative;
		z-index: 1;

		@media only screen and (min-width: 1240px) {
			margin-left: -60px;
			margin-right: -60px;
		}

		@media only screen and (min-width: 1400px) {
			margin-left: -120px;
			margin-right: -120px;
		}
	}

	.alignfull {
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		max-width: 100vw;
		position: relative;
		z-index: 1;

		img {
			width: 100vw;
		}
	}
}

/* Images
-------------------------------------------------------*/
.wp-block-image {
	.alignleft {
		margin-right: 2em;
		max-width: 40%;

		@include bp-sm-down {
			float: none;
			margin-right: 0;
		}
	}

	.alignright {
		margin-left: 2em;
		max-width: 40%;

		@include bp-sm-down {
			float: none;
			margin-left: 0;
		}
	}
}

/* Cover
-------------------------------------------------------*/
.wp-block-cover {
	margin: 0 0 1.5em;
	font-size: 1rem;
	line-height: 1.3;
	color: #fff;

	&.alignleft {
		margin: 0.5em 2em 1.5em 0;
	}

	&.alignright {
		margin: 0.5em 0 1.5em 2em;
	}
}

.wp-block-cover,
.wp-block-cover-image {
	padding: 2em;
}

.wp-block-cover-image .wp-block-cover-image-text,
.wp-block-cover .wp-block-cover-text,
section.wp-block-cover-image > h2 {
	font-size: 2.25em;
}

/* Tables
-------------------------------------------------------*/
.wp-block-table {
	width: 100%;
	margin-bottom: 2rem;
}

.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color
	tr:nth-child(odd),
.wp-block-table.is-style-stripes tr:nth-child(odd) {
	background-color: #f9f9f9;
}

/* Latest Comments
-------------------------------------------------------*/
ol.wp-block-latest-comments {
	padding-left: 0;
}

/* Galleries
-------------------------------------------------------*/
ul.wp-block-gallery,
.wp-block-gallery ul {
	list-style: none;
	padding-left: 0;
}

/* Captions
-------------------------------------------------------*/
.wp-block-image figcaption,
.wp-block-embed figcaption,
.wp-block-audio figcaption {
	color: $meta-color;
}

.wp-block-image figcaption {
	margin-top: 1em;
}

/* Separators
-------------------------------------------------------*/
hr {
	margin-top: 20px;
	margin-bottom: 20px;
	border: 0;
	overflow: hidden;
	border-top: 1px solid $border-color;
}

.wp-block-separator {
	border-color: $border-color;
	border-top: none;
}

.wp-block-separator:not(.is-style-wide):not(.is-style-dots),
.wp-block-separator.is-style-default {
	max-width: 100px;
	margin-left: auto;
	margin-right: auto;
}

.wp-block-separator.is-style-dots:before {
	font-weight: 700;
	color: $text-color;
}

/* Blockquote / Pullquote
-------------------------------------------------------*/
blockquote {
	overflow: hidden;
}

.wp-block-quote {
	&.has-text-align-center {
		border: 0;
	}

	&.has-text-align-right {
		border-left: 0;
		border-right-width: 3px;
		border-right-style: solid;
	}

	&.is-large,
	&.is-style-large {
		padding: 40px;
		margin-top: 40px;
		margin-bottom: 40px;

		p {
			font-size: 2rem;
		}

		cite,
		footer {
			font-size: 1rem;
		}
	}
}

.wp-block-pullquote {
	text-align: left;
	position: relative;
	line-height: 1.5;
	padding: 0.1em 1em 0.2em 2.5em;
	margin-bottom: 30px;
	margin-top: 0;
	color: $heading-color;

	blockquote {
		margin: 0;
		border: 0;
		padding: 0;
		line-height: normal;
	}

	&::before {
		content: "“";
		color: $primary-color;
		left: 0;
		top: 0;
		position: absolute;
		font-size: 5rem;
		line-height: 1;
	}

	p {
		color: inherit;
	}

	cite {
		opacity: 0.7;
	}

	blockquote:not(.has-text-color) cite {
		color: $text-color;
	}

	@include bp-sm-up {
		&.alignleft {
			margin-right: 2em /*!rtl:end:ignore*/;
		}

		&.alignright {
			margin-left: 2em /*!rtl:end:ignore*/;
		}
	}
}

// Solid Color
.wp-block-pullquote.is-style-solid-color {
	&.alignleft blockquote p,
	&.alignright blockquote p {
		font-size: 1.25rem;
	}
}

/* Social Icons
-------------------------------------------------------*/
ul.wp-block-social-links {
	padding: 0;

	.wp-social-link a:focus {
		color: currentColor;
		fill: currentColor;
	}
}

.wp-block-social-links .wp-social-link a {
	padding: 0.5em;
}

/* Latest Posts
-------------------------------------------------------*/
.wp-block-latest-posts {
	&.wp-block-latest-posts__list {
		padding: 0;
	}

	&__featured-image {
		margin-bottom: 10px;
	}

	a {
		display: inline-block;
		line-height: 1.5;
	}
}

/* Categories
-------------------------------------------------------*/
.entry__article {
	.wp-block-categories li::before,
	.wp-block-latest-comments__comment::before,
	.wp-block-latest-posts__list li::before {
		margin-top: 14px;
	}
}

.wp-block-categories.wp-block-categories-list ul,
.wp-block-categories.wp-block-categories-list .children {
	padding-left: 0;
	list-style: none;
}
