/*=====================
 button css start
==========================*/
button {
    cursor: pointer;
}

.btn {
    line-height: 20px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    border-radius: 0;
    transition: 0.3s ease-in-out;

    &:hover {
        transition: 0.3s ease-in-out;
    }

    &:focus {
        box-shadow: none;
    }

    &.disabled,
    &:disabled {
        border-color: transparent;
    }
}

.btn-solid {
    padding: 13px 29px;
    color: $white;
    letter-spacing: 0.05em;
    border: 2px solid var(--theme-color);
    background-image: linear-gradient(30deg, var(--theme-color) 50%, transparent 50%);
    background-size: 850px;
    background-repeat: no-repeat;
    background-position: 0;
    transition: background 300ms ease-in-out;

    &:active {
        border-color: var(--theme-color);
        color: var(--theme-color);
    }

    &:hover {
        background-position: 100%;
        color: $black;
        background-color: $white;
        border-color: var(--theme-color);
        color: var(--theme-color);

        &:active,
        &:focus {
            border-color: var(--theme-color);
            color: var(--theme-color);
        }
    }

    &.btn-sm {
        padding: 9px 16px;
    }

    &.btn-xs {
        padding: 5px 8px;
        text-transform: capitalize;
    }

    &.hover-solid {
        transition: none;

        &:hover,
        &:focus {
            background-color: var(--theme-color);
            opacity: 0.92;
            color: $white;
            transition: none;
        }
    }

    &.disabled,
    &:disabled {
        background-color: var(--theme-color);
        color: $white;
    }
}

.btn-outline {
    display: inline-block;
    padding: 13px 29px;
    letter-spacing: 0.05em;
    border: 2px solid var(--theme-color) !important;
    position: relative;
    color: var(--theme-color);
    background-color: transparent;

    &:before {
        transition: 0.5s all ease;
        position: absolute;
        top: 0;
        left: 50%;
        right: 50%;
        bottom: 0;
        opacity: 0;
        content: "";
        background-color: var(--theme-color);
        z-index: -2;
    }

    &:hover,
    &:focus {
        background-color: var(--theme-color) !important;
        color: $white !important;

        i {
            color: $white !important;
        }

        &:before {
            transition: 0.5s all ease;
            left: 0;
            right: 0;
            opacity: 1;
        }
    }

    &.btn-sm {
        padding: 9px 16px;
        font-size: 12px;
    }
}

button {
    &.btn {

        &.btn-solid,
        &.btn-outline {
            &:active {
                background-image: linear-gradient(30deg, var(--theme-color) 50%, transparent 50%);
                color: $white;
                background: var(--theme-color);
                border-color: var(--theme-color);
            }
        }
    }
}

.btn-classic {
    &:hover {
        background-color: var(--theme-color);
    }
}

.btn-theme {
    background-color: var(--theme-color);
    color: $white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-close {
    background: none;
}

.btn-custom {
    padding: 6px 30px !important;
    border: none;
}

.btn-animation {
    position: relative;
    overflow: hidden;

    svg {
        animation: ring 4s 0.7s ease-in-out infinite;
        font-size: 20px;
        width: unset;
        height: unset;
        margin-top: -7px;
    }

    &:before {
        position: absolute;
        content: "";
        display: inline-block;
        top: -180px;
        left: 0;
        width: 30px;
        height: 100%;
        background-color: $white;
        animation: shiny-btn1 5s ease-in-out infinite;
    }
}

@keyframes shiny-btn1 {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }

    80% {
        transform: scale(0) rotate(45deg);
        opacity: 0.5;
    }

    81% {
        transform: scale(4) rotate(45deg);
        opacity: 1;
    }

    100% {
        transform: scale(50) rotate(45deg);
        opacity: 0;
    }
}

@keyframes ring {
    0% {
        transform: rotateZ(0);
    }

    1% {
        transform: rotateZ(15deg);
    }

    3% {
        transform: rotateZ(-14deg);
    }

    5% {
        transform: rotateZ(17deg);
    }

    7% {
        transform: rotateZ(-16deg);
    }

    9% {
        transform: rotateZ(15deg);
    }

    11% {
        transform: rotateZ(-14deg);
    }

    13% {
        transform: rotateZ(13deg);
    }

    15% {
        transform: rotateZ(-12deg);
    }

    17% {
        transform: rotateZ(12deg);
    }

    19% {
        transform: rotateZ(-10deg);
    }

    21% {
        transform: rotateZ(9deg);
    }

    23% {
        transform: rotateZ(-8deg);
    }

    25% {
        transform: rotateZ(7deg);
    }

    27% {
        transform: rotateZ(-5deg);
    }

    29% {
        transform: rotateZ(5deg);
    }

    31% {
        transform: rotateZ(-4deg);
    }

    33% {
        transform: rotateZ(3deg);
    }

    35% {
        transform: rotateZ(-2deg);
    }

    37% {
        transform: rotateZ(1deg);
    }

    39% {
        transform: rotateZ(-1deg);
    }

    41% {
        transform: rotateZ(1deg);
    }

    43% {
        transform: rotateZ(0);
    }

    100% {
        transform: rotateZ(0);
    }
}

.gradient-btn {
    background: rgb(133, 77, 156);
    background: linear-gradient(90deg, rgba(133, 77, 156, 1) 0%, rgba(208, 78, 214, 1) 100%);
    padding: calc(11px + (15 - 11) * ((100vw - 320px) / (1920 - 320))) calc(19px + (32 - 19) * ((100vw - 320px) / (1920 - 320)));
    border-radius: calc(3px + (7 - 3) * ((100vw - 320px) / (1920 - 320)));
    position: relative;
    border: unset;
    color: $white;
    font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1920 - 320)));
    font-weight: 600;
    z-index: 0;
    margin-top: calc(20px + (33 - 20) * ((100vw - 320px) / (1920 - 320)));

    &::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: calc(3px + (7 - 3) * ((100vw - 320px) / (1920 - 320)));
        padding: 1px;
        background: linear-gradient(120deg, rgba(255, 255, 255, 0.5) 0%, rgba(153, 153, 153, 0.5) 100%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        z-index: -1;
    }

    .btn-check:checked+&,
    :not(.btn-check)+&:active,
    &:first-child:active,
    &.active,
    &.show {
        color: $white;
    }

    &:hover {
        color: $white;
    }
}