//
// Awesome Select
// --------------------------------------------------

aw-select {
  position: relative;
  white-space: nowrap;
  display: block;
  margin-bottom: $padding-base-vertical;

  .aw-select-btn {
    font-weight: $input-font-weight;
    font-size: $font-size-small;
    padding-right: $form-select-icon-size + $grid-unit-x * 2 - 1;
    padding-left: $input-padding-base-x;
    font-family: $font-family-proxima;
    display: block;
    width: 100%;
    outline: 0;
    text-align: left;

    @include themes-border(input-border, $width: 1px);
    @include themes(color, input-color);
    @include themes(background-color, input-bg);

    &:after {
      content: "\f078";
      position: absolute;
      right: $form-select-icon-right;
      font-size: $font-size-small;
      height: $form-select-icon-size;
      width: $form-select-icon-size;
      text-align: center;
      top: 50%;
      line-height: $grid-unit-y * 3;
      margin-top: -(ceil($grid-unit-y * 1.5));
      font-family: $font-family-awesome;
      font-weight: $font-family-awesome-weight;

      @include themes(color, form-select-icon-color);
    }

    &.disabled {
      &,
      &:hover,
      &:focus {
        @include themes-border(input-border, $width: 2px);
        @include themes(background-color, input-bg-disabled);
        @include themes(color, input-color-disabled);
      }
    }

    &:hover,
    &:focus {
      border-color: $input-border-focus;

      @include themes(color, input-color);
    }
  }

  .open {
    .aw-select-btn {
      border-color: $brand-primary;

      &:after {
        content: "\f077";
      }
    }

    .dropdown-menu {
      display: block;
    }
  }
}

aw-option abbr {
  display: none;
}

aw-optgroup {
  display: block;
  padding: 2px 2px 0;
  background-color: whitesmoke;

  @include themes-border-top(popover-inner-border-color);
}
aw-optgroup:first-child {
  border-top: none;
}
aw-optgroup > h3,
aw-optgroup > h4,
aw-optgroup > h5,
aw-optgroup > h6 {
  padding-left: 10px;
}
aw-optgroup:hover {
  background-color: whitesmoke;
}
aw-optgroup.selectable {
  cursor: pointer;
}
