$speed: 0.3s;

.wp-block-sp-smart-post-show-button {
  .sp-smart-post-button-wrapper {
    .sp-smart-post-btn {

      position: relative;
      background-color: var(--smart-post-secondary);
      transition:
        background 0.3s ease-in-out,
        box-shadow 0.3s ease-in-out,
        color 0.3s ease-in-out,
        border 0.3s ease-in-out;
      white-space: nowrap;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      z-index: 1;
      opacity: 1;
      outline: 0;
      white-space: nowrap;
      cursor: pointer;
      text-decoration: none;

      .button-label .front {
        align-items: center;
      }

      span.sp-rich-text.sp-btn-label {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 0;
      }

      .icon {
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }

    .sp-smart-post-btn:focus {
      outline: 0;
    }



    /* gradShadow start  */
    // .btn-gradient:before,
    .btn-default.gradShadow:before {
      content: "";
      background: linear-gradient(45deg,
          #ff0000,
          #ff7300,
          #fffb00,
          #48ff00,
          #00ffd5,
          #002bff,
          #7a00ff,
          #ff00c8,
          #ff0000);
      position: absolute;
      top: -2px;
      left: -2px;
      background-size: 400%;
      z-index: -1;
      filter: blur(5px);
      width: calc(100% + 4px);
      height: calc(100% + 4px);
      transition: opacity 0.3s ease-in-out;
    }

    .btn-default.gradShadow:before {
      animation: glowing 20s linear infinite;
    }

    .btn-default.gradShadow:before {
      opacity: 0;
    }

    // .btn-gradient:before {
    //     opacity: 1;
    // }

    // .btn-gradient:after,
    .btn-default.gradShadow:after {
      z-index: -1;
      content: "";
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0;
      top: 0;
    }

    .btn-default.gradShadow:after {
      opacity: 0;
    }

    // .btn-gradient:after {
    //     opacity: 1;
    // }

    .btn-default.gradShadow:hover:before,
    .btn-default.gradShadow:hover:after {
      opacity: 1;
    }

    // .btn-gradient:hover:before,
    // .btn-gradient:hover:after {
    //     opacity: 0;
    // }

    @keyframes glowing {
      0% {
        background-position: 0 0;
      }

      50% {
        background-position: 400% 0;
      }

      100% {
        background-position: 0 0;
      }
    }

    /* gradShadow end  */

    /* slideSkew start */

    .btn-ghost.slideSkew {
      position: relative;
      overflow: hidden;
      display: inline-block;
      background: transparent;
    }

    .btn-ghost.slideSkew::before {
      content: "";
      position: absolute;
      top: 0;
      left: -150%;
      width: 200%;
      height: 100%;
      background: #ccc;
      transform: skewX(40deg) translateX(-50%);
      transition:
        transform 0.8s ease,
        left 0.8s ease;
      z-index: -1;
    }

    .btn-ghost.slideSkew:hover::before {
      transform: skewX(40deg) translateX(0);
      left: -30%;
      /* Adjusted for smoother entry */
    }

    /* slideSkew end */

    /* shine start */
    .btn-default.shine {
      overflow: hidden;
    }

    .btn-default.shine::before {
      content: "";
      position: absolute;
      left: -100%;
      transform: rotate(140deg);
      z-index: 1;
      transition: 0.5s ease-in-out;
      top: -175%;
      width: 20%;
      height: 400%;
      background-image: linear-gradient(90deg,
          #ffffff 0%,
          #ffffff 30%,
          #28a74500 30%,
          #28a74500 40%,
          #ffffff 40%,
          #ffffff 100%);
      opacity: 0.3;
    }

    .btn-default.shine:hover::before {
      left: 120%;
    }

    /* shine end */

    .btn-ghost.slideRight {
      overflow: hidden;
    }

    .btn-ghost.slideRight:before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      transform: translateX(-100%);
      transition: transform 0.5s ease;
      z-index: -1;
    }

    .btn-ghost.slideRight:hover:before {
      transform: translateX(0);
    }

    .btn-ghost.slideTop {
      overflow: hidden;
    }

    .btn-ghost.slideTop::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      transform: translateY(100%);
      transition: transform 0.5s ease;
      z-index: -1;
    }

    .btn-ghost.slideTop:hover::before {
      transform: translateY(0);
    }

    .sp-smart-post-btn.btn-default.flip {
      outline: 0;
      text-align: center;
      display: inline-block;
      line-height: 120%;
      text-transform: uppercase;
      padding: 0;
      border: none;

      .button-label {
        .back {
          top: 0;
          left: 0;
          display: block;
          transition: $speed;
          position: relative;
          content: attr(data-front);
          transform: translateY(-50%) rotateX(90deg);
        }

        .front {
          top: 0;
          left: 0;
          height: 100%;
          display: block;
          transition: $speed;
          position: absolute;
          content: attr(data-back);
          transform: translateY(0%) rotateX(0deg);
        }
      }
    }

    /* Flip Button End */

    /* Start drawOutline */
    .sp-smart-post-btn.btn-ghost.drawOutline {
      transition: background 0.7s ease;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: rotateAngleReverse 0.3s ease-in-out forwards;
      position: relative;
    }

    .sp-smart-post-btn.btn-ghost.drawOutline::before,
    .sp-smart-post-btn.btn-ghost.drawOutline::after {
      content: "";
      height: 92%;
      position: absolute;
      width: 96%;
      display: flex;
      margin: auto;
      background-color: #fff;
    }

    .sp-smart-post-btn.btn-ghost.drawOutline:hover {
      animation: rotateAngle 0.3s ease-in-out forwards;
    }

    @keyframes rotateAngle {
      0% {
        --angle: 0;
        --transitionTime: 1;
      }

      10% {
        --angle: 36;
      }

      20% {
        --angle: 72;
      }

      30% {
        --angle: 102;
        --transitionTime: 2;
      }

      40% {
        --angle: 133;
      }

      50% {
        --angle: 180;
      }

      60% {
        --angle: 166;
      }

      70% {
        --angle: 200;
      }

      80% {
        --angle: 233;
      }

      90% {
        --angle: 266;
      }

      100% {
        --angle: 360;
      }
    }

    @keyframes rotateAngleReverse {
      100% {
        --angle: 0;
      }

      90% {
        --angle: 36;
      }

      80% {
        --angle: 72;
      }

      70% {
        --angle: 102;
      }

      60% {
        --angle: 133;
      }

      50% {
        --angle: 180;
      }

      40% {
        --angle: 166;
      }

      30% {
        --angle: 200;
      }

      20% {
        --angle: 233;
      }

      10% {
        --angle: 266;
      }

      0% {
        --angle: 360;
      }
    }

    /* End drawOutline */
  }
}

.sp-btn-label {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  font-style: normal;
  text-transform: none;
  text-decoration: none;
}

.sp-smart-post-component-gradient {
  .components-circular-option-picker__clear {
    display: none;
  }
}