/* Singular
---------------------------------------------------------------------------------------------------- */

/* Entry Content
--------------------------------------------- */

.entry-content {
	@import "entry-content";
}

.entry-content > *,
.block-area > * {

	margin: $block-margin 0;
	max-width: 100%;

	&:first-child {
		margin-top: 0;
	}

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

	.full-width-content &,
	.content & {
		&.alignwide {
			margin: calc( 2 * #{$block-margin} ) calc(50% - 50vw);
			max-width: 100vw;
			width: auto;

			@include media(">=tablet") {
				margin: calc( 2 * #{$block-margin}) calc(25% - 25vw);
			}
		}

		&.alignfull {
			margin: calc( 2 * #{$block-margin} ) calc(50% - 50vw);
			max-width: 100vw;
			width: 100vw;
		}
	}

	&.alignleft {
		/*rtl:ignore*/
		float: left;
		margin: 0 $block-margin $block-margin 0;
	}

	&.alignright {
		/*rtl:ignore*/
		float: right;
		margin: 0 0 $block-margin $block-margin;
	}

	&.aligncenter {
		margin-left: auto;
		margin-right: auto;
	}

	&.wp-block-quote,
	&.post-listing-block {
		margin-top: calc( 2 * #{$block-margin});
		margin-bottom: calc( 2 * #{$block-margin});
	}

	&.wp-block-search {
		max-width: 568px;
		margin-left: auto;
		margin-right: auto;
	}

}

.entry-content > .alignfull {

	&:first-child {
		margin-top: -36px;
		@include media(">=tablet") {
			margin-top: -48px;
		}
	}

	&:last-child {
		margin-bottom: -36px;
		@include media(">=tablet") {
			margin-bottom: -48px;
		}
	}

}

/* Entry Meta
--------------------------------------------- */

.entry-author {
	font-size: 14px;

	.avatar {
		border-radius: 50%;
		display: inline-block;
		vertical-align: middle;
		margin-right: 4px;
	}

	a {
		color: $base-color;
		text-decoration: none;

		&:hover {
			color: $highlight;
		}
	}
}

.breadcrumb {
	font-size: 16px;
	margin-bottom: 24px;

	a {
		color: $base-color;

		&:hover {
			color: $highlight;
		}
	}

	.single & {
		border-top: 1px solid $border-color;
		padding-top: 32px;
		text-align: center;
	}
}

.author-box {
	position: relative;
	padding-left: 120px;
	min-height: 120px;

	.archive & {
		grid-column: 1 / -1;
		max-width: $content-width;
		margin: 0 auto $grid-gap;
	}

	.author-box-title {
		@include font-sizes( 22px, 28px );
	}

	.avatar {
		border-radius: 50%;
		position: absolute;
		top: 0;
		left: 0;
	}
}

/* Single Post
--------------------------------------------- */

.singular {

	.entry-header {
		margin-bottom: 18px;

		@include media(">=tablet") {
			margin-bottom: 48px;
			overflow: hidden;
			width: 100%;

			.entry-author {
				float: left;
				margin: 0;
			}

			.shared-counts-wrap {
				float: right;
			}
		}

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

.after-entry {

	& > * {
		margin: 24px 0;

		@include media(">=tablet") {
			margin: 42px 0;
		}
	}

	.publish-date {
		font-size: 16px;
		text-align: center;
	}
}

.related-posts {
	@supports( display: $grid ) {
		@include media(">=tablet") {
			display: grid;
			grid-template-columns: repeat( 3, 1fr );
			grid-column-gap: 16px;

			header {
				grid-column: 1 / -1;
			}
		}
	}
}

/* Comments
--------------------------------------------- */

.entry-comments {

	.comment-list {
		margin: 0 0 $margin_2x;

		li {
			list-style-type: none;
			border: 1px solid $grey_3;

			article {
				padding: $base-margin;
				position: relative;
			}

			&.staff > article {
				background: rgba( $highlight, .05 );
				border-left: 2px solid $highlight;
			}
		}

		& > li {
			border-radius: 3px;
			overflow: hidden;
			margin-bottom: 15px;
		}

		.comment-author {
			color: $base-color;
			display: inline-block;
			vertical-align: middle;
			margin: 0;
			font-family: $serif;
			@include font-sizes( 18px, 22px );

			a {
				color: $base-color;
				text-decoration: none;

				&:hover {
					color: $highlight;
				}
			}

			.says {
				display: none;
			}
		}

		.comment-edit-link {
			display: none;
		}

		.comment-meta {
			font-size: 14px;
			color: $grey_6;
			vertical-align: middle;

			a {
				color: $grey_6;
				font-weight: 400;
				text-decoration: none;

				&:hover {
					color: $highlight;
				}
			}
		}

		.comment-content {

			p:last-child {
				margin: 0;
			}
		}

		.comment-reply-link {
			position: absolute;
			top: 16px;
			right: 16px;
			font-size: 16px;
			text-transform: uppercase;
			text-decoration: none;
		}

		ul.children {
			margin: 0;

			li {
				border-top: 1px solid $border-color;
			}
		}

	}
}

.nav-links {
	@include clearfix;

	.nav-previous {
		float: left;
	}

	.nav-next {
		float: right;
	}
}

.comment-navigation {

	a {
		font-size: 20px;
		text-transform: uppercase;
		text-decoration: none;
	}
}

.comment-respond {
	margin: 30px 0;

	@include media(">=tablet") {
		margin: 60px 0;
	}

	label {
		display: block;
		margin-right: 12px;

		&[for="subscribe"],
		&[for="wp-comment-cookies-consent"] {
			display: inline-block;
		}
	}

	@include media(">=tablet") {

		.comment-form-author,
		.comment-form-email {
			float: left;
			width: calc( 50% - 16px );
		}

		.comment-form-email {
			margin-left: 32px;
		}

		input[type="submit"] {
			width: auto;
		}
	}
}
