@use "../abstracts/mixins";
@use "../abstracts/variables";

.button{
    position: relative;
    display: inline-block;
    color: variables.$cPrimary;
    font-family: variables.$ffC;
    // @include fontSize(14,14);
    font-size: 14px;
    line-height: 1;
    padding: 10px 10px;
    text-decoration: none;
    transition: color 0.5s variables.$ExpoEaseInOut;
    overflow: hidden;

    @include mixins.respondTo('xs'){
        padding-left: 0;
        padding-right: 0;
    }

    span{
        position: relative;
        z-index: 1;
    }

    &::after{
        content: "";
        position: absolute;
        z-index: 0;
        top: 0; left: 0; right: 0;
        height: 100%;
        background-color: variables.$cPrimary;
        transform: translateY(calc(100% - 2px));
        transform-origin: top center;
        will-change: transform;
        transition: transform 0.5s variables.$ExpoEaseInOut;
    }

    @include mixins.hover{
        color: variables.$cLight;

        &::after{
            transform: translateY(0);
        }
    }

    &--light{
        color: variables.$cLight;

        &::after{
            background-color: variables.$cLight;
        }

        @include mixins.hover{
            color: variables.$cPrimary;
        }
    }

    &--dark{
        color: variables.$cDark;

        &::after{
            background-color: variables.$cDark;
        }

        @include mixins.hover{
            color: variables.$cLight;
        }
    }
}