// 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 {
  background-color: #fff;
  border: 1px solid #e6e6e6;
  border-radius: $border-radius;
  color: $body-text;
  font-family: $font-family;
  font-size: $input-font-size;
  font-weight: 400;
  height: 4.6rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  max-width: 480px;
  padding: 1.25rem 1.5rem;
  transition: all .3s;

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

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

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

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

.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 {
  color: $body-text;
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 .6rem;
}

.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 {
  position: relative;
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding-left: 3rem;
}

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

  &::before,
  &::after {
    top: 0;
    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 {
  background-color: $secondary-color;
  border-color: $secondary-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;
  }
}
