// Name:                     Thumbnail
//
// Description:              Define style for thumbnail
//
// Component:                `.am-thumbnail`
//
// Sub-objects:              `.am-thumbnail-caption`
//
// Modifiers:
//
// =============================================================================


/* ==========================================================================
   Component: Thumbnail
 ============================================================================ */

.@{ns}thumbnail {
  //display: inline-block;
  display: block;
  padding: @thumbnail-padding;
  margin-bottom: @line-height-computed;
  background-color: @thumbnail-bg;
  border: 1px solid @thumbnail-border;
  border-radius: @thumbnail-border-radius;
  transition: all .2s ease-in-out;
  .hook-thumbnail;

  > img,
  a > img {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  // Add a hover state for linked versions only
  a.@{ns}thumbnail:hover,
  a.@{ns}thumbnail:focus,
  a.@{ns}thumbnail.active {
    border-color: @thumbnail-hover-border;
    background-color: @thumbnail-hover-bg;
    .hook-thumbnail-hover;
  }
}

// Image width
.@{ns}thumbnail {
  img&,
  > img,
  a > img {
    max-width: 100%;
    height: auto;
  }
}


/* Image caption */

.@{ns}thumbnail-caption {
  margin: 0;
  padding: @thumbnail-caption-padding;
  color: @thumbnail-caption-color;
  font-weight: normal;
  .hook-thumbnail-caption;

  *:last-child {
    margin-bottom: 0;
  }
}

// Thumbnail list
.@{ns}thumbnails {
  margin-left: -.5rem;
  margin-right: -.5rem;

  > li {
    padding: 0 .5rem 1rem .5rem;
  }

  .hook-thumbnails;
}


// Hooks
// =============================================================================

.hook-thumbnail() {}
.hook-thumbnail-hover() {}
.hook-thumbnail-caption() {}
.hook-thumbnails() {}
