.form-control {
  @include border-radius (4px);
  @include box-shadow (none);
  position: relative;
  background-color: $form-background-color;
  color: $form-control;
  padding: 9px 16px 10px 16px;
  border: 1px solid  $form-border-color;
  line-height: 19px;
  &::placeholder {
   color: $form-placeholder-color;
   font-weight: $form-placeholder-weight;
  }
  &:focus {
    @include box-shadow (none);
    background-color: $form-background-color;
    border-color: $form-focus-color;
    color: $form-color-typed-value;
    &::placeholder {
     color: $form-placeholder-focus-color;
    }
  }
  &:hover {
    border-color: $form-focus-color;
  }
  &:disabled {
    border: 1px solid $form-disabled;
    background-color: $form-disabled;
    color: $mo-black;
  }
}
.form-control-sm {
  padding: 5px 16px 6px 16px;
  font-size: 16px;
}
.form-control-label {
  position: relative;
  color: $form-label-color;
  font-size: $form-label-size;
  display: inline-block!important;
  width: 100%;
  font-weight: $form-label-weight;
  margin-bottom: 4px;
  &__focus {
    font-weight: 500;
    color: $form-color-typed-value;
  }
  &__sm {
    font-size: 12px;
  }
}
.form-control-search {
  background-image: url("/images/ib/search_passive.svg");
  background-repeat: no-repeat;
  background-position: 8px 9px;
  background-size: 20px;
  padding-left: 35px;
  &:focus {
    background-image: url("/images/ib/search_active.svg");
    padding-left: 35px;
    background-position: 8px 9px;
    background-size: 20px;
  }
}
.form-control-password {
  background-image: url("/images/ib/eye-visible.svg");
  background-repeat: no-repeat;
  background-position: 98% 7px;
  background-size: 24px;
  &--invisible {
    background-image: url("/images/ib/eye-invisible.svg");
    background-repeat: no-repeat;
    background-position: 98% 7px;
    background-size: 24px;
  }
}
.form-control-lock {
  background-image: url("/images/ib/lock_passive.svg");
  background-repeat: no-repeat;
  background-position: 8px 6px;
  background-size: 24px;
  padding-left: 35px;
  &:focus {
    background-image: url("/images/ib/lock_active.svg");
  }
}
.form-control-date {
  background-image: url("/images/ib/calendar_passive.svg");
  background-repeat: no-repeat;
  background-position: 8px 6px;
  background-size: 24px;
  padding-left: 35px;
  &:focus {
    background-image: url("/images/ib/calendar_active.svg");
  }
}
.form-control-sm.form-control-date {
  background-size: 18px;
}
.form-control-sm.form-control-search {
  background-position: 8px 5px;
}

textarea.form-control {
  border: 1px solid $form-border-color;
  padding: 10px 15px;
}

.form-section {
  margin-bottom: 3rem;
}

select.form-control:not([size]):not([multiple]) {
  height: auto;
}

.custom-control-input:checked ~ .custom-control-indicator {
  background-color: $mo-redvine;
}

.custom-select {
  width: 100%;
}

.nopads {
  padding: 0;
}

.form-group {
  margin-bottom: 15px;
  position: relative;
  &__error {
    .form-control {
      background-color: $form-error-background;
    }
    .form-control,
    .form-control-label,
    .form-text  {
      border-color: $form-error;
      color: $form-error;
      &::placeholder {
       color: $form-error;
      }
      &:focus {
        @include box-shadow (none);
        background-color: $form-error-background;
        border-color: $form-error;
        color: $form-error;
      }
    }
  }
  &__warning {
    .form-control {
      background-color: $form-warning-background;
    }
    .form-control,
    .form-control-label,
    .form-text {
      border-color: $form-warning;
      color: $form-warning;
      &::placeholder {
       color: $form-warning;
      }
      &:focus {
        @include box-shadow (none);
        background-color: $form-warning-background;
        border-color: $form-warning;
        color: $form-warning;
      }
    }
  }
  .notice {
    margin-top: -9px;
  }
}
.form-text {
  font-size: $text-small;
}
.form-control__counter {
  max-width: 60px;
}
// odmazat po dodelani UI
.bg-black {
  background: $mo-black;
}
.required {
  color: $form-label-required;
  font-size: 14px;
  line-height: 16px;
  font-weight: normal;
}
.custom-control-indicator {
  position: absolute;
  top: (($line-height-base - $custom-control-indicator-size) / 2);
  left: 0;
  display: block;
  width: 24px;
  height: 24px;
  pointer-events: none;
  user-select: none;
  background-color: $mo-white;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 80%;
  box-shadow: none;
  border: 1px solid $dropdown-border-color;
}
.custom-control-description {
  padding-left: 15px;
  line-height: 30px;
}
.custom-checkbox {
  .custom-control-indicator {
    @include border-radius(4px);
    background-size: 50%;
  }
  .custom-control-input:checked ~ .custom-control-indicator {
    background-image: $custom-checkbox-indicator-icon-checked;
    background-color: $checkbox-background-color;
    border: 2px solid $checkbox-background-color;
  }
  .custom-control-input:indeterminate ~ .custom-control-indicator {
    background-color: $custom-checkbox-indicator-indeterminate-bg;
    background-image: $custom-checkbox-indicator-icon-indeterminate;
    @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
  }
}
.custom-control-input:checked {
  ~ .custom-control-indicator {
    background-image: $custom-checkbox-indicator-icon-checked;
    background-color: $checkbox-background-color;
    border: 2px solid $checkbox-background-color;
  }
  &:disabled {
    ~ .custom-control-indicator {
      background-color: $mo-disabled;
      border: 2px solid $mo-disabled;
    }
  }
}

.custom-file {
  background-color: #EEF2F5;
  border-radius: 4px;
  position: relative;
  width: 100%;
  border: 1px solid #D0CDDD;
  height: 38px;
  .custom-file-label {
    color: #A3A1A8;
    position: absolute;
    top: 5px;
    left: 40px;
  }
  &:after {
    background: url("/images/ib/upload.svg") no-repeat;
    background-size: 100%;
    position: absolute;
    content: "";
    left: 2px;
    top: 2px;
    height: 27px;
    width: 36px;
  }
}
.input-group-prepend {
  width: 0;
}

.input-group-text__after {
  position: relative;
    width: 24px;
    z-index: 20;
    top: 5px;
}
.input-group-text {
  position: relative;
  width: 24px;
  right: 36px;
  z-index: 20;
  top: 7px;
  .icon {
    max-width: 24px;
    max-height: 24px;
    background-size: 100%;
  }
}

.input-relative {
  position: relative;
  .form-control {
    position: absolute;
    top: 135px;
    left: 250px;
  }
}
.custom-control-description {
    padding-left: 15px;
    line-height: 20px;
    padding-top: 5px;
}
