// Primary Button

.th-btn { 
    position: relative;
    z-index: 2;
    overflow: hidden;
    vertical-align: middle;
    display: inline-block;
    text-transform: uppercase;
    text-align: center;
    border: none;
    background-color: $theme-color;
    color: $white-color;
    font-family: $body-font;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 22px 30px;
    min-width: 144px;
    border-radius: 10px;
    transition: all 0.4s ease-in-out; 
    &::before,
    &:after {
        content: "";
        background: $white-color;
        position: absolute;
        transition: all 0.5s ease 0s;
        z-index: -1;
        height: 0%;
        left: 0;
        top: 0;
        transform: skew(0deg);
        transform-origin: top left;
        width: 100%;
        border-radius: 10px;        
    }
    &:hover,
    &.active {
        color: $white-color;
        &:before,
        &:after {
            height: 100%;
            background: $theme-color;
        }
    }  

    // &:before,
    // &:after {
    //     content: "";
    //     position: absolute;
    //     background-color: $title-color;
    //     z-index: -1;
    //     transition: all 0.4s ease-out;
    //     top: 50%;
    //     width: 60px;
    //     height: 60px;
    //     border-radius: 10px;
    // }

    // &:before {
    //     left: -60px;
    //     transform: translate(-50%, -50%);
    // }

    // &:after {
    //     right: -60px;
    //     transform: translate(50%, -50%);
    // }

    // &:hover,
    // &.active {
    //     color: $white-color;
    //     box-shadow: none;

    //     &:before {
    //         animation: criss-cross-left 0.8s both;
    //         animation-direction: alternate;
    //     }

    //     &:after {
    //         animation: criss-cross-right 0.8s both;
    //         animation-direction: alternate;
    //     }
    // }

    &.style2 {
        background-color: $white-color;
        color: $theme-color; 

        &:hover {
            color: $white-color;

            &:before,
            &:after {
                background-color: $title-color;
            }
        }
    }

    &.style3 {
        background-color: $title-color;
        color: $white-color;

        &:hover {

            &:before,
            &:after {
                background-color: $theme-color;
            }
        }
    }

    &.style4 {
        background-color: $theme-color;
        color: $white-color;

        &:hover {
            color: $title-color !important;

            &:before,
            &:after {
                background-color: $white-color;
            }
        }
    }

    &.border {
        padding: 18px 30px;
        border: 1px solid $th-border-color;
        background: transparent;
        color: $body-color;

        &:before,
        &:after {
            background: $theme-color;
        }

        &:hover {
            border: 1px solid $theme-color;
            color: $white-color;
        }
    }

    &.style5 {
        background-color: $white-color;
        color: $title-color;
        box-shadow: none;

        &:hover {
            color: $white-color;

            &:before,
            &:after {
                background-color: $title-color;
            }
        }
    }


    &.th-border {
        border: 1px solid $white-color;
        background: transparent;
        color: $white-color;

        &:before,
        &:after {
            background: $theme-color;
        }

        &:hover {
            border: 1px solid $theme-color;
        }
    }

    &.fw-btn {
        width: 100%;
    }

    &.border-radius {
        border-radius: 30px;
    }
    &.radius-none {
        border-radius: 0px;
        &::before,
        &:after {
            border-radius: 0px; 
        }
    }
}

@include xs {
    .th-btn {
        padding: 17.5px 34px;
    }
}

@keyframes criss-cross-left {
    0% {
        left: -20px;
    }

    50% {
        left: 50%;
        height: 60px;
        width: 60px;
    }

    100% {
        left: 50%;
        height: calc(300px*1.5);
        width: calc(300px*1.5);
    }
}

@keyframes criss-cross-right {
    0% {
        right: -20px;
    }

    50% {
        right: 50%;
        height: 60px;
        width: 60px;
    }

    100% {
        right: 50%;
        height: calc(300px*1.5);
        width: calc(300px*1.5);
    }
}

// Icon Btn
.icon-btn {
    display: inline-block;
    width: var(--btn-size, 46px);
    height: var(--btn-size, 46px);
    line-height: var(--btn-size, 46px);
    font-size: var(--btn-font-size, 16px);
    background-color: var(--icon-bg, transparent);
    color: $title-color;
    text-align: center;
    border-radius: 50%;
    border: 1px solid $th-border-color;
    transition: 0.4s ease-in-out;
    position: relative;

    &:hover {
        background-color: $theme-color;
        border-color: $theme-color;
        color: $white-color;
    }
}

// Play Button
.play-btn {
    display: inline-block;
    position: relative;
    z-index: 1;

    >i {
        display: inline-block;
        width: var(--icon-size, 60px);
        height: var(--icon-size, 60px);
        line-height: var(--icon-size, 60px);
        text-align: center;
        background-color: $theme-color;
        color: $white-color;
        font-size: var(--icon-font-size, 1.1em);
        border-radius: 50%;
        z-index: 1;
        transition: all ease 0.4s;

        &.fa-play {
            padding-right: 0.18em;
        }
    }

    &:after,
    &:before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background-color: $theme-color;
        @extend .ripple-animation;
        z-index: -1;
        border-radius: 50%;
        transition: all ease 0.4s;
    }

    &:after {
        animation-delay: 2s;
    }

    &:hover {

        &:after,
        &::before,
        i {
            background-color: $theme-color;
            color: $white-color;
        }
    }

    &.style2 {

        &:before,
        &:after {
            background-color: transparent;
            border: 1px solid $white-color;
        }
    }

    &.style3 {
        >i {
            background-color: $theme-color;
            color: $white-color;
            font-size: 20px;
        }

        &:before,
        &:after {
            background-color: $white-color;
        }

        &:hover {
            >i {
                background-color: $white-color;
                color: $theme-color;
            }
        }
    }

}

// Link Button 
.link-btn {
    font-weight: 700;
    font-size: 16px;
    display: inline-block;
    line-height: 26px;
    position: relative;
    padding-bottom: 2px;
    margin-bottom: -2px;
    text-transform: uppercase;
    color: $title-color;

    i {
        margin-left: 5px;
        font-size: 0.9rem;
    }

    &:before {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0;
        height: 2px;
        background-color: $theme-color;
        transition: all ease 0.4s;
    }

    &:hover {
        color: $theme-color;

        &::before {
            width: 100%;
        }
    }
}

.line-btn {
    font-family: $body-font;
    font-size: 14px;
    font-weight: 900;
    display: inline-block;
    position: relative;
    padding-bottom: 0px;
    margin-bottom: -1px;
    text-transform: uppercase;
    color: $theme-color;

    i {
        margin-left: 10px;
        font-size: 0.9rem;
    }

    &:before {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 85%;
        height: 1px;
        background-color: $theme-color;
        transition: all ease 0.4s;
    }

    &:hover {
        color: $title-color;

        &::before {
            background-color: $title-color;
            width: 45px;
        }
    }
}

.half-line-btn {
    font-size: 16px;
    font-weight: 700;
    display: inline-block;
    line-height: 0.8;
    font-family: $title-font;
    position: relative;
    padding-bottom: 0px;
    margin-bottom: -6px;
    text-transform: uppercase;
    color: $title-color;
    transition: all 0.4s;

    i {
        margin-left: 10px;
        font-size: 0.9rem;
        color: $theme-color;
        transition: all 0.4s;
    }

    &:before {
        content: "";
        position: absolute;
        left: 0;
        bottom: -3px;
        width: 20px;
        height: 1px;
        background-color: $title-color;
        transition: all ease 0.4s;
    }

    &:hover {
        color: $theme-color;

        i {
            margin-left: 15px;
        }

        &::before {
            background-color: $theme-color;
            width: 75%;
        }
    }
}

// Scroll To Top 


.scroll-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    height: 50px;
    width: 50px;
    cursor: pointer;
    display: block;
    border-radius: 50px;
    z-index: 10000;
    opacity: 1;
    visibility: hidden;
    transform: translateY(45px);
    transition: all 300ms linear;

    &:after {
        content: "\f062";
        font-family: $icon-font;
        position: absolute;
        text-align: center;
        line-height: 50px;
        font-size: 20px;
        color: $theme-color;
        left: 0;
        top: 0;
        height: 50px;
        width: 50px;
        cursor: pointer;
        display: block;
        z-index: 1;
        border: 2px solid $theme-color;
        box-shadow: none;
        border-radius: 50%;
    }

    svg {
        color: $theme-color;
        border-radius: 50%;
        background: $white-color;

        path {
            fill: none;
        }
    }

    .progress-circle path {
        stroke: $theme-color;
        stroke-width: 20px;
        box-sizing: border-box;
        transition: all 400ms linear;
    }

    &.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

@include sm {
    .play-btn {
        --icon-size: 60px;
    }
}