@caption-bottom-height: 250px;
@fade-duration: .7s;

.carousel {

  .carousel-item.active {
    display: block;
  }

  .carousel-control-next, .carousel-control-prev {
    z-index: 5;
    width: 5% !important;
  }

  img {
    display: block;
  }

  .carousel-indicators {
    z-index: 3 !important;
  }

  &.caption-bottom {
    .carousel-indicators {
      bottom: @caption-bottom-height + 20px;

      li {
        margin-left: 6px;
        margin-right: 6px;
        max-width: 50px;
      }
    }
    .carousel-caption-bottom {
      text-align: center;
      text-align: center;
      height: @caption-bottom-height;

      .text {
        padding-top: 40px;

        .gt-sm({
          padding-top: 80px;
        });
      }
    }
    .carousel-control-next, .carousel-control-prev {
      height: @caption-bottom-height;
      bottom: 0;
      top: auto;
    }
  }

  &--alpha {
    .carousel-item .row {
      flex: 1; // fix for resize problem
    }

    .carousel-controls {
      position: relative;
      text-align: right;
      padding: 0 0 @default--space;
    }

    .carousel-control {
      opacity: 1;
      cursor: pointer;
      position: relative;
      width: auto !important;
      display: block;
    }

    .carousel-control + .carousel-control {
      margin-left: @default--space;
    }
  }
}

// FADE TRANSITION
.carousel.fade {
  opacity: 1;

  .carousel-item {
    .easeInOutSine(opacity, @fade-duration);
    left: 0 !important;
    opacity: 0;
    top: 0;
    //position: absolute !important;// !important becuase ck-editor is adding position: releative inline! :-\
    position: absolute;
    width: 100%;
    display: block !important;
    z-index: 1;

    img {
      width: 100%;
      height: auto;
    }
    
    &.active {
      opacity: 1;
      top: auto;
      position: relative;
      .easeInOutSine(opacity, @fade-duration);
      z-index: 2;
    }
  }
}

.ecms-active {
  .carousel {
    .carousel-item {
      opacity: 1 !important;
      position: relative;
      margin-top: 20px;
    }
  }
}

#beyerdynamic-carousel-start {
  border-bottom: 16px solid #fff;
}