/* =============================================================================
   Media:  Embedded content
   ========================================================================== */

// Remove border when inside `a` element in IE 8/9.
img {
	border: 0;
}

// Correct overflow displayed oddly in IE 9.
svg:not(:root) {
	overflow: hidden;
}

// Address margin not present in IE 8/9 and Safari 5.
figure {
	margin: 0;
}

/* =============================================================================
   Media:  Images
   ========================================================================== */

img {
	max-width: 100%; // Fluid images
	height: auto; // Make sure images are scaled correctly.
}

/* Add fancy borders to all WordPress-added images */
.entry-content img,
.comment-content img,
.wp-post-image,
.widget img,
.thumbnail,
.avatar {
	border-radius: 3px;
	box-shadow: 0 1px 4px fade(#000, 20%);
}

/* Post thumbnails */
.thumbnail {
	float: right;
	margin: 0 0 @gutter-width-small @gutter-width-small;
}

/* Aligned images */
img.aligncenter {
	margin: @gutter-width-small auto;
}

img.alignleft {
	margin: 0 @gutter-width-small 12px 0;
}

img.alignright {
	margin: 0 0 12px @gutter-width-small;
}

/* Avatars */
.avatar {
	float: left;
	margin-right: (@gutter-width-small - 7px);
}

/* Remove borders from some images */
.wp-smiley,
.no-image-border,
.rsswidget img {
	border-radius: 0;
	box-shadow: none;
}

/* Make sure videos and embeds fit their containers */
embed,
iframe,
object,
video {
	max-width: 100%;
}

iframe {
	border: none;
}

/* Style `seamless` iframes */
iframe[seamless] {
	overflow: hidden;
	padding: 0;
	border: 0 none transparent;
	background-color: transparent;
}

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

/**
 * Captions [caption]
 */
.wp-caption {
	clear: both;
	max-width: 100%;
	padding-top: 5px;
	margin: @gutter-width-small 0;
	background: @caption-bg;
	border-radius: 0 0 3px 3px;
	text-align: center;

	img {
		border-radius: 0;
		box-shadow: none;
	}

	// Aligned captions
	&.aligncenter {
		margin: @gutter-width-small auto;
	}

	&.alignleft {
		margin: 0 @gutter-width-small 0 0;
	}

	&.alignright {
		margin: 0 0 0 @gutter-width-small;
	}
}

/* Caption text */
.wp-caption-text {
	padding: 10px 20px 20px;
	margin: 0;
	.font-size(@font-size-small);
	color: @caption-text-color;
}

/**
 * Galleries
 */
.gallery {
	display: block;
	clear: both;
	overflow: hidden;
	margin: @gutter-width-small auto;
}

.gallery-row {
	display: block;
	clear: both;
	overflow: hidden;
	margin: 0;
}

.gallery-item {
	overflow: hidden;
	float: left;
	.no-list-style();
	text-align: center;
}

.gallery-icon img {
	.square(auto);
	max-width: 90%; // 97%
}

.gallery-caption {
	.font-size(@font-size-small);
	margin: 0 0 15px 0;
}

.gallery-col-7 .gallery-caption,
.gallery-col-8 .gallery-caption,
.gallery-col-9 .gallery-caption {
	display: none;
}

/* Gallery item sizes depending on the number of columns. */
.gallery-col-0 .gallery-item  {  width: percentage(( 100 / 1 / 100  ));   }
.gallery-col-1 .gallery-item  {  width: percentage(( 100 / 1 / 100  ));   }
.gallery-col-2 .gallery-item  {  width: percentage(( 100 / 2 / 100  ));   }
.gallery-col-3 .gallery-item  {  width: percentage(( 100 / 3 / 100  ));   }
.gallery-col-4 .gallery-item  {  width: percentage(( 100 / 4 / 100  ));   }
.gallery-col-5 .gallery-item  {  width: percentage(( 100 / 5 / 100  ));   }
.gallery-col-6 .gallery-item  {  width: percentage(( 100 / 6 / 100  ));   }
.gallery-col-7 .gallery-item  {  width: percentage(( 100 / 7 / 100  ));   }
.gallery-col-8 .gallery-item  {  width: percentage(( 100 / 8 / 100  ));   }
.gallery-col-9 .gallery-item  {  width: percentage(( 100 / 9 / 100  ));   }
.gallery-col-10 .gallery-item {  width: percentage(( 100 / 10 / 100 ));   }
