/*
 * Shortcode: button.scss
 * -----------------------------------------------
*/

// Alternate buttons

@each $color, $value in $tm-btn-colors {
  .btn-#{$color} {
    @include button-variant($value, $value);
  }
}

@each $color, $value in $tm-btn-colors {
  .btn-outline-#{$color} {
    @include button-outline-variant($value);
  }
}

// Custom Button Styles
.btn-xs {
  @include button-size($btn-padding-y-xs, $btn-padding-x-xs, $font-size-xs, $btn-border-radius-sm);
}

.btn,
.woocommerce .button:not(.compare):not(.yith-wcqv-button):not(.tm-btn-add-to-cart):not([name="apply_coupon"]),
.wc-forward,
.woosw-item .button,
.woosw-item .added_to_cart,
.woosc_table .button,
.woosc_table .added_to_cart,
.comment-respond .comment-form .form-submit input[type="submit"] {
  font-size: var(--btn-font-size);
  line-height: 1.4;
  padding: 1.2rem 3.2rem;
  font-family: var(--body-font-family);
  font-weight: 600;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-align: center;
  border-radius: 0;
  border-width: 0;
  overflow: hidden;
  display: inline-block;
  @include transition(all 0.2s ease-in-out);
  &.focus,
  &:focus {
    box-shadow: none !important;
  }
  i {
    margin-right: 5px;
  }
}

.btn-theme-colored1,
.btn-theme-colored2,
.btn-theme-colored3,
.btn-theme-colored4,
.btn-outline-theme-colored1,
.btn-outline-theme-colored2,
.btn-outline-theme-colored3,
.btn-outline-theme-colored3,
.btn-light,
.btn-outline-light,
.btn-dark,
.btn-outline-dark,
.woocommerce .button:not(.compare):not(.yith-wcqv-button):not(.tm-btn-add-to-cart):not([name="apply_coupon"]),
.woosw-item .button,
.wc-forward,
.woosw-item .added_to_cart,
.woosc_table .button,
.woosc_table .added_to_cart {
  position: relative;
  z-index: 0;
  border-radius: 10px;
  &:before {
    position: absolute;
    left: 0;
    top: 0;
    content: "";
    height: 100%;
    width: 24px;
    background-color: rgba(var(--theme-color2-rgb), 0.2);
    @include transition(0.3s cubic-bezier(0.785, 0.135, 0.15, 0.86));
    z-index: -1;
  }
  &:hover,
  &:focus {
    &:before {
      width: 100%;
    }
  }
}

.btn-xs {
  padding: 0.5rem 1.2rem;
  font-size: 0.75rem;
}
.btn-sm {
  padding: 1rem 2.4rem;
  font-size: 0.75rem;
}
.btn-lg {
  padding: 1.3rem 3rem;
}
[class*=" btn-outline-"] {
  border-width: 1px;
  padding: 1rem 2.5rem;
  &.btn-xs {
    padding: 0.55rem 1.2rem;
  }
  &.btn-sm {
    padding: 0.8rem 1.7rem;
  }
  &.btn-lg {
    padding: 1.1rem 3rem;
  }
}

//btn hover
.btn-light,
.btn-outline-light {
  background-color: #f7f4ed;
  border-color: #f7f4ed;
  box-shadow: none;
  font-family: var(--body-font-family);
  font-weight: 600;
  font-size: var(--btn-font-size);
  color: var(--theme-color2);
  &:hover {
    background-color: #f7f4ed;
    border-color: #f7f4ed;
    box-shadow: none;
  }
}

.btn-outline-light {
  background-color: transparent;
  &:hover {
    background-color: transparent;
  }
}

.btn-dark,
.btn-outline-dark {
  box-shadow: 0 7px 20px rgba($dark, 0.2);
  &:hover {
    box-shadow: 0 1px 20px rgba($dark, 0.5);
  }
}

.btn-outline-light {
  background-color: transparent;
}

.btn-gray:hover {
  color: $btn-gray-color;
  border-color: $btn-gray-color;
  background-color: transparent;
}
/* button 3D */
.btn-3d {
  @include box-shadow(0 4px 1px darken(#ccc, 20%));
  margin-bottom: 4px;
}
.btn-round {
  border-radius: 3rem;
}
.btn-flat {
  border-radius: 0;
}

/* btn-plain-text*/
.btn-plain-text {
  color: #aaa;
  font-size: 1rem;
  padding: 0;
  border: 0;
  padding-bottom: 3px;
  &.focus,
  &:focus {
    box-shadow: none;
  }
}
.btn-plain-text-with-arrow {
  color: #31333e;
  font-size: 1rem;
  padding: 0;
  border: 0;
  text-transform: capitalize;
  &:before {
    color: var(--theme-color2);
    display: inline-block;
    content: "\f35a";
    font-family: "Font Awesome 5 Free";
    font-size: 16px;
    font-variant: normal;
    font-weight: 600;
    line-height: 1;
    margin-right: 8px;
    position: relative;
    text-shadow: none;
    text-transform: none;
    @include transition(all 0.3s ease 0s);
  }

  &:focus,
  &:hover {
    color: var(--theme-color2);
    &:before {
      color: var(--theme-color2);
      transform: rotateX(180deg);
      -webkit-animation: moveArrow 1s;
      -moz-animation: moveArrow 1s;
      animation: moveArrow 1s;
    }
  }
  &.focus,
  &:focus {
    box-shadow: none;
  }
  &.text-white {
    &:after {
      color: #fff !important;
    }
  }
}
.btn-plain-text-with-arrow-right {
  color: #31333e;
  font-size: 1rem;
  padding: 0;
  border: 0;
  text-transform: capitalize;
  &:after {
    color: var(--theme-color1);
    display: inline-block;
    content: "\f35a";
    font-family: "Font Awesome 5 Free";
    font-size: 16px;
    font-variant: normal;
    font-weight: 600;
    line-height: 1;
    margin-left: 10px;
    position: relative;
    text-shadow: none;
    text-transform: none;
    @include transition(all 0.3s ease 0s);
  }

  &:focus,
  &:hover {
    color: var(--theme-color3);
    &:after {
      color: var(--theme-color3);
      -webkit-animation: moveArrow 1s;
      -moz-animation: moveArrow 1s;
      animation: moveArrow 1s;
    }
  }
  &.focus,
  &:focus {
    box-shadow: none;
  }
  &.text-white {
    &:after {
      color: #fff !important;
    }
  }
}
@keyframes moveArrow {
  0%,
  55% {
    opacity: 1;
    -webkit-transform: translateX(0) scale(1);
    -moz-transform: translateX(0) scale(1);
    transform: translateX(0) scale(1);
  }
  25% {
    opacity: 0;
    -webkit-transform: translateX(13px) scale(0.9);
    -moz-transform: translateX(13px) scale(0.9);
    transform: translateX(13px) scale(0.9);
  }
  26% {
    opacity: 0;
    -webkit-transform: translateX(-13px) scale(0.9);
    -moz-transform: translateX(-13px) scale(0.9);
    transform: translateX(-13px) scale(0.9);
  }
}

.btn-hover-bg-white {
  &:hover,
  &:focus {
    color: #333 !important;
    &:before {
      background-color: #fff;
    }
  }
}

.btn-circle-arrow {
  border: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  height: 55px;
  line-height: 55px;
  text-align: center;
  width: 55px;
  align-items: center;
  display: inline-flex;
  justify-content: center;
  background-color: #f1f1f1;
  position: relative;
  transition: all 0.3s ease;
  &:after {
    position: absolute;
    content: "\f30b";
    left: 50%;
    font-size: 25px;
    top: 50%;
    font-weight: bold;
    color: #111;
    font-family: "Font Awesome 5 Free";
    transform: translate(-50%, -50%);
    border-radius: 50%;
    text-align: center;
    z-index: 9;
    color: var(--theme-color2);
  }
}

.btn {
  .btn-icon,
  .btn-icon svg {
    transition: all 0.3s ease;
  }
}

/*Btn Style One*/
.theme-btn-style-one {
  position: relative;
  border-radius: 50px;
  overflow: hidden;
  color: #fff;
  -webkit-transition: all 500ms ease 0s;
  transition: all 500ms ease 0s;
  background: var(--gradient-1);
  span {
    position: relative;
    display: flex;
    align-items: center;
  }
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: 100px;
    -webkit-transition: all 500ms ease 0s;
    transition: all 500ms ease 0s;
    background: var(--gradient-2);
  }
  &:hover {
    color: #fff;
    &:before {
      width: 0;
      left: 100%;
    }
  }
}

/*Btn Style Two*/
.theme-btn-style-two {
  position: relative;
  border-radius: 50px;
  overflow: hidden;
  color: #fff;
  @include transition(all 500ms ease 0s);
  background: var(--theme-color3);
  span {
    position: relative;
    display: flex;
    align-items: center;
  }
  &::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: 100px;
    -webkit-transition: all 500ms ease 0s;
    transition: all 500ms ease 0s;
    background: var(--gradient-1);
  }
  &:hover {
    color: #fff;
    &:before {
      width: 0;
      right: 100%;
    }
  }
}
