/* Form elements */
form {
    display:block;
    margin:20px 0;
}

.form-inline {
  margin:0;
}

.form-horizontal  {
  .control-group {
      margin-bottom:10px;
      display:inline-block;
      width:100%;
  }
}

.control-group .controls p {
  margin-top:5px;
}

input[type="radio"],
input[type="checkbox"]{
  margin-right:10px;
  margin-top: 2px;
}

td .radio.inline,
td .checkbox.inline {
  padding-top: 0;
}

.required > label:after {
    color: #e32;
    content: ' *';
    display:inline;
}

select {
  .gradient(#f5f5f5,#f5f5f5,#fefefe);
   -webkit-box-shadow: none;
    -moz-box-shadow:   none;
    box-shadow:       none;

    &:focus {
      outline:none;
    }
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  border: solid 1px #aaa ;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition: none;
  -moz-transition: none;
  -webkit-transition: none;
}

input[type="file"] {
  height:20px;
  line-height:10px;
  padding-top:5px;
}

.input-append .add-on {
  margin-left: -1px;
  margin-top: 5px;
}


input[type="checkbox"] {
  appearance: none;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  background-color: white;
  border: 1px solid @Gray600;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  padding: 0 !important;
}

input[type="checkbox"]:checked {
  background-color: @BlueLight600;
  border-color: transparent !important;;
}

input[type="checkbox"]::after {
  content: "\F26E";
  font-family: bootstrap-icons;
  display: block;
  color: white;
  position: absolute;
  font-weight: bold;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

input[type="checkbox"]:checked::after {
  opacity: 1;
}

input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0px 0px 0px 4px rgba(39, 75, 167, 0.25);
}

label {
  display: inline;
}

label.checkbox {
  display: block;
}

div.checkbox {
  padding-left: 0;

  label {
    word-break: break-word;
    padding-left: 0;
  }

  input[type="checkbox"] {
    margin-left: 0;
    padding-left: 0;
  }
}



/* search inputs */
/****************/
.form-search {
  button,.btn {
    margin:0 12px;
  }

  // larger height text input element
  .input-large {
    height:36px;
    padding-top:0;
    padding-bottom:0;
  }
}


/* Help text, required and error indicators */
/**************************/

.help-block {
  font-size:14px;
  font-style:italic;
  font-weight:normal;
  color: #a5a5a5;
  margin-top:5px;
  margin-bottom:10px;
  line-height:20px;
}

input[type="text"].microcopy-search {
  margin-bottom:0;
}

.microcopy.help-block {
  font-size:12px;
}

.required > label:after {
  color: #e32;
  content: ' *';
  display: inline;
}

.form-horizontal .help-block,
.form-horizontal input+.help-block,
.form-horizontal select+.help-block {
  margin-top:5px;
  margin-bottom:10px;
}

div.controls {
  position: relative;
  label.error {
    color: @errorText;
    font-size: 11px !important;
    line-height: 14px;
    font-weight: 500;
    margin-top: 4px;
    display: inline-block;
  }
  input.error {
    border-color: @errorText !important;
    color: @errorText;
  }
}

.change-password {
  .control-group {
    margin-bottom: 26px;
    &:last-child {
      margin-bottom: 0;
    }
    div.controls {
      label.error {
        position: absolute;
        top: 30px;
        left: 0;
        padding: 0;

        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 100%;
      }
    }
    label.control-label {
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
    }
  }
  .required > label:after {
    margin-left: 3px;
  }
}

.error span {
    color: @errorText;
}

.help-block.error {
  margin-bottom:0;
}

.inventory-valid .help-block{
  margin-top: -5px;
  margin-bottom: 0;
}

.control-group .controls p.label-description {
  margin-top: 0;
  margin-left: 22px;
}

// MULTI SELECT
***************
.ms-container .ms-selectable, .ms-container .ms-selection {
  margin:0 !important;
  float:right !important;

}

.ms-container .ms-selectable, .selectall {
  width:46% !important;
}

.selectall {
  display:inline-block;
  a {
    float:right;
  }
}

.ms-container .ms-selectable {
  margin-top:-26px;
}

.ms-container .ms-selection {
  width:46% !important;
  margin-top:-26px;
}

.ms-container ul.ms-list {
  width:100% !important;
  margin-top:5px;
  height:140px !important;

  &:focus,:active {
    
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
    border: 1px solid #ccc !important;
  }
}



/* Overwrite Chosenjs styles */
/*****************************/
.chosen-container-single .chosen-default {
  color: #7C7C7C !important;
}

.chosen-container-single {
  a.chosen-single {
    border: 1px solid #E5E5E5 !important;
    background: white;
    box-shadow: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    color: @textColor;
    padding: 8px;
    display: block;
    height: 34px;
  }

  &.chosen-container-active  {
    background: white;
    box-shadow: none;
  }
}

.chosen-container-multi {
  width:auto !important;
  min-width: 200px;
  vertical-align:text-top;
    .search-field input {
        min-width: 100px;
    }
}

.chosen-container.chosen-container-multi .chosen-results {
  max-height:340px;
}

.chosen-container .chosen-drop .chosen-search input[type="text"] {
  width:100% !important;
}



.hint {
    display:none;
}


input[type="text"].date-picker {
  margin-bottom: 5px;
}

.daterangepicker.opensleft {
  .ranges {
    text-align:right;
    
    .range_inputs>div {
      float:right;
    }

    .daterangepicker_start_input,
    .daterangepicker_end_input {
      margin-bottom: 10px;
    }

    .input-mini,
    button {
      margin-left: 10px;
      margin-bottom:0;
    }
  }

}


.checkbox-switch > input[type="checkbox"] {
  display: none;
}

.checkbox-switch > label {
  cursor: pointer;
  height: 0px;
  position: relative;
  width: 40px;
}

.checkbox-switch > label::before {
  width: 36px;
  height: 16px;
  box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
  background: rgb(0, 0, 0);
  border-radius: 8px;
  content: '';
  margin-top: -12px;
  position: absolute;
  opacity: 0.3;
  transition: all 0.4s ease-in-out;
  top: -1px;
}

.checkbox-switch > label::after {
  background: rgb(255, 255, 255);
  border-radius: 16px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
  content: '';
  height: 20px;
  left: -4px;
  margin-top: -10px;
  position: absolute;
  top: -5px;
  transition: all 0.3s ease-in-out;
  width: 20px;
}

.checkbox-switch.blue {
  width: 48px;

  > label {
    display: inline-block;
    &::before {
      width: 48px;
      height: 24px;
      box-shadow: none;
      background: @Gray300;
      border-radius: 14px;
      opacity: 1;
      position: relative;
      margin-top: 6px;
      display: inline-block;
      top: 0;
    }

    &::after {
      color: @Gray300;
      box-shadow: none;
      content: '\f62a';
      font-family: bootstrap-icons;
      text-align: center;
      font-size: 20px;
      left: 2px;
      margin-top: 0;
      top: 8px;
    }
  }

  > input[type="checkbox"]:checked + label {
    &::before {
      background: @Blue500;
      opacity: 1;
    }

    &::after {
      background: white;
      left: 26px;
      color: @Blue500;
      content: '\f26e';
    }
  }
}

@-moz-document url-prefix() {
  .checkbox-switch > label::after, .checkbox-switch > label::before {
    margin-top: 0px;
  }
  .checkbox-switch > label::before {
    top: 1px;
  }
  .checkbox-switch > label::after {
    top: -1px;
  }
}

.checkbox-switch > input[type="checkbox"]:checked + label::before {
  background: @Orange100;
  opacity: 1;
  box-shadow: none;
}

.checkbox-switch > input[type="checkbox"]:checked + label::after {
  background: inherit;
  left: 20px;
}

.checkbox-switch.dark-blue {
  > label::before {
    background: rgb(0, 0, 0);
    opacity: 0.38;
    box-shadow: none;
  }

  > input[type="checkbox"]:checked + label {
    &::before {
      background: @Blue500;
      opacity: 0.5;
    }

    &::after {
      background: @Blue500;
    }
  }

  > input[type="checkbox"]:disabled + label::after {
    background: @Gray300;
  }
}

.editableField {
  padding: 8px 70px 8px 12px;
  border: 1px solid transparent;
  display: inline-block;
  margin-left: -12px;

  &:hover {
    border: 1px solid @Gray200;
    border-radius: 4px;
    position: relative;

    &:after {
      content: "\f4c9"; // bi-pencil-fill;
      font-family: bootstrap-icons;
      text-align: center;
      position: absolute;
      vertical-align: middle;
      font-size: 17px;
      line-height: 50px;
      right: 0;
      top: 0;
      background: @Gray200;
      height: 100%;
      width: 48px;
    }
  }

  &.clicked {
    width: 768px;
    border: 1px solid @Blue600;
    border-radius: 4px;
    padding-right: 10px;
    &:after {
      display: none;
    }
  }

  &-form {
    display: flex;
    align-items: center;
    input {
      width: calc(100% - 90px);
      border: none;
      box-shadow: none;
      flex-grow: 1;
      margin: 0;
      padding: 0;
      font-size: inherit;
      font-weight: inherit;
      color: inherit;
      letter-spacing: inherit;
      font-family: inherit;
      line-height: inherit;
      height: auto;
      &:focus {
        border: none !important;
        box-shadow: none !important;
      }
    }

    button {
      height: 26px;
      width: 26px;
      border: none;
      background: @Gray200;
      margin-left: 6px;
      text-align: center;
      line-height: 26px;
      font-size: 20px;
      padding: 0;
      &:hover {
        i {
          color: inherit;
        }
      }
      i {
        padding: 0;
      }
    }
  }
}


form input[type="radio"] {
  box-shadow: none !important;
  -webkit-appearance: none !important;
  border-radius: 50% !important;
  appearance: none !important;
  padding: 0 !important;
  height: 16px !important;
  width: 16px !important;
  background: #FFF !important;
  border: 1px solid #868686 !important;
  min-height: auto;

  &:focus {
    outline: none;
  }

  &:checked {
    position: relative;
    background-color: @Blue600 !important;
    border-color: transparent !important;
    &::before {
      content: "";
      width: 6px;
      height: 6px;
      background-color: white;
      position: absolute;
      top: 4px;
      left: 4px;
      border-radius: 50% !important;
    }
  }
}
