/**
 * Select
 * Custom select styles, taken from textfields in material design
 */

@mixin am-select {
  border: 1px solid am-color(divider);
  border-radius: 2px;
  display: inline-block;
  margin-top: am-unit(1);
}

@mixin am-select-input {
  @include am-font-size(14px);
  background: #fafafa url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve"> <path opacity="0.4" d="M5,8l4,4l4-4H5z"/> </svg>') no-repeat calc(100% - 4px) 50%;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(#fff, 0.8);
  height: am-unit(5) + 2px; // line height + border for Firefox
  line-height: am-unit(5);
  -webkit-appearance: none;
  -moz-appearance: none;

  // These rules are so that opening a select will
  // align as closely to the open options as much as possible
  letter-spacing: 0.01em;
  padding: 0 am-unit(3) 0 10px;
}

@mixin am-select-input-borderless {
  border: 0;
  border-radius: 0;
}

@mixin am-select-input-disabled {
  background-color: #eeeeee;
}

@mixin am-select-unit {
  border-left: 1px solid am-color(divider);
  text-align: center;

  &:first-child {
    border-left: none;
  }
}
