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


.media-grid {
  .unstyled;
  .clearfix;
  margin: 0 -25px;
  padding-bottom: 15px;
  background: lighten(@layoutBackgroundColor, 5%) url("@{bgPath}");
  border: 1px solid @moduleHeadingBorderColor;
  border-width: 1px 0;
}
@media (min-width: 768px) {
  .media-grid {
    margin-left:-27px;
  }
}

.media-item {
  position: relative;
  float: left;
  width: 189px;
  padding: 15px;
  margin: 15px 0 0 15px;
  background-color: white;
  .border-radius(3px);
  span.count {
    color: #999;
  }
  .media-image {
    margin-bottom: 5px;
  }
  .media-edit {
    opacity: 0;
    position: absolute;
    right: 15px;
    bottom: 15px;
    .transition(opacity 0.2s ease-in);
  }
  &:hover {
    z-index: 1;
    .media-edit {
      opacity: 1;
    }
  }
}

.media-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid @moduleHeadingBorderColor;
  overflow: hidden;
  .transition(all 0.2s ease-in);
  .border-radius(3px);
  &:hover,
  &.hovered {
    border-color: @mastheadBackgroundColor;
    .box-shadow(0 0 0 4px rgba(0, 0, 0, 0.1));
    .banner {
      background-color: @bannerBackgroundColor;
    }
  }
  span {
    display: none;
  }
  .banner {
    display: block;
    background-color: darken(@moduleHeadingBorderColor, 15%);
    .transition(background-color 0.2s ease-in);
  }
}

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

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

// 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;
}

.media-item.is-expander {
  .truncator-link {
    .transition(opacity 0.2s ease-in);
    position: absolute;
    z-index: 10;
    left: 15px;
    bottom: 15px;
    opacity: 0;
  }
  &:hover {
    padding-bottom: 35px;
    .truncator-link {
      opacity: 1;
    }
  }
}

.wide .media-item {
  width: 186px;
}
