/* # WordPress Specific Styles ===== */

/* ## Skip Link ===== */
.skip-link {
	display: none;
}

/* ## Gallery ===== */
.gallery {
	.gallery-row {
		@include grid-row($behavior: nest);
	}
	@for $i from 1 through 4 {
		.col-#{$i} {
			@include grid-column($grid-column-count/$i);

			&:last-child:not(:first-child) {
				float: left;
			}
		}
	}

	.gallery-item {
		float: left;
		margin: 0;

		.gallery-icon {
			padding: rem-calc(15);
			text-align: center;
		}

		.gallery-caption {
			font-style: italic;
		}

	}

}

@for $i from 1 through 9 {
	.gallery-columns-#{$i} {
		.gallery-item {
			width: 100%/$i;
		}
	}
}

/* ## Comments ===== */
.comment-list {
	margin-left: 0;
	list-style-type: none;
	.children {
		list-style-type: none;
	}
}

/* ## Image Alignment ===== */
$grid-column-gutter-medium: map-get($grid-column-gutter, medium);

.alignnone {
	margin: $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 0;
}

.aligncenter, div.aligncenter {
	display: block;
	margin: 0 auto $grid-column-gutter-medium/2 auto;
}

.alignright {
	margin: 0 0 $grid-column-gutter-medium/2 0;

	@include breakpoint(medium up) {
		float: right;
		margin: 0 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2;
	}
}

.alignleft {
	margin: 0 0 $grid-column-gutter-medium/2 0;

	@include breakpoint(medium up) {
		float: left;
		margin: 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 0;
	}
}

a img.alignright {
	margin: 0 0 $grid-column-gutter-medium/2 0;

	@include breakpoint(medium up) {
		float: right;
		margin: 0 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2;
	}
}

a img.alignleft {
	margin: 0 0 $grid-column-gutter-medium/2 0;

	@include breakpoint(medium up) {
		float: left;
		margin: 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 0;
	}
}

a img.alignnone {
	margin: 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 0;
}

a img.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto
}

.bypostauthor {
	visibility: inherit;
}

img.alignnone,
img.alignright,
img.alignleft,
img.aligncenter {
	max-width: 100%;
	height: auto;
}

.sticky {
	visibility: inherit;
}

.wp-caption {
	background: $white;
	max-width: 96%; /* Image does not overflow the content area */
	padding: $grid-column-gutter-medium/2;
	text-align: center;
}

.wp-caption.alignnone {
	margin: 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 0;
	padding: 0;
}

.wp-caption.alignleft {
	margin: 0 0 $grid-column-gutter-medium/2 0;

	@include breakpoint(medium up) {
		margin: 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2 0;
		padding: 0;
	}
}

.wp-caption.alignright {
	margin: 0 0 $grid-column-gutter-medium/2 0;

	@include breakpoint(medium up) {
		margin: 0 0 $grid-column-gutter-medium/2 $grid-column-gutter-medium/2;
		padding: 0;
	}
}

.wp-caption img {
	border: 0 none;
	height: auto;
	margin: 0;
	max-width: 98.5%;
	padding: 0;
	width: auto;
}

.wp-caption p.wp-caption-text {
	font-size: 85%;
	margin: 0;
	padding: 0 $grid-column-gutter-medium/2;
}

figcaption {
	margin-top: rem-calc(5);
	font-size: rem-calc(12);
	color: $dark-gray;
}

/* ## Admin Bar ===== */
@media screen and (max-width:600px) {
	#wpadminbar {
		position: fixed;
	}
}
