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

    &.highlight {
        @include button-background($primary-color);
    }
    .register & {
        @include button-background($register-color);
        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;
        }
        &:last-child {
            margin-right: 0;
        }
    }
}

.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 {
    @include button-small($button-color, $primary-color);
}

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

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

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

    // icon
    &:before {
        content: "\271a";
        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: "\2714";
        background-color: $green;
        @include background-image(linear-gradient(170deg, lighten($green, 14%), $green));
    }
    &.active:hover:before, &.active:focus:before {
        content: "\d7";
        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.control {
    &: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: 0.2em;
    }
    &.less:after {
        border-top: 0;
        border-bottom: 0.3em solid;
    }
}
.showhide_button.content {
    &:after {
        content: "+";
        margin: 0 0.2em;
    }
    &.less:after {
        border: none;
        content: "\2212";  // real minus (not "-")
    }
}

.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;
}
