.single {

	.cm-posts {

		.tags a {
			border: 1px solid $color__gray-200;
			padding: 3px 5px;
			border-radius: 3px;
			color: #777777;

			&:hover {
				color: $color__primary;
				text-decoration: none;
			}
		}
	}

	.cm-entry-header {

		.cm-entry-title {
			@include font-size("font-size-xxl");
		}
	}
}

/* Author Box.
--------------------------------------------- */
.author-box {
	padding: 2%;
	width: 100%;
	display: inline-block;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
	margin-bottom: 30px;
}

.author-description-wrapper {
	float: right;
	width: 85%;
}

.author-img img {
	margin-right: 15px;
}

.author-name {
	padding-bottom: 10px;
}

.author-description-wrapper .author-url {
	display: inline-block;
	margin-top: 5px;
	width: 100%;

	a {
		display: inline-block;
		margin-top: 5px;
		width: 100%;
	}
}

.share {
	.fa-twitter {
		color: #55acee;
	}

	.fa-facebook-square {
		color: #3b5998;
	}

	.fa-google-plus-square {
		color: #dd4b39;
	}

	.fa-pinterest {
		color: #cc2127;
	}
}

.author-box {
	margin-top: 30px;

	&.author-bio-style-2 {
		.author-name {
			float: left;
		}

		.author-social-sites {
			float: right;
		}

		.author-description {
			display: inline-block;
		}
	}

	&.author-bio-style-3 {

		.author-social-sites {
			float: left;
		}

		.author-description {
			display: inline-block;
		}
	}

}

/* Related Posts.
--------------------------------------------- */
.related-posts-main-title {
	margin-bottom: length( 'l-15' );

	.fa {
		color: $color__primary;
	}

	span {
		font-size: 26px;
		padding-left: 10px;
	}
}

.single-related-posts {
	width: 100%;
	box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.24);
	border-radius: 4px;
	overflow: hidden;

	.cm-post-content {
		padding: length( 'l-10' )
	}

	.cm-author {
		display: none;
	}

	.cm-post-content {

		.cm-entry-title {
			font-size: 20px;
			margin-bottom: length( 'l-8' );
		}
	}

	img {
		width: 100%;
	}
}

.related-posts-wrapper {
	position: relative;
	margin-top: 30px;

	.related-posts {
		display: grid;
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.related-post-carousel {
		visibility: hidden;
		height: 0;
	}

	&.style-1 {

		.cm-below-entry-meta {
			margin-bottom: 0;
		}
	}

	&.style-2 {

		.single-related-posts {
			display: grid;
    		grid-template-columns: 1fr;
		}

		.related-posts  {
			grid-template-columns: 1fr;
		}
	}

	&.style-3 {

		.related-posts  {
			grid-template-columns: 1fr;
			gap: 12px;
		}

		.single-related-posts {
			width: 100%;
			box-shadow: none;
		}

		.cm-post-content {
			padding: 0;

			.cm-entry-title {
				padding: 0;
				font-size: 16px;
				margin-bottom: 0;

				a {
					position: relative;
					margin-left: 20px;

					&::before {
						display: block;
						content: "";
						background: #333333;
						height: 8px;
						width: 8px;
						top: 50%;
						position: absolute;
						transform: translateY(-50%);
					}

					&:hover {
						&::before {
							background: $color__primary;
						}
					}
				}
			}
		}
	}

	&.style-4 {

		.related-posts {
			display: block;

			.cm-below-entry-meta {
				margin-bottom: 0;
			}
		}
	}
}

/* Related Posts Flyout.
--------------------------------------------- */
.related-posts-wrapper-flyout {
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
	background-color: $color__gray-ten;
	position: fixed;
	bottom: 0;
	right: 0;
	width: 420px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(30px);
	transition: 0.2s all ease-in-out;

	&.flyout {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		z-index: 10;
	}

	.flyout-related-post-close {
		float: right;
		cursor: pointer;
	}

	.related-posts-flyout-main-title {
		font-size: 18px;
		padding: 20px 30px;
		background-color: #2c2e34;
		color: #ffffff;
	}

	.related-posts-flyout {
		padding: 30px;
	}

	.single-related-posts-flyout {
		margin-bottom: 20px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	.related-posts-thumbnail {
		float: left;
		margin-right: 15px;
		width: 130px;
	}

	.cm-post-content {
		min-height: 90px;
		padding: 8px;
	}

	.cm-entry-title {
		font-size: 14px;
		line-height: 1.6;
		padding-bottom: 0;

		a {
			color: #232323;

			&:hover {
				color: $color__primary;
			}
		}
	}

	.cm-author {
		display: none;
	}
}

/* Social Sharing.
--------------------------------------------- */
.share-buttons {
	display: inline-block;
	margin-top: length( 'l-12' );
}

.box {
	border: 1px solid $color__gray-200;
	border-radius: 3px;
	display: inline-block;
}

.count {
	background: none repeat scroll 0 0 #f2f2f2;
	color: $color__primary;
	float: right;
	font-size: 22px;
	padding: 0 16px;
}

.share {
	float: left;
	margin-right: 10px;
}

#twitter, #facebook, #googleplus, #pinterest {
	float: left;

	&.share {
		margin-right: 0;
		padding: 0 10px;
		cursor: pointer;
	}
}

/* Author Social Sites.
--------------------------------------------- */
.author-social-sites {

	li {
		float: left;
	}

	.fa-twitter, .fa-facebook, .fa-google-plus, .fa-flickr, .fa-linkedin, .fa-instagram, .fa-youtube, .fa-tumblr {
		font-size: 25px;
		padding: 5px;
	}

	.fa-twitter {
		color: #55acee;
	}

	.fa-facebook {
		color: #3b5998;
	}

	.fa-google-plus {
		color: #dd4b39;
	}

	.fa-flickr {
		color: #006399;
	}

	.fa-linkedin {
		color: #007bb6;
	}

	.fa-instagram {
		color: #9c7c6e;
	}

	.fa-youtube {
		color: #e02a20;
	}

	.fa-tumblr {
		color: #45556c;
	}
}

@include breakpoint("mdm") {

	.related-posts-wrapper {
	
		.related-posts {
			grid-template-columns: repeat(3, 1fr);
		}

		&.style-2 {

			.single-related-posts {
				grid-template-columns: 50% 50%;
			}
		}	
	}
}
