// form elements
.btn, .form-control {
    font-size: 0.94rem;
    padding: 0.6rem;
    line-height: 0.8rem;
}
.btn .fa {
    padding-right: 3pt;
}
.form-control {
    padding: 0.4rem;
    line-height: normal;
}
.darkmode {
    .form-control, .form-control:focus {
        color: $default-font-color-darktheme;
        background-color: $default-bg-color-darktheme;
        border: 1px solid rgba(255,255,255,0.1);
    }
}
.form-control:invalid {
    background: #ffaaaa80;
}
.darkmode {
    .form-control:invalid {
        background: #ff666680;
    }
}
.form-group .control-label {
    font-weight: bold;
    margin-top: auto;
    margin-bottom: auto;
}
@include media-breakpoint-up(md) {
    .form-group .control-label {
        text-align: right;
    }
}
select.form-control {
    padding: 0rem;
}
.form-inline {
    // don't use flexbox here, this would break too much of our forms
    display: block;
}

// enhance style buttons on hover and focus
@mixin btn($class,$bg) {
    .btn-#{$class} {
        background-size: 200% 200%;
        background-position: 50%;

        &:focus {
            background-color: $bg;
        }

        &:hover,
        &:active:hover {
            background-color: darken($bg, 6%);
        }

        &:active {
            background-color: darken($bg, 12%);
            @include gradient-radial(darken($bg, 12%) 10%, $bg 11%);
            background-size: 1000% 1000%;
            @include box-shadow(2px 2px 4px rgba(0,0,0,.4));
        }
    }
}
@include btn(default,$btn-default-bg);
@include btn(primary,$btn-primary-bg);
@include btn(secondary,$btn-secondary-bg);
@include btn(success,$btn-success-bg);
@include btn(info,$btn-info-bg);
@include btn(warning,$btn-warning-bg);
@include btn(danger,$btn-danger-bg);
@include btn(light,$btn-light-bg);
@include btn(dark,$btn-dark-bg);
@include btn(link,#fff);
.darkmode {
    @include btn(default,$btn-default-bg-darktheme);
    @include btn(primary,$btn-primary-bg-darktheme);
    @include btn(secondary,$btn-secondary-bg-darktheme);
    @include btn(success,$btn-success-bg-darktheme);
    @include btn(info,$btn-info-bg-darktheme);
    @include btn(warning,$btn-warning-bg-darktheme);
    @include btn(danger,$btn-danger-bg-darktheme);
    @include btn(light,$btn-light-bg-darktheme);
    @include btn(dark,$btn-dark-bg-darktheme);
    @include btn(link,#000);
}
.btn {
    border: none;
    @include box-shadow(1px 1px 4px rgba(0,0,0,.4));
    @include transition(all 0.4s);

    &-link {
        border-radius: $btn-border-radius-base;
        @include box-shadow(none);
        color: $btn-default-color;
        &:hover,
        &:focus {
            @include box-shadow(none);
            color: $btn-default-color;
            text-decoration: none;
        }
    }
    &-default.disabled {
        background-color: rgba(0, 0, 0, 0.1);
        color: rgba(0, 0, 0, 0.4);
        opacity: 1;
    }
}
.btn-group {
    .btn + .btn,
    .btn + .btn-group,
    .btn-group + .btn,
    .btn-group + .btn-group {
        margin-left: 0;
    }
    &-vertical {
        > .btn + .btn,
        > .btn + .btn-group,
        > .btn-group + .btn,
        > .btn-group + .btn-group {
            margin-top: 0;
        }
    }
}
.darkmode {
    .btn.btn-light {
        background-color: #070605;
        border-color: #070605;
    }
}

// wells (used for comments)
.well-lg {
    padding: 24px;
    border-radius: 3px;
}
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #fdfdfd;
    border: 1px solid #e3e3e3;
    border-radius: 1px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.darkmode {
    .well {
        background-color: $default-bg-color-darktheme;
        border-color: #1c1c1c;
    }
}

// round images (used for comments) and badges inside summary
.img-circle {
    border-radius: 50%;
}

.editor-yaml-guide {
    display: none;
    text-align: left !important;
}

.darkmode {
    .custom-select {
        color: $default-font-color-darktheme;
        background-color: $default-bg-color-darktheme;
    }
}
