/* ==========================================================================
   Form Actions
   ========================================================================== */

/* General
   ========================================================================== */
.form-control {
    max-width: 40rem;
    padding-right: 10px;
    padding-left: 10px;

    -webkit-box-shadow: none;
    box-shadow: none;
}


/* Icon in control
   ========================================================================== */
.form-group--icon-in-control {
    position: relative;
}

.form-group--icon-in-control__form-control {
    padding-left: 3rem;
}

.form-group--icon-in-control__icon {
    position: absolute;
    left: 1rem;
    top: 3.3rem;

    color: $gray-lighter;
}


/* File upload button
   ========================================================================== */
input[type=file].form-control {
    height: auto;
}

/* counter
   ========================================================================== */
.input-group-counter {
    position: relative;

    > select ~ .form-control__character-counter {
        display: none;
    }

    .input-group > & {
        display: table-cell;
    }

    > .form-control {
        padding-right: 30px;
    }
}

.form-control__character-counter {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;

    display: inline-block;
    padding: .6em;

    color: rgba($gray, .7);
    font-size: 90%;
    text-align: right;
    white-space: nowrap;
    vertical-align: baseline;

    pointer-events: none;

    &.form-control__character-counter--warning {
        color: $warning;
    }
}

.rich-editor + .form-control__character-counter {
    position: static;

    @media (min-width: $screen-sm) {
        position: static;
        left: 0;
        top: 0;

        padding: .5rem;

        transform: none;
    }
}

/* Range slider
   =========================================================================== */

input[type=range] {
    display: inline-block;
    width: 88% !important;
    height: 0.5rem;
    padding: 0.3rem 0;
    margin-top: 1rem;

    background-color: $grey--light;

    -webkit-appearance: none;
}

input[type=range]::-webkit-slider-thumb {
    width: 15px;
    height: 15px;

    background-color: $accent-color;

    border-radius: 10px;

    cursor: pointer;

    -webkit-appearance: none;
}

input[type=range]::-ms-thumb {
    width: 15px;
    height: 15px;

    background-color: $accent-color;

    border-radius: 10px;

    cursor: pointer;

    -webkit-appearance: none;
}

input[type=range]::-moz-range-thumb {
    width: 15px;
    height: 15px;

    background-color: $accent-color;

    border-radius: 10px;

    cursor: pointer;

    -webkit-appearance: none;
}

input[type=range]:focus {
    border-color: transparent;
    box-shadow: none;
}

.range,
.checkbox,
.radio,
.urlchooser {

    & + .input-group-addon {
        margin-left: .4rem;

        border-left: 1px solid $ddd;
        border-radius: .3rem;
    }

}

.range--value {
    width: 10%;
    height: 2.8rem;
    display: inline-block;
    margin-left: 2%;
    padding-top: 0.4rem;

    text-align: center;
    color: white;
    border-radius: 0.3rem;

    background-color: $accent-color;
}


