@use '../utils' as *;

/*=============================
	1. Button style
===============================*/
.tg-button-wrap {
    @include flexbox();
}
.btn {
    user-select: none;
    -moz-user-select: none;
    background: var(--tg-theme-primary) none repeat scroll 0 0;
    border: medium none;
    @include border-radius(6px);
    color: var(--tg-color-white-default);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    margin-bottom: 0;
    padding: 17px 28px;
    text-align: center;
    text-transform: capitalize;
    touch-action: manipulation;
    @include transition(.3s);
    vertical-align: middle;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-family: var(--tg-heading-font-family);
    gap: 10px;
    --arrow-hover-move-x: 110%;
    --arrow-hover-move-y: 100%;
    & svg {
        @include transform(translateY(-1px));
        & path {
            transition: transform .38s cubic-bezier(.37, .08, .02, .93), opacity .18s ease-out;
            &:nth-of-type(1) {
                transform: translateX(0) translateY(0);
                opacity: 1;
                transition-delay: .15s, .15s;

            }
            &:nth-of-type(2) {
                transform: translateX(calc(-1 * var(--arrow-hover-move-x))) translateY(var(--arrow-hover-move-y));
                opacity: .5;
                transition-delay: 0s, 0s;
            }
        }
    }
    &:focus,
    &:hover,
    &:focus-visible {
        color: var(--tg-color-white-default);
        background: var(--tg-theme-secondary);
        & svg {
            & path {
                &:nth-of-type(1) {
                    transform: translateX(var(--arrow-hover-move-x)) translateY(calc(-1 * var(--arrow-hover-move-y)));
                    opacity: 0;
                    transition-delay: 0s, 0s;
                }
                &:nth-of-type(2) {
                    transform: translateX(0) translateY(0);
                    opacity: 1;
                    transition-delay: .15s, .15s;
                }
            }
        }
    }
    &-two {
        background: var(--tg-color-white-default);
        color: var(--tg-theme-primary);
        border: 1px solid var(--tg-border-5);
        padding: 16px 27px;
        &:focus,
        &:focus-visible,
        &:hover {
            background: var(--tg-theme-secondary);
            border-color: var(--tg-theme-secondary);
            color: var(--tg-color-white-default);
        }
    }
    &-three {
        background: var(--tg-color-white-default);
        color: var(--tg-theme-primary);
        &:hover {
            background: var(--tg-color-black-2);
            color: var(--tg-color-white-default);
        }
    }
    &.red-btn {
        background: var(--tg-theme-primary);
        &:hover {
            background: var(--tg-color-black-2);
        }
    }
}

.border-btn {
    border: 1px solid var(--tg-border-5);
    background: transparent;
    color: var(--tg-color-white-default);
    padding: 16px 27px;
    &:hover {
        background: var(--tg-theme-secondary);
        border-color: var(--tg-theme-secondary);
    }
}
.border-btn-two {
    border: 1px solid var(--tg-border-8);
    background: var(--tg-color-white-default);
    color: var(--tg-theme-primary);
    padding: 16px 27px;
    &:hover {
        background: var(--tg-theme-primary);
        border-color: var(--tg-theme-primary);
        color: var(--tg-color-white-default);
    }
}

.white-btn {
    background: var(--tg-color-white-default);
    color: var(--tg-theme-primary);
    &:focus-visible,
    &:hover {
        background: var(--tg-color-white-default);
        color: var(--tg-theme-primary);
    }
}