/* selects */

select {
  @mixin input;

  display: block;
  width: 100%;
  height: var(--hiq-input-height);
  padding: var(--hiq-input-padding-vertical) var(--hiq-input-padding-horizontal);

  & option {
    background-color: var(--hiq-select-option-background-color);
  }

  &:not([multiple]) {
    /* if select does not have `multiple` attribute it receives a caret on the right-hand side */
    background-image: var(--hiq-select-background-image);
    background-repeat: no-repeat;
    background-position: var(--hiq-select-background-position);
    background-size: var(--hiq-select-background-size);
  }

  &[multiple] {
    height: auto;
    padding-top: var(--hiq-select-multiple-padding-vertical);
    padding-bottom: var(--hiq-select-multiple-padding-vertical);

    & option {
      padding: .125rem .5rem;

      &:checked {
        background: var(--select-multiple-checked-background-color) -webkit-linear-gradient(bottom, var(--hiq-select-multiple-checked-background-color) 0%, var(--hiq-select-multiple-checked-background-color) 100%);
      }
    }
  }
}

/* grouping of options within `select` element */

optgroup {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
