@import './slide/slide';

ws-carousel {
  display: block;

  .slide-gutter {
    margin: -5%;
    overflow: hidden;

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

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

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

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

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

      &:focus {
        outline: 0;
      }
    }

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

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

    &:hover {
      background: $color-yellow;
      color: $color-white;
    }

    &:focus {
      outline: 0;
    }

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

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

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

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