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


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

.sppb-carousel-inner {
  position: relative;
  overflow: hidden;
  width: 100%;

  > .sppb-item {
    padding: 60px;
    display: none;
    position: relative;
    .transition(.6s ease-in-out left);

    // Account for jankitude on images
    > img,
    > a > img {
      &:extend(.sppb-img-responsive);
      line-height: 1;
    }
  }

  > .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%;
  }

}

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

  .sppb-carousel-pro {
    .sppb-carousel-inner {
      .sppb-row {
        display: table-row;
        height: 100%;
        >div{
          display: table-cell;
          vertical-align: middle;
          float: none;
        }
      }
    }
  }
  
}


// Left/right controls for nav
// ---------------------------

.sppb-carousel-arrow {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40px;
  .opacity(@carousel-control-opacity);
  font-size: @carousel-control-font-size;
  color: @carousel-control-color;
  text-align: center;
  text-shadow: @carousel-text-shadow;
  // We can't have this transition here because WebKit cancels the carousel
  // animation if you trip this while in the middle of another animation.

  // Set gradients for backgrounds
  &.right {
    left: auto;
    right: 0;
  }

  // Hover/focus state
  &:hover,
  &:focus {
    outline: 0;
    color: @carousel-control-color;
    text-decoration: none;
    .opacity(.9);
  }

  // Toggles
  .fa-chevron-left,
  .fa-chevron-right {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-block;
  }
  .fa-chevron-left {
    left: 50%;
    margin-left: -10px;
  }
  .fa-chevron-right {
    right: 50%;
    margin-right: -10px;
  }
}

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

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

  li {
    display: inline-block;
    width:  10px;
    height: 10px;
    margin: 1px;
    text-indent: -999px;
    border: 1px solid @carousel-indicator-border-color;
    border-radius: 10px;
    cursor: pointer;

    // IE8-9 hack for event handling
    //
    // Internet Explorer 8-9 does not support clicks on elements without a set
    // `background-color`. We cannot use `filter` since that's not viewed as a
    // background color by the browser. Thus, a hack is needed.
    //
    // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
    // set alpha transparency for the best results possible.
    background-color: #000 \9; // IE8
    background-color: rgba(0,0,0,0); // IE9
  }
  .active {
    margin: 0;
    width:  12px;
    height: 12px;
    background-color: @carousel-indicator-active-bg;
  }
}

// Optional captions
// -----------------------------
// Hidden by default for smaller viewports
.sppb-item.sppb-item-has-bg {
  padding: 0;
  .sppb-carousel-item-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px 50px;
  }
  .sppb-carousel-item-inner > div {
    height: 100%;
    display: table;
  }

  .sppb-carousel-item-inner > div > div {
    display: table-cell;
    vertical-align: middle;
  }
}

//Carousel Pro
.sppb-carousel-pro-text {
  h2 {
    font-size: 36px;
    line-height: 36px;
    margin-top: 0;
  } 
}

//Testimonil Pro
.sppb-testimonial-pro {

  .sppb-carousel-inner > .sppb-item {
    padding: 0;
  }

  .sppb-img-responsive.sppb-avatar {
    display: inline-block;
  }

  .sppb-testimonial-message,
  .sppb-testimonial-client,
  .sppb-img-responsive.sppb-avatar {
    margin-bottom: 10px;
  }

  .sppb-testimonial-message {
    font-size: 18px;
    line-height: 26px;
  }

  .sppb-carousel-control {
    display: inline-block;
    font-size: 18px;
    line-height: 28px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-align: center;
    border: 2px solid #333;
    color: #888;
    margin: 5px 3px 0;
    .transition(400ms);
    .box-sizing(~'initial');
    &:hover {
      background: #333;
      color: #fff;
    }
  }
}

//Tweet
.sppb-addon-tweet {

  .sppb-tweet-avatar {
    display: inline-block;
    margin-bottom: 15px;
  }

  .sppb-tweet-username {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
  }

  .sppb-tweet-slider {

    .sppb-carousel-inner > .sppb-item {
      padding: 0;
    }

    .sppb-tweet-created {
      display: inline-block;
      margin-bottom: 5px;
    }

    .sppb-carousel-control {
      display: inline-block;
      font-size: 18px;
      line-height: 24px;
      width: 28px;
      height: 28px;
      border-radius: 4px;
      text-align: center;
      border: 2px solid #333;
      color: #888;
      margin: 15px 3px 0;
      .transition(400ms);
      .box-sizing(~'initial');
      &:hover {
        background: #333;
        color: #fff;
      }
    }
  }
}
