@use '../utils' as *;

/*=============================
	 Button style
===============================*/
.tg-btn {
    user-select: none;
    -moz-user-select: none;
    background: var(--tg-theme-primary) none repeat scroll 0 0;
    border: 0;
    color: var(--tg-color-white-default);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: var(--tg-fw-bold);
    font-family: var(--tg-heading-font-family);
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: 0;
    padding: 15px 26px 17px;
    text-align: center;
    text-transform: capitalize;
    touch-action: manipulation;
    @include transition(.3s);
    vertical-align: middle;
    @include border-radius(50px);
    white-space: nowrap;
    overflow: hidden;
    --arrow-hover-move-x: 110%;
    --arrow-hover-move-y: 100%;
    gap: 10px;
    & svg {
        transition: all 0.3s ease-out 0s;
        width: 14px;
        & 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;
            }
        }
    }
    &:hover,
    &:focus-visible {
        background: var(--tg-theme-secondary);
        color: var(--tg-color-white-default);
        & 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;
                }
            }
        }
    }
    &.white-btn {
        background: var(--tg-color-white-default);
        color: var(--tg-theme-secondary);
        &:hover {
            background: var(--tg-theme-primary);
            color: var(--tg-color-white-default);
        }
    }
    &.black-btn {
        background: var(--tg-theme-secondary);
        color: var(--tg-color-white-default);
        &:hover {
            background: var(--tg-theme-primary);
        }
    }
}

.tg-text-btn {
    text-transform: capitalize;
    color: var(--tg-theme-secondary);
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    --arrow-hover-move-x: 110%;
    --arrow-hover-move-y: 100%;
    & svg {
        transition: all 0.3s ease-out 0s;
        width: 14px;
        & 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;
            }
        }
    }
    &:hover,
    &:focus-visible {
        color: var(--tg-theme-primary);
        & 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;
                }
            }
        }
    }
}

.tg-btn-two {
    background: var(--tg-color-gray-1);
    color: var(--tg-theme-primary);
    @include border-radius(8px);
}

.tg-btn-blue {
    color: var(--tg-theme-primary);
    &:hover {
        color: var(--tg-theme-secondary);
    }
}

.tg-border-btn {
    background: transparent;
    border: 1px solid var(--tg-theme-primary);
    color: var(--tg-theme-primary);
    padding: 14px 26px 16px;
    &:hover {
        background: var(--tg-theme-primary);
        color: var(--tg-color-white-default);
        border-color: var(--tg-theme-primary);
    }
}

.tg-border-btn-two {
    @include border-radius(8px);
}