.button {
    @include button($button-color);

    &.highlight {
        @include button-background($primary-color);
    }
    .register & {
        @include button-background($register-color);
        color: #fff;
        line-height: 2;
        float: left;
        margin-right: 1em;
        padding-right: 2em;
        min-width: 10em;
        position: relative;

        &:after {
            background: url('/images/sprite.png') no-repeat 0 -13*50px;
            content: "";
            position: absolute;
            width: 1.5em;
            height: 1.5em;
            display: inline-block;
            right: 0.75em;
            top: 50%;
            margin-top: -0.75em;
        }
    }
}

.submit input, .submit button, button[type="submit"] {
    @include button($primary-color);
    font-size: $medium;
    margin-right: 0.7em;

    // these are replaced elements and therefore
    // `line-height` does not apply in some browsers
    line-height: 1;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

a.button_small {
    color: #fff;
    @include button-small($button-color, $primary-color);
}

a.participate {
    @include button-small($primary-color, $primary-color);
    color: white;
}

a.button_round {
    @include button-round;
    font-weight: normal;
}

/* follow button */
.follow_paper {
    @include button-round;

    // icon
    &:before {
        content: "✚";
        margin-right: 0.4em;
        color: #fff;
        background-color: $button-color;
        @include background-image(linear-gradient(170deg, lighten($button-color, 14%), $button-color));

        // circle
        display: inline-block;
        text-align: center;
        height: 1em;
        width: 1em;
        line-height: 1;
        @include border-radius(50%);
    }
    &:hover:before, &:focus:before {
        background-color: $green;
        @include background-image(linear-gradient(170deg, lighten($green, 14%), $green));
    }
    &.active:before {
        content: "✔";
        background-color: $green;
        @include background-image(linear-gradient(170deg, lighten($green, 14%), $green));
    }
    &.active:hover:before, &.active:focus:before {
        content: "×";
        background-color: $red;
        @include background-image(linear-gradient(170deg, lighten($red, 14%), $red));
    }
}
.message_button {
    @include button-round;
}

/* delegate button */
a.button.delegate {
    @include button-round;
}

.list_button,
.top_actions,
.admin_controls {
    margin: 1em 0;
}

.showhide_button {
    &:after {
        display: inline-block;
        width: 0;
        height: 0;
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-left: 0.3em solid transparent;
        content: "";
        vertical-align: middle;
        margin-left: 0.2em;
    }
    &.less:after {
        border-top: 0;
        border-bottom: 0.3em solid;
    }
}

.loading:after {
    width: 1.2em;
    height: 1.2em;
    line-height: 1.2em;
    content: ".";
    text-indent: 100%;
    display: inline-block;
    background: url('/images/loading.gif');
    margin-left: 0.5em;
}
