/*********************************************
 *  Copyright (c) 2016 Ansible, Inc.
 *
 *  Forms.less
 *
 *  custom styles for generated forms
 *
 */

@import "awx/ui/client/src/shared/branding/colors.default.less";

.Form{
    display:flex;
    flex-wrap:wrap;
    flex-direction: row;
}

.Form-header{
    display: flex;
}

.Form-title{
    flex: 1 0 auto;
    text-transform: uppercase;
    color: @list-header-txt;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    padding-bottom: 25px;
    min-height: 45px;
}

.Form-title--is_superuser{
    height:15px;
    color: @btn-txt;
    background-color: @btn-bg;
    border-radius: 5px;
    border: 1px solid @btn-bord;
    font-size: 10px;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: 10px;
    text-transform: uppercase;
    font-weight: 100;
    position: absolute;
    margin-top: 2.25px;
    height: 16px;
}

.Form-exitHolder{
    justify-content: flex-end;
    display:flex;
}

.Form-exit{
    cursor:pointer;
    padding:0px;
    border: none;
    height:20px;
    font-size: 20px;
    background-color:@default-bg;
    color:@default-second-border;
    transition: color 0.2s;
    line-height:1;
}

.Form-exit:hover{
    color:@default-icon;
}

.Form-tabHolder{
    display: flex;
    margin-bottom: 20px;
    min-height: 30px;
}

.Form-tab {
    color: @btn-txt;
    background-color: @btn-bg;
    font-size: 12px;
    border: 1px solid @btn-bord;
    height: 30px;
    border-radius: 5px;
    margin-right: 20px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 5px;
    padding-top: 5px;
    transition: background-color 0.2s;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

.Form-tab:hover {
    color: @btn-txt;
    background-color: @btn-bg-hov;
    cursor: pointer;
}

.Form-tab:active {
    color: @btn-txt-sel;
    background-color: @btn-bg-sel;
    cursor: pointer;
}

.Form-tab:focus {
    color: @btn-txt-sel;
}

.Form-tab.is-selected {
    color: @btn-txt-sel;
    background-color: @btn-bg-sel;
    border-color: @btn-bord-sel;
}

.Form-tab--disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
}

.Form-tab--disabled:hover {
    color: @btn-txt;
    background-color: @btn-bg;
}

.Form-tabSection{
    display: none;
    width: 0%;
}

.Form-tabSection.is-selected{
    width: 100%;
    display: block;
}

.Form-formGroup {
    flex: 1 0 auto;
    margin-bottom: 25px;
    width: 33%;
    padding-right: 50px;
}

.Form-subForm {
    width: 100%;
    border-left: 5px solid @default-border;
    margin-left: -20px;
    padding-left: 15px;
    margin-bottom: 15px;

    .Form-formGroup {
        float: left;
    }
}

.Form-subForm--title {
  font-weight: bold;
  text-transform: uppercase;
  color: @default-interface-txt;
  font-size: small;
  width: 100%;
  float: left;
  margin-bottom: 10px;
}

.Form-textAreaLabel{
    width:100%;
}

.Form-textArea{
    background-color: @field-secondary-bg!important;
    background-color: @field-secondary-bg!important;
    border-radius: 5px;
    color: @field-input-text;
}

.Form-textInput{
    height: 30px!important;
    background-color: @field-secondary-bg!important;
    border-radius: 5px;
    border:1px solid @field-border;
    color: @field-input-text;
}

.Form-textInput:active{
    border:1px solid @field-border-sel;
}

.ui-spinner{
    height: 30px;
    background-color: @field-secondary-bg;
    border-radius: 5px;
    border:1px solid @field-border;
    color: @field-input-text;
}

.ui-spinner-input{
    color: @field-input-text;
    background-color: @field-secondary-bg;
}

.ui-spinner-input:focus{
    outline: none;
}

.ui-spinner-button{
    border-left:1px solid @field-border!important;
    background-color: @field-button-bg !important;
}

.ui-spinner-button:hover{
    background-color:@field-button-hov !important;
    cursor: pointer!important;
}

.Form-inputButton {
    border-color: @default-second-border;
    color: @default-data-txt;
}

.Form-numberInputButton{
    color: @default-icon!important;
    font-size: 14px;

}

.Form-dropDown {
    height: 30px !important;
    background-color: @field-secondary-bg!important;
    border-radius: 5px !important;
    border:1px solid @field-border!important;
    color: @field-input-text!important;
}

.select2-selection__arrow{
    border-left:1px solid @field-border;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
    background-color: @field-button-bg !important;
    width: 30px!important;
    height: 28px!important;
}

.select2-selection__arrow:hover{
    background-color:@field-button-hov !important;
}

.select2-results__option{
    color: @field-label !important;
    height: 30px!important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected]{
    background-color: @field-button-hov !important;
}

.select2-container--default .select2-results__option[aria-selected=true]{
    background-color: @field-border !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b{
    border-color: @field-dropdown-icon transparent transparent transparent !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{
    border-color: transparent transparent @field-dropdown-icon transparent!important;
}

.select2-dropdown{
    border:1px solid @field-border;
}

.Form-dropDown:focus{
    outline: none!important;
}

.Form-dropDown--scmType{
    width: 100%;
}

.Form-passwordButton{
    height: 30px;
    color: @field-lookup-btn-icon!important;
    text-transform: uppercase;
    line-height: 1;
    padding-left: 7px;
    padding-right: 7px;
    background-color: @field-lookup-btn-bg;
    border:1px solid @field-border;
}

.Form-passwordButton:hover {
    cursor: pointer;
    background-color: @field-lookup-btn-hov-bg;
    border: 1px solid @field-border;
    color: @field-lookup-btn-icon;
}

.Form-passwordButton:focus{
    border: 1px solid @field-border;
    background-color: @field-lookup-btn-hov-bg;
}

.Form-passwordButton:active {
    border: 1px solid @field-border;
    background-color: @field-lookup-btn-hov-bg;
}

.Form-lookupButton {
    height: 30px;
    width: 30px;
    color: @field-lookup-btn-icon!important;
    font-size: 16px;
    background-color: @field-lookup-btn-bg;
    display: flex;
    align-items: center;
    justify-content: center;
    border:1px solid @field-border;
}

.Form-lookupButton:hover {
    cursor: pointer;
    background-color: @field-lookup-btn-hov-bg;
    border: 1px solid @field-border;
    color: @field-lookup-btn-icon;
}

.Form-lookupButton:focus {
    border: 1px solid @field-border;
}

.CodeMirror{
    border-radius: 5px;
    font-style: normal;
    color: @field-input-text;
}

.CodeMirror-gutters{
    background-color:@code-mirror-gutter !important;
}

input[type='radio'] {
  -webkit-appearance:none;
  width:14px;
  height:14px;
  border:1px solid @radio-bg;
  border-radius:50%;
  outline:none;
  vertical-align: sub;
}

input[type='radio']:focus {
  outline:none;
}

input[type='radio']:hover {
  box-shadow:0 0 5px 0px @btn-bg-hov inset;
}

input[type='radio']:before {
  content:'';
  display:block;
  width:65%;
  height:60%;
  margin: 20% auto;
  border-radius:50%;
}

input[type='radio']:checked:before {
  background:@radio-bg;
  outline:none;
}

.Form-inputLabel{
    text-transform: uppercase;
    color: @default-interface-txt;
    font-weight: normal;
    font-size: small;
    padding-right:5px;
    width: 100%;
}

.Form-buttons{
    height: 30px;
    display: flex;
    justify-content: flex-end;
}

.Form-button{
    margin-left: 4px;
}

.Form-buttonDefault {
    background-color: @default-bg;
    color: @default-interface-txt;
    border-color: @default-border;
}

.Form-saveButton{
    background-color: @submit-button-bg;
    margin-right: 20px;
    color: @submit-button-text;
    text-transform: uppercase;
    transition: background-color 0.2s;
    padding-left:15px;
    padding-right: 15px;
}

.Form-saveButton:disabled{
    background-color: @submit-button-bg-dis;
}

.Form-saveButton:hover{
    background-color: @submit-button-bg-hov;
    color: @submit-button-text;
}

.Form-cancelButton{
    background-color: @default-bg;
    color: @btn-txt;
    text-transform: uppercase;
    border-radius: 5px;
    border: 1px solid @btn-bord;
    transition: background-color 0.2s;
    padding-left:15px;
    padding-right: 15px;
}

.Form-cancelButton:hover{
    background-color: @btn-bg-hov;
    color: @btn-txt;
}

@media only screen and (max-width: 650px) {
    .Form-formGroup {
        flex: 1 0 auto;
        margin-bottom: 25px;
        width: 100%;
        padding-right: 50px;
    }
}

@media (min-width: 651px) and (max-width: 900px) {
    .Form-formGroup {
        flex: 1 0 auto;
        margin-bottom: 25px;
        width: 50%;
        padding-right: 50px;
    }
}
