/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/*!
* Extracted from Bootstrap v2.3.2
*
* Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/

.red-ui-editor, .red-ui-editor-dialog {

    button,
    input,
    select,
    div[contenteditable="true"],
    textarea {
        margin: 0;
        font-size: 100%;
        vertical-align: middle;
    }

    button,
    div[contenteditable="true"],
    input {
        line-height: normal;
    }

    button::-moz-focus-inner,
    div[contenteditable="true"]::-moz-focus-inner,
    input::-moz-focus-inner {
        padding: 0;
        border: 0;
    }

    button,
    html input[type="button"],
    input[type="reset"],
    input[type="submit"] {
        cursor: pointer;
        -webkit-appearance: button;
    }

    label,
    select,
    button,
    input[type="button"],
    input[type="reset"],
    input[type="submit"],
    input[type="radio"],
    input[type="checkbox"] {
        cursor: pointer;
    }

    input[type="search"] {
        box-sizing: content-box;
    }

    input[type="search"]::-webkit-search-decoration,
    input[type="search"]::-webkit-search-cancel-button {
        -webkit-appearance: none;
    }

    textarea {
        overflow: auto;
        vertical-align: top;
    }

    form {
        margin: 0 0 20px;
    }

    fieldset {
        padding: 0;
        margin: 0;
        border: 0;
    }

    legend {
        display: block;
        width: 100%;
        padding: 0;
        margin-bottom: 20px;
        font-size: 21px;
        line-height: 40px;
        color: var(--red-ui-tertiary-text-color);
        border: 0;
        border-bottom: 1px solid var(--red-ui-secondary-border-color);
    }

    legend small {
        color: var(--red-ui-tertiary-text-color);
    }


    label,
    input,
    div[contenteditable="true"],
    button,
    select,
    textarea {
        font-size: 14px;
        font-weight: normal;
        line-height: 20px;
    }

    input,
    div[contenteditable="true"],
    button,
    select,
    textarea {
        font-family: var(--red-ui-primary-font);
    }

    label {
        display: block;
        margin-bottom: 5px;
    }

    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"],
    div[contenteditable="true"],
    .uneditable-input,
    .placeholder-input {
        box-sizing: border-box;
        display: inline-block;
        height: 34px;
        padding: 6px 6px;
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 20px;
        color: var(--red-ui-form-text-color);
        vertical-align: middle;
        border-radius: 4px;
    }

    input,
    textarea,
    div[contenteditable="true"],
    .uneditable-input {
        width: 206px;
    }

    textarea {
        height: auto;
    }

    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"],
    div[contenteditable="true"],
    .uneditable-input,
    .placeholder-input {
        background-color: var(--red-ui-form-input-background);
        border: 1px solid var(--red-ui-form-input-border-color);
    }

    textarea:focus,
    input[type="text"]:focus,
    input[type="password"]:focus,
    input[type="datetime"]:focus,
    input[type="datetime-local"]:focus,
    input[type="date"]:focus,
    input[type="month"]:focus,
    input[type="time"]:focus,
    input[type="week"]:focus,
    input[type="number"]:focus,
    input[type="email"]:focus,
    input[type="url"]:focus,
    input[type="search"]:focus,
    input[type="tel"]:focus,
    input[type="color"]:focus,
    div[contenteditable="true"]:focus,
    .uneditable-input:focus {
        border-color: var(--red-ui-form-input-focus-color);
        outline: 0;
    }

    input[type="radio"],
    input[type="checkbox"] {
        margin: 4px 0 0;
        line-height: normal;
    }

    input[type="file"],
    input[type="image"],
    input[type="submit"],
    input[type="reset"],
    input[type="button"],
    input[type="radio"],
    input[type="checkbox"] {
        width: auto;
    }

    select,
    input[type="file"] {
        height: 34px;
        line-height: 34px;
    }

    select {
        width: 220px;
        background-color: var(--red-ui-form-input-background);
        border: 1px solid var(--red-ui-form-input-border-color);
    }

    select[multiple],
    select[size] {
        height: auto;
    }

    select:focus,
    input[type="file"]:focus,
    input[type="radio"]:focus,
    input[type="checkbox"]:focus {
        outline: 2px auto var(--red-ui-form-input-focus-color);
        outline-offset: -3px;
    }

    .uneditable-input,
    .uneditable-textarea {
        color: var(--red-ui-form-text-color-disabled);
        cursor: not-allowed;
        background-color: var(--red-ui-form-input-background-disabled);
        border-color: var(--red-ui-form-input-border-color);
    }

    .uneditable-input {
        overflow: hidden;
        white-space: nowrap;
    }

    .uneditable-textarea {
        width: auto;
        height: auto;
    }

    input:-moz-placeholder,
    textarea:-moz-placeholder {
        color: var(--red-ui-form-placeholder-color);
    }

    input::-webkit-input-placeholder,
    div[contenteditable="true"]::-webkit-input-placeholder,
    textarea::-webkit-input-placeholder {
        color: var(--red-ui-form-placeholder-color);
    }

    .radio,
    .checkbox {
        min-height: 20px;
        padding-left: 20px;
    }

    .radio input[type="radio"],
    .checkbox input[type="checkbox"] {
        float: left;
        margin-left: -20px;
    }

    .controls > .radio:first-child,
    .controls > .checkbox:first-child {
        padding-top: 5px;
    }

    .radio.inline,
    .checkbox.inline {
        display: inline-block;
        padding-top: 5px;
        margin-bottom: 0;
        vertical-align: middle;
    }

    .radio.inline + .radio.inline,
    .checkbox.inline + .checkbox.inline {
        margin-left: 10px;
    }

    .input-mini {
        width: 60px;
    }

    .input-small {
        width: 90px;
    }

    .input-medium {
        width: 150px;
    }

    .input-large {
        width: 210px;
    }

    .input-xlarge {
        width: 270px;
    }

    .input-xxlarge {
        width: 530px;
    }

    input[class*="span"],
    select[class*="span"],
    textarea[class*="span"],
    .uneditable-input[class*="span"],
    .row-fluid input[class*="span"],
    .row-fluid select[class*="span"],
    .row-fluid textarea[class*="span"],
    .row-fluid .uneditable-input[class*="span"] {
        float: none;
        margin-left: 0;
    }

    .input-append input[class*="span"],
    .input-append .uneditable-input[class*="span"],
    .input-prepend input[class*="span"],
    .input-prepend .uneditable-input[class*="span"],
    .row-fluid input[class*="span"],
    .row-fluid select[class*="span"],
    .row-fluid textarea[class*="span"],
    .row-fluid .uneditable-input[class*="span"],
    .row-fluid .input-prepend [class*="span"],
    .row-fluid .input-append [class*="span"] {
        display: inline-block;
    }

    input,
    textarea,
    div[contenteditable="true"],
    .uneditable-input {
        margin-left: 0;
    }

    label.disabled {
        color: var(--red-ui-form-text-color-disabled);
        cursor: default;
    }

    input[disabled],
    select[disabled],
    textarea[disabled],
    input[readonly],
    select[readonly],
    textarea[readonly] {
        cursor: not-allowed;
        color: var(--red-ui-form-text-color-disabled);
        background-color: var(--red-ui-form-input-background-disabled);
    }

    input[type="radio"][disabled],
    input[type="checkbox"][disabled],
    input[type="radio"][readonly],
    input[type="checkbox"][readonly] {
        background-color: transparent;
    }

    input:invalid,
    div[contenteditable="true"]:invalid,
    textarea:invalid,
    select:invalid {
        border-color: var(--red-ui-form-input-border-error-color);
    }

    input:focus:invalid,
    div[contenteditable="true"]:focus:invalid,
    textarea:focus:invalid,
    select:focus:invalid {
        border-color: var(--red-ui-form-input-border-error-color);
    }

    input:focus:invalid:focus,
    div[contenteditable="true"]:focus:invalid:focus,
    textarea:focus:invalid:focus,
    select:focus:invalid:focus {
        border-color: var(--red-ui-form-input-border-error-color);
    }

    .input-append,
    .input-prepend {
        display: inline-block;
        margin-bottom: 10px;
        font-size: 0;
        white-space: nowrap;
        vertical-align: middle;
    }

    .input-append input,
    .input-prepend input,
    .input-append div[contenteditable="true"],
    .input-prepend div[contenteditable="true"],
    .input-append select,
    .input-prepend select,
    .input-append .uneditable-input,
    .input-prepend .uneditable-input,
    .input-append .red-ui-menu-dropdown,
    .input-prepend .red-ui-menu-dropdown,
    .input-append .popover,
    .input-prepend .popover {
        font-size: 14px;
    }

    .input-append input,
    .input-prepend input,
    .input-append div[contenteditable="true"],
    .input-prepend div[contenteditable="true"],
    .input-append select,
    .input-prepend select,
    .input-append .uneditable-input,
    .input-prepend .uneditable-input {
        position: relative;
        margin-bottom: 0;
        vertical-align: top;
        border-radius: 0 4px 4px 0;
    }

    .input-append input:focus,
    .input-prepend input:focus,
    .input-append div[contenteditable="true"]:focus,
    .input-prepend div[contenteditable="true"]:focus,
    .input-append select:focus,
    .input-prepend select:focus,
    .input-append .uneditable-input:focus,
    .input-prepend .uneditable-input:focus {
        z-index: 2;
    }

    .input-append .add-on,
    .input-prepend .add-on {
        display: inline-block;
        width: auto;
        height: 20px;
        min-width: 16px;
        padding: 4px 5px;
        font-size: 14px;
        font-weight: normal;
        line-height: 20px;
        text-align: center;
        background-color: var(--red-ui-form-button-background);
        border: 1px solid var(--red-ui-form-input-border-color);
    }

    .input-append .add-on,
    .input-prepend .add-on,
    .input-append .btn,
    .input-prepend .btn,
    .input-append .btn-group > .dropdown-toggle,
    .input-prepend .btn-group > .dropdown-toggle {
        vertical-align: top;
        border-radius: 0;
    }

    .input-prepend .add-on,
    .input-prepend .btn {
        margin-right: -1px;
    }

    .input-prepend .add-on:first-child,
    .input-prepend .btn:first-child {
        border-radius: 4px 0 0 4px;
    }

    .input-append input,
    .input-append div[contenteditable="true"],
    .input-append select,
    .input-append .uneditable-input {
        border-radius: 4px 0 0 4px;
    }

    .input-append input + .btn-group .btn:last-child,
    .input-append select + .btn-group .btn:last-child,
    .input-append .uneditable-input + .btn-group .btn:last-child {
        border-radius: 0 4px 4px 0;
    }

    .input-append .add-on,
    .input-append .btn,
    .input-append .btn-group {
        margin-left: -1px;
    }

    .input-append .add-on:last-child,
    .input-append .btn:last-child,
    .input-append .btn-group:last-child > .dropdown-toggle {
        border-radius: 0 4px 4px 0;
    }

    .input-prepend.input-append input,
    .input-prepend.input-append div[contenteditable="true"],
    .input-prepend.input-append select,
    .input-prepend.input-append .uneditable-input {
        border-radius: 0;
    }

    .input-prepend.input-append input + .btn-group .btn,
    .input-prepend.input-append select + .btn-group .btn,
    .input-prepend.input-append .uneditable-input + .btn-group .btn {
        border-radius: 0 4px 4px 0;
    }

    .input-prepend.input-append .add-on:first-child,
    .input-prepend.input-append .btn:first-child {
        margin-right: -1px;
        border-radius: 4px 0 0 4px;
    }

    .input-prepend.input-append .add-on:last-child,
    .input-prepend.input-append .btn:last-child {
        margin-left: -1px;
        border-radius: 0 4px 4px 0;
    }

    .input-prepend.input-append .btn-group:first-child {
        margin-left: 0;
    }

    input.search-query {
        padding-right: 14px;
        padding-left: 14px;
        margin-bottom: 0;
        border-radius: 15px;
    }

    /* Allow for input prepend/append in search forms */

    .form-search .input-append .search-query,
    .form-search .input-prepend .search-query {
        border-radius: 0;
    }

    .form-search .input-append .search-query {
        border-radius: 14px 0 0 14px;
    }

    .form-search .input-append .btn {
        border-radius: 0 14px 14px 0;
    }

    .form-search .input-prepend .search-query {
        border-radius: 0 14px 14px 0;
    }

    .form-search .input-prepend .btn {
        border-radius: 14px 0 0 14px;
    }

    .form-search input,
    .form-inline input,
    .form-horizontal input,
    .form-search div[contenteditable="true"],
    .form-inline div[contenteditable="true"],
    .form-horizontal div[contenteditable="true"],
    .form-search textarea,
    .form-inline textarea,
    .form-horizontal textarea,
    .form-search select,
    .form-inline select,
    .form-horizontal select,
    .form-search .help-inline,
    .form-inline .help-inline,
    .form-horizontal .help-inline,
    .form-search .uneditable-input,
    .form-inline .uneditable-input,
    .form-horizontal .uneditable-input,
    .form-search .input-prepend,
    .form-inline .input-prepend,
    .form-horizontal .input-prepend,
    .form-search .input-append,
    .form-inline .input-append,
    .form-horizontal .input-append {
        display: inline-block;
        margin-bottom: 0;
        vertical-align: middle;
    }

    .form-search .hide,
    .form-inline .hide,
    .form-horizontal .hide {
        display: none;
    }

    .form-search label,
    .form-inline label,
    .form-search .btn-group,
    .form-inline .btn-group {
        display: inline-block;
    }

    .form-search .input-append,
    .form-inline .input-append,
    .form-search .input-prepend,
    .form-inline .input-prepend {
        margin-bottom: 0;
    }

    .form-search .radio,
    .form-search .checkbox,
    .form-inline .radio,
    .form-inline .checkbox {
        padding-left: 0;
        margin-bottom: 0;
        vertical-align: middle;
    }

    .form-search .radio input[type="radio"],
    .form-search .checkbox input[type="checkbox"],
    .form-inline .radio input[type="radio"],
    .form-inline .checkbox input[type="checkbox"] {
        float: left;
        margin-right: 3px;
        margin-left: 0;
    }

    .control-group {
        margin-bottom: 10px;
    }

    legend + .control-group {
        margin-top: 20px;
        -webkit-margin-top-collapse: separate;
    }

    .form-horizontal .control-group {
        margin-bottom: 20px;
    }

    .form-horizontal .control-group:before,
    .form-horizontal .control-group:after {
        display: table;
        line-height: 0;
        content: "";
    }

    .form-horizontal .control-group:after {
        clear: both;
    }

    .form-horizontal .control-label {
        float: left;
        width: 160px;
        padding-top: 5px;
        text-align: right;
    }

    .form-horizontal .controls {
        margin-left: 180px;
    }

    .form-horizontal .help-block {
        margin-bottom: 0;
    }

    .form-horizontal input + .help-block,
    .form-horizontal select + .help-block,
    .form-horizontal textarea + .help-block,
    .form-horizontal .uneditable-input + .help-block,
    .form-horizontal .input-prepend + .help-block,
    .form-horizontal .input-append + .help-block {
        margin-top: 10px;
    }

    .form-horizontal .form-actions {
        padding-left: 180px;
    }

    .form-row div[contenteditable="true"] {
        white-space: nowrap;
        overflow: hidden;
    }
}
