@import "./var.scss";

.miao-btn {
    outline: 0;
    border: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 30px;
    font-size: 28px;
    height: 64px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    overflow: visible;
    margin-left: initial;
    transform: translate(0px, 0px);
    margin-right: initial;

    &::after {
        display: none;
    }

    &:not([class*="bg-"]) {
        background-color: #f0f0f0;
    }

    &[class*="line"] {
        background-color: transparent;

        &::after {
            content: " ";
            display: block;
            width: 200%;
            height: 200%;
            position: absolute;
            top: 0;
            left: 0;
            border: 2px solid currentColor;
            transform: scale(0.5);
            transform-origin: 0 0;
            box-sizing: border-box;
            border-radius: 12px;
            z-index: 1;
            pointer-events: none;
        }
    }

    &.round {
        &[class*="line"] {
            &::after {
                border-radius: 1000px;
            }
        }
    }

    &[class*="lines"] {
        &::after {
            border: 6px solid currentColor;
        }
    }

    &[class*="bg-"] {
        &::after {
            display: none;
        }
    }

    &._sm {
        padding: 0 20px;
        font-size: 20px;
        height: 48px;
    }

    &._df,
    &._md {
        padding: 0 30px;
        font-size: 28px;
        height: 64px;
    }

    &._lg {
        padding: 0 40px;
        font-size: 32px;
        height: 80px;
    }

    &.xl {
        padding: 0 50px;
        font-size: 36px;
        height: 94px;
    }

    &._xxl {
        padding: 0 60px;
        font-size: 40px;
        height: 108px;
    }

    &._sl {
        padding: 0 70px;
        font-size: 44px;
        height: 122px;
    }

    &._xsl {
        padding: 0 80px;
        font-size: 48px;
        height: 136px;
    }

    &.icon {
        width: 64px;
        height: 64px;
        border-radius: 500px;
        padding: 0;

        &.sm {
            width: 48px;
            height: 48px;
        }
    }

    &.shadow-blur {
        &::before {
            top: 4px;
            left: 4px;
            filter: blur(6px);
            opacity: 0.6;
        }
    }

    &.button-hover:not([class*="disabled"]) {
        transform: translate(1px, 1px);
    }

    &:active:not([class*="disabled"]) {
        transform: translate(1px, 1px);
    }

    &.block {
        display: flex;
    }

    &.disabled,
    &[disabled] {
        opacity: 0.6;
        color: $white;
    }
}

.miao-btn {
    &.shadow {
        &[class*="-brown"] {
            box-shadow: $ShadowSize $brownShadow;
        }

        &[class*="-gray"] {
            box-shadow: $ShadowSize $grayShadow;
        }

        &[class*="-black"] {
            box-shadow: $ShadowSize $blackShadow;
        }
    }
}
