// ==========================================================================
// WordPress Core Styles (Table of contents)
// ==========================================================================
//
// # Alignment
// # Content
// # Galleries
// # Images
// # Widgets
// 		## Calendar
// 		## Search
// 		## TagCloud
// # Shortcodes
// 		## Video
// # Forms
//

// Alignment
// ==========================================================================
.alignnone {
	margin: 0.5em 0;
}

.alignright {
	@extend .pull-right;
	margin: 0.5em 0 1em 1em;
}

.alignleft {
	@extend .pull-left;
	margin: 0.5em 1em 1em 0;
}

.aligncenter {
	@extend .center-block;
	margin: 0.5em auto;
}

// Content
// ==========================================================================
.hentry,
.widget {
	-ms-word-wrap: break-word;
	word-wrap: break-word;
}

.page-content,
.entry-content {
	@include clearfix;
	table {
		@extend .table;
	}
	.table-condensed {
		@extend .table-condensed;
	}
}

.entry-attachment {
	.attachment {
		@extend .text-center;
		margin-bottom: 1em;
	}
	#nav-below {
		.nav-next {
			@extend .pull-right;
		}
		.nav-previous {
			@extend .pull-left;
		}
	}
}

.entry-caption {
	color: #666;
}

// Override the Twitter embed fixed width
.twitter-tweet-rendered {
	max-width: 100% !important;
}

// Galleries
// ==========================================================================
.gallery {
	@include clearfix;
	margin: 0 auto 1em;
	.gallery-item {
		@extend .pull-left;
		@extend .text-center;
		img {
			@extend .img-thumbnail;
		}
	}
	@for $gallery from 1 through 9 {
		&.gallery-columns-#{$gallery} .gallery-item {
			@if 1 == $gallery {
				float: none;
			}
			@if 6 <= $gallery {
				margin: 2em 1%;
				width: unquote(100 / $gallery - 2 + "%");
			}
			@else {
				margin: 2em 2%;
				width: unquote(100 / $gallery - 4 + "%");
			}
		}
	}
	.gallery-caption {
		color: $thumbnail-caption-color;
		margin-left: 0;
	}
	dl {
		margin: 0;
	}
	br + br {
		display: none;
	}
}

// Images
// ==========================================================================
.hentry,
.widget {
	img {
		height: auto;
		max-width: 100%;
		width: auto;
	}
}

img {
	&.header-image,
	&.wp-post-image {
		max-width: 100%;
		height: auto;
	}
	&.wp-smiley, .rsswidget & {
		border: none;
		-webkit-border-radius: 0;
		-moz-border-radius: 0;
		border-radius: 0;
		-webkit-box-shadow: none;
		-moz-box-shadow: none;
		box-shadow: none;
		margin-bottom: 0;
		margin-top: 0;
		padding: 0;
	}
// Remove WP.com Stats smile :)
&#wpstats {
	display: none;
}
.comment-content &,
.widget & {
	@extend .img-responsive;
}
}

.entry-content p img,
.wp-caption {
	@extend .img-responsive;
	&.alignleft,
	&.alignright,
	&.aligncenter,
	&.aligncenter,
	&.alignnone {
		margin-top: 1em;
		margin-bottom: 2em;
	}
}

.wp-caption {
	@extend .thumbnail;
	&.aligncenter,
	&.alignnone {
		clear: both !important;
	}
	.wp-caption-text {
		display: inline-block;
		padding: $thumbnail-caption-padding;
		color: $thumbnail-caption-color;
		&:before {
			color: #666;
			content: '\2014';
			font-size: 12px;
			font-style: normal;
			font-weight: bold;
			margin-right: 5px;
		}
	}
}

// Widgets
// ==========================================================================

//
// Calendar
//
.widget_calendar #wp-calendar {
	@extend .table;
	@extend .table-bordered;
	@extend .table-condensed;
	@extend .table-striped;
	@extend .table-responsive;
	#prev {
		border-right: 0;
		a {
			@extend .pull-left;
		}
	}
	#next {
		border-left: 0;
		a {
			@extend .pull-right;
		}
	}
}

//
// Search
//
.widget_search form {}

.widget_search #s {}

.widget_search #searchsubmit {}

.widget_search #searchsubmit:active {}

//
// TagCloud
//
.widget_tag_cloud {
	@for $i from 1 through 12 {
		$random: 12 + random(20) + px;
		a:nth-child(#{$i}) {
			font-size: #{$random}!important;
		}
	}
}

// Shortcodes
// ==========================================================================

//
// Video
//
.wp-video-shortcode {
	max-width: 100%;
}

// Forms
// ==========================================================================
input[name="post_password"] {
	@extend .form-control;
}


/* Text meant only for screen readers. */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-size: 0.875rem;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000; /* Above WP toolbar. */
}

.author-sinal {
	@extend .btn;
	@extend .btn-primary;
	@extend .btn-xs;
	display: none;
}

.bypostauthor {
	.author-sinal {
		display: inline;
	}
}