@import '../dynamic.scss';

.btn {
    font-family: $font-family-base;

    height: 4rem;
    line-height: calc(4rem - 2px);
    border-radius: 2rem;
    padding-top: 0;
    padding-bottom: 0;

    text-align: center;
    text-decoration: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    white-space: nowrap;
    width: auto;

    .icon {
        line-height: inherit;
        vertical-align: middle;
        &.icon-before {
            margin-right: 0.5rem;
        }
        &.icon-after {
            margin-left: 0.5rem;
        }
    }
}

.btn-sm {
    height: 3rem;
    line-height: calc(3rem - 2px);
    border-radius: 1.5rem;
    padding-top: 0;
    padding-bottom: 0;
}

.btn-lg {
    border-radius: 2rem;
    line-height: 1;
}

.btn-wide {
    min-width: 200px;
    @include media-breakpoint-up(md) {
        min-width: 300px;
    }
}

.btn-fluid {
    width: 100%;
    &.btn--icon {
        min-width: 160px;
        width: 100%;
        height: auto;
    }
    &.btn--icon-fixed {
        min-width: 240px;
        position: relative;
        .icon-before,
        .icon-before > svg {
            display: block;
            margin: 0 auto;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            left: 2.5rem;
        }

        .icon-after,
        .icon-after > svg {
            display: block;
            margin: 0 auto;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: 2.5rem;
        }
    }
}

//TODO - make me a default
.btn-shadow {
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.04);
}

.btn.btn-palette-color-1 {
    color: $black;
    &:hover {
        color: $black;
    }
}
.btn-light {
    background: $white;
}

.btn-group {
    & > .btn + .btn {
        margin-left: 0;
    }
    & > .btn:not(:first-child) {
        border-left: 1px currentColor solid;
    }
}

.btn-toggle {
    background-color: $white;
    color: $dark;
    border-color: $dark;
    &.btn-toggle:hover,
    &.active {
        background-color: $dark;
        color: $white !important;
        svg {
            fill: $white;
        }
    }
    svg {
        fill: $dark;
    }
}

.btn-round {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 50%;
}
.btn-round.btn-sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
}
.btn-round.btn-lg {
    width: 47px;
    height: 47px;
    font-size: 18px;
}
