@import '../../styles/utils/mixins';
@import '../../styles/utils/variables';

bn-select {
  display: block;
}

.select-wrapper {
  position: relative;
  width: 100%;
  padding: 0 16px;
  background-color: $bn-blue-light4;
  cursor: pointer;
  &::after {
    content: '\E313';
    font: 26px/1em 'Material Icons';
    color: $bn-blue-light3;
    position: absolute;
    right: 8px;
    top: calc(50% + 0.05em);
    transform: translateY(-50%);
    transition: color 0.26s ease;
  }

  &:hover {
    &::after {
      color: $bn-blue-light7;
    }
  }

  &.active {
    z-index: 9991;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);
    &::after {
      content: '\E316';
    }
  }
}

.placeholder, .selected-value {
  font: 12px/40px $open-sans;
}

.placeholder {
  opacity: 0.4;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  width: 100%;
  left: 0;
  background: $bn-blue-light4;
  list-style: none;
  padding: 4px 0;
  box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);

  &__item {
    font: 12px/24px $open-sans;
    padding: 0 16px;
    display: block;
    &:hover {
      background-color: rgba(255,255,255,0.04);
      box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
    }

    & + .dropdown-list__item {
      margin-top: 4px;
    }
  }
}

// Compact style

bn-select.compact {
  .select-wrapper {
    padding: 0 8px;
    padding-right: 24px;
    background-color: $bn-blue3;
    border-radius: 3px;
    &::after {
      color: rgba(255,255,255,0.5);
      font-size: 16px;
      right: 4px;
    }
  }

  .placeholder, .selected-value {
    line-height: 20px;
    color: rgba(255,255,255, 0.5);
  }

  .dropdown-list {
    background-color: $bn-blue3;

    &__item {
      line-height: 20px;
      padding: 0 8px;
      color: rgba(255,255,255,0.5);
    }
  }
}
