//
// Carousel
// --------------------------------------------------


// Wrapper for the slide container and indicators
.rbd-carousel {
  position: relative;
}

.rbd-carousel-inner {
  position: relative;
  overflow: hidden;
  width: 100%;
  > .rbd-item {
    display: none;
    position: relative;
    transition: .6s ease-in-out left;
    // Account for jankitude on images
    > img,
    > a > img {
      &:extend(.img-responsive);
      line-height: 1;
    }

    // WebKit CSS3 transforms for supported devices
    @media all and (transform-3d), (-webkit-transform-3d) {
      transition: transform .6s ease-in-out;
      backface-visibility: hidden;
      perspective: 1000;

      &.next,
      &.active.right {
        transform: translate3d(100%, 0, 0);
        left: 0;
      }
      &.prev,
      &.active.left {
        transform: translate3d(-100%, 0, 0);
        left: 0;
      }
      &.next.left,
      &.prev.right,
      &.active {
        transform: translate3d(0, 0, 0);
        left: 0;
      }
    }
  }

  > .active,
  > .next,
  > .prev {
    display: block;
  }

  > .active {
    left: 0;
  }

  > .next,
  > .prev {
    position: absolute;
    top: 0;
    width: 100%;
  }

  > .next {
    left: 100%;
  }
  > .prev {
    left: -100%;
  }
  > .next.left,
  > .prev.right {
    left: 0;
  }

  > .active.left {
    left: -100%;
  }
  > .active.right {
    left: 100%;
  }

}

.rbd-carousel-control {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 30px;
  .opacity(0.5);
  font-size: 15px;
  color: currentColor;
  text-align: center;

  // Hover/focus state
  &:hover,
  &:focus {
    outline: 0;
    color: currentColor;
    text-decoration: none;
    box-shadow: none;
    .opacity(.9);
  }

  &.left {
    #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
  }
  &.right {
    left: auto;
    right: 0;
    #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
  }

  // Toggles
  .icon-prev,
  .icon-next,
  .glyphicon-chevron-left,
  .glyphicon-chevron-right {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-block;
  }
  .icon-prev,
  .glyphicon-chevron-left {
    left: 50%;
    margin-left: -10px;
  }
  .icon-next,
  .glyphicon-chevron-right {
    right: 50%;
    margin-right: -10px;
  }
  .icon-prev,
  .icon-next {
    width:  20px;
    height: 20px;
    margin-top: -10px;
    font-family: serif;
  }


  .icon-prev {
    &:before {
      content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
    }
  }
  .icon-next {
    &:before {
      content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
    }
  }
}

// Optional indicator pips
//
// Add an unordered list with the following class and add a list item for each
// slide your carousel holds.

.rbd-carousel-indicators {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 15;
  width: 60%;
  margin-left: -30%;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  text-align: center;

  li {
    display: inline-block;
    width:  10px;
    height: 10px;
    margin: 1px;
    text-indent: -999px;
    border: 1px solid currentColor;
    border-radius: 10px;
    cursor: pointer;
  }
  .active {
    background-color: currentColor;
  }
}

// Optional captions
// -----------------------------
// Hidden by default for smaller viewports


// Scale up controls for tablets and up
@media screen and (min-width: 850px) {

  // Scale up the controls a smidge
  .rbd-carousel-control {
    .glyphicon-chevron-left,
    .glyphicon-chevron-right,
    .icon-prev,
    .icon-next {
      width: 30px;
      height: 30px;
      margin-top: -15px;
      font-size: 30px;
    }
    .glyphicon-chevron-left,
    .icon-prev {
      margin-left: -15px;
    }
    .glyphicon-chevron-right,
    .icon-next {
      margin-right: -15px;
    }
  }

  // Show and left align the captions
  .rbd-carousel-caption {
    left: 20%;
    right: 20%;
    padding-bottom: 30px;
  }
}


.rbd-video-thumbnail-controls{
  list-style-type: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  li{
    display: block;
    margin: 0;
    padding: 0;
    float: left;
    flex: 0 1 auto;
    cursor: pointer;
  }
  .rbd-thumbnail-controls-image{
    background-size: cover;
    background-position: center;
  }
}