@import './slide/slide';

ws-carousel {
  display: block;

  .slide-gutter {
    overflow: hidden;

    // Needed so overflow: hidden doesn't also clip the animation.
    padding: 5%;
    margin: -5%;
  }

  .slide-container {
    position: relative;
    display: flex;
    transition: transform 0s linear $out-duration, opacity 0s $easing-function;

    > * {
      flex-basis: 0;
      flex-grow: 1;
    }
  }

  .controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    padding-bottom: 6px;
    margin-top: $margin-vertical;
  }

  .slide-selector {
    button {
      background: $color-gray-20;
      width: 8px;
      height: 8px;
      border-radius: 4px;
      border: none;
      font-size: 1px;
      padding: 0px;
      margin: 4px;

      &:focus {
        outline:0;
      }
    }

    .active {
      background: $color-gray-80;
    }
  }

  .back-button,
  .next-button {
    display: block;
    height: 32px;
    width: 32px;
    border-radius: 16px;
    background: $color-white;
    text-decoration: none;
    font-size: 12px;
    line-height: 12px;
    padding: 10px;
    color: $color-yellow;
    border: none;
    margin: 0;

    &:focus {
      outline:0;
    }

    &:disabled {
      border: solid $color-gray-20 1px;
      color: $color-gray-20;
      background: none;
      padding: 9px;
    }
  }

  .chevron {
    &:before {
      border-style: solid;
      border-width: 2px 2px 0 0;
      content: '';
      display: inline-block;
      height: 8.5px;
      width: 8.5px;
      margin-top: 1px;
    }

    &.right:before {
      left: 0;
      transform: rotate(45deg);
      margin-left: -3px;
    }

    &.left:before {
      left: 0;
      transform: rotate(-135deg);
      margin-left: 3px;
    }
  }
}
