@import 'variables';

select.form-element {
  display: block;
  width: 100%;
}

.form-group {
  margin-bottom: 1em;
}

.form-group-horizontal {
  display: flex;
  flex-direction: column;
  margin-bottom: 1em;
  align-items: flex-end;

  @media screen and (min-width: $screen-md) {
    flex-direction: row;
  }

  & > .form-group {
    margin: 0.5em 0;

    @media screen and (min-width: $screen-md) {
      margin: 0 0.5em;
      flex: 1;
    }
  }

  & > .actions {
    display: flex;
    align-items: flex-end;
    margin: 4px 0;
  }
}

.form-inline {
  input[type="file"] {
    display: inline-block;
  }
}

.select2 {
  margin: 0.4em 0;
}

.select2-container {
  width: 100% !important;
}

.select2-results__option {
  min-height: 2em;
}

@for $i from 1 through 25 {
  textarea.has-rows[rows="#{$i}"] {
    min-height: (1.2em * $i) + 1.2em;
  }
}

.check-group-horizontal {
  display: flex;
  flex-direction: row;
  align-items: center;

  label {
    padding: 0;
    margin: 0;
  }

  input[type="checkbox"] {
    padding: 0;
    margin: 0 0 0 0.5em;
  }
}

.check-group__right {
  justify-content: flex-end;
}

.checkbox__large {
  zoom: 1.5;
}
