.selector
{
  /* the common selector */
}

.wrapper
{
  position: relative;

  display: inline-block;
}

.baseline
{
  font: inherit;

  display: inline-block;
  overflow: visible;

  width: 100%;

  vertical-align: top;
}

.search
{
  font: inherit;

  position: absolute;
  top: 0;
  left: 0;

  display: inline-block;

  box-sizing: border-box;
  width: 100%;
  margin: 0;

  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;

  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.control
{
  composes: control from '../button/button.css';
  composes: normal from '../button/button.css';

  display: block;
  overflow: hidden;

  width: 100%;

  text-align: left;
  text-overflow: ellipsis;
}

.control:after
{
  font: inherit;

  content: '\A0';
}

.arrow
{
  position: absolute;
  top: 0;
  right: 0;

  display: block;

  height: 100%;

  cursor: pointer;
  transition: -webkit-transform .1s ease-out;
  transition: transform .1s ease-out;
  transition: transform .1s ease-out, -webkit-transform .1s ease-out;
  -webkit-transform: rotate(0deg);
          transform: rotate(0deg);
}

.menuItem
{
  font: inherit;

  display: block;
  overflow-x: hidden;

  margin: 0 1px;

  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.emptyItem
{
  composes: menuItem;

  color: rgba(0,0,0,.4);
}

/* states */

.search:focus + .control
{
  border: 1px solid #ffdb4d;
  box-shadow: inset 0 0 0 1px #ffdb4d;
}

.search:disabled + .control
{
  cursor: default;

  color: rgba(0,0,0,.5);
  border: 1px solid #ebebeb;
  background: #ebebeb;
}

.control:disabled ~ .arrow,
.search:disabled ~ .arrow
{
  cursor: default;

  opacity: .4;
}

/* mixin */

.hasPlaceholder
{
  color: rgba(0,0,0,.5);
}

.isClosedMenu
{
  display: none;
}

.isFixedMenu
{
  width: 100%;
}

.isFocusedMenuItem
{
  background-color: #ffeba0;
}

.isOpenedMenu
{
  -webkit-transform: rotate(-180deg);
          transform: rotate(-180deg);
}

.isPseudoFocusedSearch
{
  opacity: 0;
}

.isSelectedMenuItem
{
  background-repeat: no-repeat;
}

.isGroupLabelMenuItem
{
  margin-top: 4px;
  padding-left: 10px;

  border-top: 1px solid rgba(0,0,0,.1);
}

.isDisabledMenuItem
{
  cursor: default;

  color: #999;
}

.isFirstMenuItem
{
  margin-top: 0;

  border-top: none;
}
