@color-heart : #EA442B;
@likeAnimationDuration : .5s;
@likeAnimationEasing : cubic-bezier(.7, 0, .3, 1);

.like_btn_wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;

    font-size: 1rem;

    .count {
        display: flex;
        flex-direction: row;

        align-items: center;

        margin-left: 7px;
        font-size: 0.8rem;

        color: var(--text-color);
    }

    //padding: 10px;
    //border-radius: 8px;

    transition: all @likeAnimationDuration @likeAnimationEasing;

    &.liked {
        .like_btn {
            .heart {
                >path {
                    stroke: var(--colorPrimary);
                    fill: var(--colorPrimary);
                }

                filter: drop-shadow(0px 0px 2px var(--colorPrimary));
            }
        }

        //outline: 1px solid var(--colorPrimary);
    }

    &.clicked {
        .like_btn {
            .heart {
                animation: heart-bounce @likeAnimationDuration @likeAnimationEasing;

                @keyframes heart-bounce {
                    40% {
                        transform: scale(0.7);
                    }

                    0%,
                    80%,
                    100% {
                        transform: scale(1);
                    }
                }
            }

            .ripple {
                &:before {
                    animation: ripple-out @likeAnimationDuration @likeAnimationEasing;
                }
            }
        }
    }

    .like_btn {
        display: flex;

        align-items: center;
        justify-content: center;

        .ripple,
        .ripple:before,
        .ripple:after {
            position: relative;
            box-sizing: border-box;
        }

        color: var(--text-color);

        border: none;
        border-radius: 50%;

        width: 1rem;
        height: 1rem;

        padding: 0;
        margin: 0;

        z-index: 2;

        transition: transform @likeAnimationDuration @likeAnimationEasing;

        background-color: transparent;

        &:before {
            z-index: -1;
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 1rem;
            height: 1rem;
            border-radius: inherit;
            transition: inherit;
        }

        &:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 1rem;
            height: 1rem;
            border-radius: inherit;
            z-index: -1;
        }

        .heart {
            position: relative;

            cursor: pointer;

            >path {
                stroke-width: 2;
                transition: fill @likeAnimationDuration @likeAnimationEasing;
                stroke: currentColor;
                fill: transparent;
            }

            animation: none;
        }

        .ripple {
            position: absolute;

            height: 1rem;
            width: 1rem;

            border-radius: 50%;
            overflow: hidden;

            z-index: 1;

            &:before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                border: .4em solid var(--colorPrimary);
                border-radius: inherit;
                transform: scale(0);
            }
        }
    }
}

@keyframes ripple-out {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(5);
    }
}

@keyframes depress {

    from,
    to {
        transform: none;
    }

    50% {
        transform: translateY(5%) scale(0.9);
    }
}

@keyframes depress-shadow {

    from,
    to {
        transform: none;
    }

    50% {
        transform: scale(0.5);
    }
}