.button {
  position: relative;
  box-sizing: border-box;
  padding: 0 32px;
  text-align: center;
  font-family: $font;
  font-weight: 500;
  font-size: 17px;
  line-height: 36px;
  color: $accent-dark;
  background-color: rgba(#ffffff, 0);
  border-width: 2px;
  border-style: solid;
  border-color: rgba($bg-main, 0);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;

  @media (max-width: $mobile) {
    font-family: $font-mobile;
    font-size: 14px;
  }

  &:hover,
  &:active {
    color: $accent-medium;
  }

  &:focus {
    color: $accent-medium;
    outline: none;
  }

  &:disabled {
    color: $gray-medium;
    cursor: not-allowed;
  }
}

.button svg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.button svg:last-child {
  right: 0;
}

.button svg:first-child {
  left: 0;
}

.button--primary {
  padding: 5px 48px;
  min-width: 200px;
  color: $bg-main;
  background-color: $accent-main;
  border-color: $accent-main;

  @media (max-width: $mobile) {
    font-size: 16px;
  }

  &:hover,
  &:active {
    color: $bg-main;
    background-color: $accent-medium;
    border-color: $accent-medium;
  }

  &:focus {
    color: $bg-main;
    background-color: $accent-main;
    border-color: #27EF60;
    outline: none;
  }

  &:disabled {
    color: $bg-main;
    background-color: $gray-medium;
    border-color: $gray-medium;
  }
}

.button--secondary {
  padding: 5px 48px;
  min-width: 200px;
  color: #030303;
  background-color: $bg-main;
  border-color: $bg-main;
  box-shadow: 0px 4px 10px rgba(190, 190, 190, 0.5);

  @media (max-width: $mobile) {
    font-size: 16px;
  }

  &:hover,
  &:active {
    color: #030303;
    background-color: $bg-accent;
    border-color: $bg-accent;
    box-shadow: 0px 2px 5px rgba(190, 190, 190, 0.5);
  }

  &:focus {
    padding: 6px 49px;
    color: #030303;
    background-color: $bg-main;
    border-width: 1px;
    border-color: $accent-main;
    outline: none;
    box-shadow: 0px 4px 10px rgba(190, 190, 190, 0.5);
  }

  &:disabled {
    color: $bg-main;
    background-color: $gray-medium;
    border-color: $gray-medium;
  }
}

.button--bordered {
  padding: 5px 48px;
  min-width: 200px;
  color: $accent-dark;
  background-color: $bg-main;
  border-color: $accent-dark;

  @media (max-width: $mobile) {
    font-size: 16px;
  }

  &:hover,
  &:active {
    color: $bg-main;
    background-color: $accent-dark;
    border-color: $accent-dark;
  }

  &:focus {
    color: $accent-medium;
    background-color: $bg-main;
    border-color: $accent-medium;
    outline: none;
  }

  &:disabled {
    color: $gray-medium;
    background-color: $bg-main;
    border-color: $gray-medium;
  }
}

.button--primary svg:last-child,
.button--bordered svg:last-child,
.button--secondary svg:last-child {
  right: 18px;
}

.button--primary svg:first-child,
.button--bordered svg:first-child,
.button--secondary svg:first-child {
  left: 18px;
}
