// Inputs
form {
  margin-bottom: 3.5rem;

  h2 {
    margin-top: 3.4rem;
    margin-bottom: 2.3rem;
  }
}

.form-group {
  margin-bottom: 1.4rem;

  .form-control,
  .select-custom {
    margin-bottom: 0;
  }

  .form-control + .form-control {
    margin-top: 1rem;
  }
}

.form-group-sm {
  max-width: 480px;
  margin-bottom: .9rem;
}

.form-control {
  max-width: 480px;
  height: 4.8rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1.5rem;
  transition: all .3s;
  border: 1px solid #e6e6e6;
  border-radius: $border-radius;
  background-color: #fff;
  color: $body-text;
  font-family: $font-family;
  font-size: $input-font-size;
  font-weight: 400;
  line-height: 1.5;

  &:focus {
    border-color: $secondary-color;
    background-color: #fff;
    color: $body-text;
    box-shadow: none;
  }
}

.form-control-sm {
  height: 4.5rem;
  padding: 1.2rem 1.5rem;
  font-size: 1.3rem;
}

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

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

.main .form-control::-webkit-input-placeholder {
  color: $body-text;
}

.main .form-control::-moz-placeholder {
  color: $body-text;
}

.main .form-control:-ms-input-placeholder {
  color: $body-text;
}

.main .form-control::-ms-input-placeholder {
  color: $body-text;
}

.main .form-control::placeholder {
  color: $body-text;
}

textarea.form-control {
  max-width: 680px;
  min-height: 176px;
}

.form-footer {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 3.5rem;
  font-size: $input-font-size;
  vertical-align: middle;

  .form-footer-right {
    margin-right: 0;
    margin-left: auto;

    .btn {
      margin: 0;
    }
  }

  .btn {
    margin-right: 3rem;
  }
}

.forget-pass {
  line-height: 1.3;
}

label {
  margin: 0 0 .6rem;
  color: darken($body-text, 5%);
  font-size: 1.4rem;
  font-weight: 400;
}

.required-field > label::after {
  margin: 0 0 0 .45rem;
  color: #e02b27;
  font-size: 1.2rem;
  content: '*';
}

.required {
  color: #e02b27;
  font-size: 1.2rem;

  + .form-footer {
    margin-top: .8rem;
  }
}

.select-custom {
  position: relative;
  margin-bottom: 1rem;

  select {
    -webkit-appearance: none;
    appearance: none;
  }

  &::after {
    display: inline-block;
    position: absolute;
    top: 50%;
    right: 1.9rem;
    -webkit-transform: translateY(-51%);
    transform: translateY(-51%);
    color: #34373f;
    font-family: 'porto';
    font-size: 1.5rem;
    content: '\e81c';
  }

  .form-control,
  .form-control-sm {
    padding-right: 4rem;
  }
}

.form-group-custom-control {
  margin-top: 2rem;

  .custom-control {
    margin-top: 0;
    margin-bottom: 2rem;
  }

  + .form-group-custom-control {
    margin-top: -.5rem;
  }

  .custom-control-label {
    font-family: $font-family;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: initial;
  }
}

.custom-control-label {
  position: static;
  margin-top: .1rem;
  margin-bottom: 0;
  font-size: 1.4rem;

  &::before,
  &::after {
    top: .4rem;
    left: 0;
    width: 2rem;
    height: 2rem;
  }

  &::before {
    border: 1px solid #e6e6e6;
    background-color: #fff;
  }
}

.custom-checkbox .custom-control-label::before {
  border-radius: 0;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  border-color: $primary-color;
  background-color: $primary-color;
  color: $secondary-color;
}

.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
  background-color: $primary-color;
}

.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before {
  background-color: rgba($primary-color, .5);
}

.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before {
  background-color: rgba($primary-color, .5);
}

.form-input {
  padding: 1rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 2px;
}

.form-wide {
  width: 100%;
}

@include mq('md') {
  form,
  .form-footer {
    margin-bottom: 4rem;
  }

  form {
    h2 {
      margin-top: 4.4rem;
    }
  }
}

@include mq('lg') {
  form,
  .form-footer {
    margin-bottom: 5rem;
  }
}
