// Entries
@mixin entry($t) {

    @if $t==normal {
        color: $entry_fg;
        background-color: $entry_bg;
        border-color: $entry_border;
    }
    @else if $t==focus {
        color: $entry_fg;
        background-color: $entry_bg;
        border-color: if($variant == 'default', $button_border, $selected_bg_color);

        @if $variant == 'default' {
            box-shadow: inset 1px 0 $selected_bg_color,
                        inset -1px 0 $selected_bg_color,
                        inset 0 1px $selected_bg_color,
                        inset 0 -1px $selected_bg_color;
        }
    }
    @else if $t==insensitive {
        color: transparentize($entry_fg, 0.65);
        background-color: transparentize($entry_bg, 0.3);
        border-color: transparentize($entry_border, 0.3);
    }
}

// Buttons
@mixin button($t, $bg:$button_bg, $fg:$button_fg, $active_bg:$selected_bg_color,
              $active_fg:$selected_fg_color, $border:$button_border) {

    @if $t==normal {
        color: $fg;
        outline-color: transparentize($fg, 0.7);
        background-color: $bg;
        border-color: $border;
    }
    @else if $t==hover {
        color: $fg;
        background-color: opacify(lighten($bg, 15%), 0.1);
        border-color: $border;
    }
    @else if $t==active {
        color: $active_fg;
        background-color: $active_bg;
        border-color: $border;
    }
    @else if $t==insensitive {
        color: transparentize($fg, 0.65);
        background-color: transparentize($bg, 0.1);
        border-color: transparentize($border, 0.2);

        > label { color: inherit; }
    }
    @else if $t==insensitive-active {
        opacity: 0.5;
    }
    @else if $t==flat {
        background-color: transparentize($bg, 1); // makes transitions nicer
        border-color: transparentize($border, 1); //
    }
}
