@import 'constants/index.scss';

@mixin paginationButton {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #DDD;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #333;
  margin-right: 8px;
  cursor: pointer;
  transition: 0.2s ease-out;
  &:hover {
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    transform: translateY(-2px);
  }
}

@mixin paginationSeparatorDot {
  width: 4px;
  height: 4px;
  background-color: #CCC;
  border-radius: 8px;
}

.pagination {
  display: flex;
  align-items: center;
  margin-right: -8px;
}

.paginationArrow {
  @include paginationButton();
  &.left {
    transform: rotate(90deg);
    &:hover {
      box-shadow: 5px 0px 10px rgba(0,0,0,0.2);
      transform: translateY(-2px) rotate(90deg);
    }
  }
  &.right {
    transform: rotate(-90deg);
    &:hover {
      box-shadow: -5px 0px 10px rgba(0,0,0,0.2);
      transform: translateY(-2px) rotate(-90deg);
    }
  }

  &.disabled {
    opacity: 0.3;
    pointer-events: none;
  }

  > div {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  svg {
    width: 20px;
    height: 20px;
  }
}

.paginationButton {
  @include paginationButton();
  &.active {
    background-color: $primary-color;
    border-color: $primary-color;
    color: #FFF;
    pointer-events: none;
  }
}

.paginationSeparator {
  display: flex;
  .paginationDot {
    @include paginationSeparatorDot();
    margin-right: 4px;
    &:last-child {
      margin-right: 8px;
    }
  }
}