.media {
  position: relative;
  overflow: hidden;
}

.media-content:before,
.media-content:after {
}

.media-content > :last-child {
  margin-bottom: 0;
}

.media-heading {
  font-size: 18px;
  line-height: 1.3;
  margin: 5px 0;
}

.media-image,
.media .gravatar {
  position: relative;
  float: left;
  margin-right: 10px;
  overflow: hidden;
  .border-radius(4px);
}

.media-image img {
  .border-radius(4px);
}

.media-vertical .media-image,
.media-vertical .media-content {
  float: none;
  display: block;
}

.media-vertical .media-image {
  margin-right: 0;
  max-height: 140px;
}

.media-grid,
ul.media-grid,
ol.media-grid {
  .unstyled;
  .clearfix;
  margin-left: -20px;
}

.media-item {
  .box-sizing(border-box);
  width: 33.33%; // Not ideal having this hardcoded.
  padding-left: 20px;
  padding-bottom: 25px;
  float: left;
}

.media-item.first {
  clear: left;
}

.media-item .media-content {
  min-height: 63px;
}

// This allows the truncated text on an item to expand over the element
// below it by applying a negative margin in JavaScript.
.related-item.expanded {
  .border-radius(4px);
  background-color: @moduleBackgroundColor;
  background-color: @moduleExpandedBackgroundColor;
  z-index: 2;
}

// Wide media elements

.media-wide {
  padding: 0;
}

.media-wide .media {
  .makeColumn(6);
}

// Overlay

.media-overlay {
  position: relative;
  min-height: 35px; // Min height for the heading.
}

.media-overlay .media-heading {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 10px;
  margin: 0;
  background-color: #000;
  background-color: rgba(0, 0, 0, 0.8);
  font-size: 13px;
  color: #fff;
  z-index: 1;
  .border-radius(0 0 3px 3px);
}

.media-overlay .media-image {
  float: none;
  display: block;
  margin-right: 0;
}

// Banner

.banner {
  .transform(rotate(45deg));
  .transform-origin(center, center);
  position: absolute;
  top: 15px;
  right: -35px;
  width: 80px;
  color: @bannerTextColor;
  background: @bannerBackgroundColor;
  padding: 1px 20px;
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
}
