// ==========================================================================
// Mixins
// ==========================================================================

// Button styling
// ---------------------------------------
@mixin shr-button-styles($background-color: $shr-button-base-bg-color, $focus-color: transparentize($background-color, 0.66)){
    background-color: $background-color;
    @include contrast-text-color($background-color);

    &:hover,
    &:focus {
        background-color: darken($background-color, 3%);
    }

    &:focus {
        box-shadow: 0 0 0 3px $focus-color;
    }
}

// Contrast helpers
// ---------------------------------------
@mixin contrast-text-color($background: ""){
    @if (lightness($background) >= 65%){
        color: #333;
    } @else {
        color: #fff;
    }
}
