@import '../../styles/main.scss';

.Slider {
  $_r: &;

  &__carousel,
  &__inner-controls {
    width: 100%;
  }

  &__slide-inner {
    width: calc(100% - 1px);
  }

  &--spaced {
    #{$_r}__carousel {
      width: calc(100% + 20px);
      margin-left: -10px;

      @media #{$screen-sm} {
        width: calc(100% + 40px);
        margin-left: -20px;
      }
    }

    #{$_r}__slide-inner {
      width: 100%;
    }
  }

  &__slide-inner--spaced {
    padding: 0 10px;

    @media #{$screen-sm} {
      padding: 0 20px;
    }
  }

  &__controls {
    display: flex;
    flex-direction: column;
    padding-top: 40px;

    @media #{$screen-md} {
      align-items: center;
      flex-direction: row;
    }
  }

  &__inner-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  &__dots {
    $_bg-color: rgba($c_white, .1);

    position: relative;
    flex-grow: 1;
    height: 5px;
    margin: 0 20px;
    background: $_bg-color;
    border: 1px solid transparent;
    border-radius: 2px;
  }

  &__indicator {
    position: absolute;
    width: 10px;
    height: 100%;
    background: $c_blue-ribbon;
    border-radius: inherit;
    transition: transform .5s ease;
  }

  &__themes {
    display: flex;
    margin-top: 36px;

    @media #{$screen-md} {
      margin-top: 0;
      margin-left: 60px;
    }
  }

  &__theme {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 50%;

    &--white {
      background: $c_white;
    }

    &--blue {
      background: $c_blue-ribbon;
    }

    &--black {
      background: $c_black;
      border-color: $c_ebony-clay;
    }

    &--selected {
      &::before {
        position: absolute;
        top: -10px;
        left: -10px;
        display: block;
        width: calc(100% + 20px);
        height: calc(100% + 20px);
        border: 1px solid $c_white;
        border-radius: 50%;
        content: '';
      }
    }
  }

  &__button {
    color: $c_white;

    &:hover {
      color: $c_blue-ribbon;
    }
  }

  &__arrow {
    &--back {
      transform: rotate(90deg);
    }

    &--forward {
      transform: rotate(-90deg);
    }
  }

  &__slide {
    $_transition: .3s ease;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: color $_transition, background $_transition, border-color $_transition;

    &--white {
      color: $c_blue-ribbon;
      background: $c_white;
      border: 1px solid transparent;
    }

    &--blue {
      color: $c_white;
      background: $c_blue-ribbon;
      border: 1px solid transparent;
    }

    &--black {
      color: $c_white;
      background: $c_black;
      border: 1px solid $c_ebony-clay;
    }
  }
}
