/*
 * 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) {
  border-radius: 5px;
  border-width: 0;
  font-size: $body-font-size;
  line-height: $line-height-base;
  letter-spacing: .05rem;
  padding: 1.0rem 2.2rem;
  overflow: hidden;
  text-transform: capitalize;
  display: inline-block;
  white-space: nowrap;
  @include transition(all .2s ease-in-out);
  &.focus, &:focus {
    box-shadow: none !important;
  }
  i {
    margin-right: 5px;
  }
  @include media-breakpoint-down(sm) {
    padding: 1.1rem 1.5rem;
  }
}
.btn-group-xs > .btn, .btn-xs {
  padding: 0.6rem 1.2rem;
  font-size: $body-font-size*0.85;
}
.btn-group-sm > .btn, .btn-sm {
  padding: 0.75rem 1.7rem;
  font-size: $body-font-size*0.9;
}
.btn-group-lg > .btn, .btn-lg {
  padding: 1.3rem 3.00rem;
}
[class*=" btn-outline-"] {
  border-width: 3px;
  padding: 1.0rem 2.5rem;
  &.btn-xs {
    padding: 0.55rem 1.2rem;
  }
  &.btn-sm {
    padding: 0.8rem 1.7rem;
  }
  &.btn-lg {
    padding: 1.1rem 3.00rem;
  }
}

//btn hover
.btn-light, .btn-outline-light {
  box-shadow: 0 7px 20px rgba(#aaa,.2);
  &:hover {
    box-shadow: 0 1px 20px rgba(#aaa,.5);
  }
}
.btn-dark {
  &:hover {
    color: $dark;
    background-color: transparent;
  }
}
.btn-dark, .btn-outline-dark {
  box-shadow: 0 7px 20px rgba($dark,.2);
  &:hover {
    box-shadow: 0 1px 20px rgba($dark,.5);
  }
}

.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-modern-white {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  color: #333;
  border-color: #eeeeee;
  background-color: transparent;
  &:after {
    content: "";
    background-color: #111;
    width: 0;
    height: 100%;
    top: 0;
    position: absolute;
    left: auto;
    right: 0;
    z-index: -1;
    -webkit-transition: width .6s cubic-bezier(.30,.8,.30,1) 0s;
    transition: width .6s cubic-bezier(.30,.8,.30,1) 0s;
  }
  &:hover {
    color: #ffffff;
    border-color: #111;
    &:after {
      width: 100%;
      left: 0;
      right: auto;
    }
  }
}

.btn-modern-theme-colored {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  color: #333;
  border-color: #eeeeee;
  background-color: transparent;
  z-index: 0;
  &:after {
    content: "";
    background-color: #fff;
    width: 0;
    height: 100%;
    top: 0;
    position: absolute;
    left: auto;
    right: 0;
    z-index: -1;
    -webkit-transition: width .6s cubic-bezier(.30,.8,.30,1) 0s;
    transition: width .6s cubic-bezier(.30,.8,.30,1) 0s;
  }
  &:hover {
    border-color: #eee;
    &:after {
      width: 100%;
      left: 0;
      right: auto;
    }
  }
}



/* Sweep To Right */
.hvr-sweep-to-right {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  @include prefixed(transition-property, color);
  @include prefixed(transition-duration, $mediumDuration);
  &:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    @include prefixed(transform, scaleX(0));
    @include prefixed(transform-origin, 0 50%);
    @include prefixed(transition-property, transform);
    @include prefixed(transition-duration, $mediumDuration);
    @include prefixed(transition-timing-function, ease-out);
  }
  &:hover, &:focus, &:active {
    &:before {
      @include prefixed(transform, scaleX(1));
    }
  }
}
/* Bounce To Right */
.hvr-bounce-to-right {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  @include prefixed(transition-property, color);
  @include prefixed(transition-duration, $slowDuration);
  &:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    @include prefixed(transform, scaleX(0));
    @include prefixed(transform-origin, 0 50%);
    @include prefixed(transition-property, transform);
    @include prefixed(transition-duration, $slowDuration);
    @include prefixed(transition-timing-function, ease-out);
  }
  &:hover, &:focus, &:active {
    &:before {
      @include prefixed(transform, scaleX(1));
      @include prefixed(transition-timing-function, cubic-bezier(.52,1.64,.37,.66));
    }
  }
}
/* Shutter Out Horizontal */
.hvr-shutter-out-horizontal {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  @include prefixed(transition-property, color);
  @include prefixed(transition-duration, $mediumDuration);
  &:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    @include prefixed(transform, scaleX(0));
    @include prefixed(transform-origin, 50%);
    @include prefixed(transition-property, transform);
    @include prefixed(transition-duration, $mediumDuration);
    @include prefixed(transition-timing-function, ease-out);
  }
  &:hover, &:focus, &:active {
    &:before {
      @include prefixed(transform, scaleX(1));
    }
  }
}


.hvr-sweep-to-right,
.hvr-bounce-to-right,
.hvr-shutter-out-horizontal {
  &[class^="btn-outline-"], &[class*=" btn-outline-"] {
    &:hover, &:focus, &:active {
      background-color: transparent;
    }
    @each $color, $value in $tm-btn-colors {
      &.btn-outline-#{$color} {
        &:before {
          background: $color;
        }
      }
    }
    @each $color, $value in $theme-colors {
      &.btn-outline-#{$color} {
        &:before {
          background: $value;
        }
      }
    }
  }
}
.hvr-sweep-to-right,
.hvr-bounce-to-right,
.hvr-shutter-out-horizontal {
  &:not(.btn-outline) {
    &:hover, &:focus, &:active {
      color: #222;
    }
  }
}

.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,
.woocommerce .button:not(.compare):not(.yith-wcqv-button):not(.tm-btn-add-to-cart) {
  position: relative;
  z-index: 0;
  &:before {
    position: absolute;
    content: '';
    background: var(--theme-color3);
    width: 0;
    height: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    z-index: -1;
    transition: all .5s ease;
  }
  &:hover,
  &:focus {
    &:before {
      width: 100%;
      opacity: 1;
    }
  }
}
.btn-theme-colored3,
.btn-theme-colored4,
.btn-outline-theme-colored3,
.btn-outline-theme-colored3 {
  &:before {
    background: var(--theme-color1);
  }
}

input[type="submit"].btn-theme-colored1 {
  &:hover,&:focus {
    color: var(--text-color-bg-theme-color2);
    background-color: var(--theme-color2);
  }
}
input[type="submit"].btn-theme-colored2 {
  &:hover,&:focus {
    color: var(--text-color-bg-theme-color1);
    background-color: var(--theme-color1);
  }
}
input[type="submit"].btn-theme-colored3 {
  &:hover,&:focus {
    color: var(--text-color-bg-theme-color1);
    background-color: var(--theme-color1);
  }
}
input[type="submit"].btn-theme-colored4 {
  &:hover,&:focus {
    color: var(--text-color-bg-theme-color1);
    background-color: var(--theme-color1);
  }
}




/* 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: var(--theme-color2);
  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-color1);
    &:before {
      color: var(--theme-color1);
      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-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-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);
      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;
    }
  }
}
@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(.9);
    -moz-transform:translateX(13px) scale(.9);
    transform:translateX(13px) scale(.9)
  }
  26% {
    opacity:0;
    -webkit-transform:translateX(-13px) scale(.9);
    -moz-transform:translateX(-13px) scale(.9);
    transform:translateX(-13px) scale(.9)
  }
}


.btn-hover-bg-white {
  &:hover,
  &:focus {
  color: #333!important;
    &:before {
      background-color: #fff;
    }
  }
}