/**
 * 500D Gradient Button Widget Styles
 * Version: 1.0.1
 */

/* Button Base */
.btn-effect {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  overflow: visible;
  line-height: normal;
  transition: color 0.3s ease-out;
}

/* Fade Border Effect */
.fade-left-right {
  background: transparent;
  color: #333;
  border: 1px solid transparent;
  border-image: linear-gradient(147deg, rgba(22, 21, 25, 0.50) 0%, rgba(22, 21, 25, 0.05) 52.51%, rgba(22, 21, 25, 0.25) 100.99%);
  border-image-slice: 1;
  position: relative;
  transition: color 0.3s ease-out, border-image 0.3s ease-out;
  z-index: 1;
}

/* Background Fade on Hover */
.fade-left-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(147deg, rgba(243, 108, 33, 0.30) 0%, rgba(243, 108, 33, 0.03) 52.51%, rgba(243, 108, 33, 0.15) 100.99%);
  opacity: 0;
  transition: opacity 0.5s ease-out;
  z-index: -1;
  pointer-events: none;
}

/* SVG border animation */
.fade-left-right svg {
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  pointer-events: none;
  z-index: 2;
}

.fade-left-right svg rect {
  width: 100%;
  height: 100%;
  x: 0;
  y: 0;
  fill: none;
  stroke: url(#borderGradient);
  stroke-width: 4;
  stroke-dasharray: 0 400;
  stroke-dashoffset: 0;
  transition: stroke-dasharray 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-left-right:hover svg rect {
  stroke-dasharray: 400 0;
}

.fade-left-right:hover::before {
  opacity: 1;
}

.fade-left-right:hover {
  color: #f36c21;
  border-image: linear-gradient(147deg, rgba(22, 21, 25, 0.00) 0%, rgba(22, 21, 25, 0.00) 52.51%, rgba(22, 21, 25, 0.00) 100.99%);
  border-image-slice: 1;
}

/* Wrapper alignment */
.gradient-button-wrapper {
  display: block;
}
