.std-button,
.sidebar-button {
  font-family: var(--font-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: 0;
  border: 0;
  text-align: center;
  height: 44px;
  font-size: 1.6rem;
  line-height: 2.5rem;
  letter-spacing: 0.23px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  padding: 0 24px;
  border-radius: 22px;
  text-decoration: none;
  transition: all .2s ease-in-out;
  background-color: $medium-color;

  &:hover {
    opacity: 0.8;
  }

  &.dark-blue {
    background-color: $primary-color;

    &:hover {
      opacity: 0.9;
    }
  }

  &.alt-color {
    background: $white;
    color: $primary-color;

    &:hover {
      opacity: 0.9;
    }
  }

  &.std-button--orange {
    background: $topic-orange;
    color: $primary-color;
  }

  &.std-button--light {
    background: $white;
    color: $primary-color;

    &:hover {
      opacity: 0.9;
    }
  }

  &::after {
    content: " ";
    width: 8px;
    height: 8px;
    display: inline-block;
    border-right: 2px solid;
    border-top: 2px solid;
    border-right: 1.5px solid; // repeats border if 1.5 is not accepted
    border-top: 1.5px solid;
    border-radius: 1px;
    transform: rotate(45deg);
    vertical-align: baseline;
    margin-left: 8px;
  }

  &--outline {
    background-color: transparent;
    border: 2px solid $primary-color;
    color: $primary-color;
  }

  &--small {
    height: 40px;
    padding: 0 16px;
    font-size: 1.4rem;
  }

  &--large {
    height: 48px;
    border-radius: 27px;
    padding: 0 32px;
    letter-spacing: .23px;

    &::after {
      width: 10px;
      height: 10px;
      border-right: 2px solid;
      border-top: 2px solid;
    }

    @include sm {
      padding: 0 30px;
    }
  }

  &--xl {
    height: 64px;
    border-radius: 32px;
    padding: 0 40px;
    letter-spacing: .23px;
    font-size: 1.8rem;

    &::after {
      width: 10px;
      height: 10px;
      border-right: 2px solid;
      border-top: 2px solid;
    }

    @include sm {
      height: 48px;
      border-radius: 27px;
      padding: 0 20px;
      font-size: 1.6rem;
    }
  }

  &:disabled {
    opacity: 0.2 ;
    pointer-events: none;
  }

  /*
  &--arrow {
    justify-content: space-between;
    padding: 0 24px;

    &::after {
      content: '';
      width: 18px;
      height: 18px;
      position: relative;
      margin-left: 8px;
      mask-image: url(../img/svg/Arrow.svg);
      mask-repeat: no-repeat;
      mask-size: contain;
      background-color: $white;
      transition: background-color 250ms linear;
    }

    &.alt-color {
      &::after {
        background-color: $primary-color;
      }

      &:hover::after {
        background-color: $primary-color;
      }
    }

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

    &.std-button--outline {
      &::after {
        background-color: $primary-color;
      }

      &:hover {
        background-color: $primary-color;
        color: $white;

        &::after {
          background-color: $white;
        }
      }
    }
  }
  */

  &.icon-calendar {
    padding: 0 24px 0 50px;
    position: relative;

    &::before {
      content: "";
      mask-image: url(../img/svg/ico_calendar.svg);
      mask-repeat: no-repeat;
      mask-size: contain;
      background-color: $primary-color;
      width: 18px;
      height: 18px;
      position: absolute;
      z-index: 1;
      top: 50%;
      transform: translateY(-50%);
      left: 22px;
      white-space: nowrap;
      transition: all 200ms ease-in-out;
    }
  }
}

.box-close-btn {
  background: url(../img/svg/Close.svg) no-repeat 50%;
  background-size: 14px;
  width: 19px;
  height: 19px;
  display: block;
}

.download-btn {
  position: relative;
  padding-left: 32px;
  display: inline-block;
  transition: all .15s linear;

  &--simple {
    padding-left: 0;
    width: 30px;
    height: 30px;
  }

  &:before,
  &:after {
    content: " ";
    width: 18px;
    height: 18px;
    background-image: url(../img/svg/Page.svg);
    display: block;
    background-repeat: no-repeat;
    position: absolute;
    left: 2px;
    top: 3px;
    transition: opacity .15s linear;
  }

  &:after {
    opacity: 0;
    background-image: url(../img/svg/Download.svg);
  }

  &--simple {
    &:before,
    &:after {
      width: 100%;
      height: 100%;
      left: 0;
      top: 0;
      background-position: center;
    }

    &:before {
      background-image: url(../img/svg/Download_big.svg);
      background-position: center;
    }

    &.download-btn--small {
      &:before {
        background-image: url(../img/svg/Download.svg);
      }
    }
  }

  &:hover {
    &:before {
      opacity: 0.8;
    }
  }

  &.std-button {
    display: inline-flex;

    &.download-btn:after, &.download-btn:before {
      content: none;
    }
  }
}

.square-button {
  display: flex;
  align-items: center;
  background-color: $medium-color;
  color: $white;
  padding: 5px 20px;
  // border: 1px solid $gray-bluish;
  border: 1px solid $medium-color;
  border-radius: 4px;
  margin: 0;
  font-size: 14px;
  line-height: 23px;
  cursor: pointer;
  transition: all .2s ease-in-out;

  svg {
    margin-right: 11px;
    pointer-events: none;
  }

  span {
    pointer-events: none;
  }

  &:hover {
    opacity: 0.8;
  }

  &:focus {
    outline: none;
  }

  &.square-button--arrow::after {
    content: " ";
    width: 7px;
    height: 7px;
    display: inline-block;
    border-right: 2px solid $white;
    border-top: 2px solid $white;
    border-radius: 2px;
    transform: rotate(45deg);
    vertical-align: baseline;
    margin-left: 4px;
  }

  &.square-button--dark {
    color: $white;
    border-color: $primary-color;
    background-color: $primary-color;
    padding: 5px 15px;
  }

  &.square-button--light {
    color: $white;
    border-color: $white;
    background-color: transparent;
    padding: 5px 15px;

    &.square-button--arrow::after {
      border-color: $white;
    }
  }

  &.square-button--outline {
    color: $primary-color;
    border-color: $primary-color;
    background-color: transparent;
    padding: 5px 15px;

    &.square-button--arrow::after {
      border-color: $primary-color;
    }
  }
}

.link-left-arrow,
.link-right-arrow {
  color: $primary-color;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  position: relative;

  &::after, &::before {
    content: " ";
    width: 16px;
    height: 17px;
    display: inline-block;
    margin-left: 4px;
    position: relative;
    top: 5px;
    mask-image: url(../../assets/img/svg/icon-chevron-right.svg);
    mask-repeat: no-repeat;
    mask-size: contain;
    background-color: currentColor;
  }

  .link-underline {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    width: 0;
    background-color: currentColor;
    transition: width 0.3s ease-in-out;
  }

  &:hover .link-underline {
    width: 100%;
  }
}

.link-left-arrow::before {
  display: none;
}

.link-right-arrow {
  &::after {
    display: none;
  }

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

.link-left-arrow.link-animation-arrow {
  &::after {
    position: relative;
    left: 0;
    transition: left 0.25s ease-out;
  }

  &:hover:after {
    left: 5px;
  }
}

.link-right-arrow.link-animation-arrow {
  &::before {
    position: relative;
    right: 0;
    transition: right 0.25s ease-out;
  }

  &:hover:before {
    right: 5px;
  }
}

.link-right-arrow--secondary,
.link-left-arrow--secondary {
  color: $gray-70;
  font-size: 1.2rem;
}

.external-link {
  &:after {
    content: '';
    display: inline-flex;
    width: 16px;
    height: 16px;
    background: url(../../assets/img/svg/external.svg) no-repeat center 4px;
    margin-left: 3px;
  }
}

.link-animation-underline {
  text-decoration: none;
  display: inline-block;
  padding: 0 2px;
  position: relative;
  max-width: fit-content;

  &:before {
    background: none repeat scroll 0 0 transparent;
    bottom: 0;
    content: "";
    display: block;
    height: 1px;
    left: 50%;
    position: absolute;
    transition: width 0.3s ease 0s, left 0.3s ease 0s;
    width: 0;
  }

  &:hover:before {
    width: 100%;
    left: 0;
  }

  &.underline-primary {
    color: $primary-color;

    &:before {
      background: $primary-color;
    }
  }
}

[data-action="click-cta"] {
  cursor: pointer;
}

.social-link {
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid $gray-bluish;
  background-color: $white;
  background-position: center;

  &--linkedin {
    background-image: url("../img/svg/linkedin.svg");
    background-repeat: no-repeat;
    background-size: 15px auto;
    background-position: center 47%;
  }

  &--twitter {
    background-image: url("../img/svg/twitter.svg");
    background-repeat: no-repeat;
    background-size: 15px auto;
  }

  &--facebook {
    background-image: url("../img/svg/facebook.svg");
    background-repeat: no-repeat;
    background-size: auto 16px;
  }
}

.modal-close {
  background: url("../img/svg/Close.svg") no-repeat 50%;
  background-size: 14px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  border: none;
  background-color: $gray-bluish;
  cursor: pointer;

  @include sm {
    width: 40px;
    height: 40px;
    background-size: 9px;
  }

  &.modal-close--small {
    width: 32px;
    height: 32px;
    background-size: 9px;

    @include sm {
      width: 32px;
      height: 32px;
      background-size: 9px;
    }
  }
}

.mobile-back-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: none;
  overflow: hidden;
  font-size: 0;
  color: transparent;

  @include sm {
    display: inline-block;
  }

  &:before {
    content: " ";
    position: absolute;
    width: 12px;
    height: 12px;
    display: block;
    top: 13px;
    left: 15px;
    border-right: 2px solid $gray-70;
    border-top: 2px solid $gray-70;
    border-radius: 1px;
    transform: rotate(-135deg);
  }
}

.outline-btn {
  background: none;
  outline: none;
  height: 36px;
  font-size: 1.6rem;
  line-height: 2rem;
  color: $white;
  padding: 2px 12px 0;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all 0.25s ease-out;
  cursor: pointer;

  &--icon {
    padding-left: 36px;
  }

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

.scroll-down-btn {
  width: 42px;
  border: none;
  background-image: url("../img/svg/circle-btn-scroll.svg") no-repeat center;
  height: 42px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 100%;
  background-color: $white;

  &::before {
    content: '';
    display: block;
    margin: auto;
    width: 12px;
    height: 12px;
    mask-image: url("../img/svg/arrow-down-scroll.svg");
    background-color: $primary-color;
    animation: arrow-down-loop 1s ease-in;
    animation-iteration-count: infinite;
    pointer-events: none;
  }
}

@keyframes arrow-down-loop {
  0% {
    transform: translateY(-26px);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translateY(26px);
  }
}
