.dropdown {
  $root: &;
  position: relative;

  &__toggler {
    appearance: none;
    background: $color-white;
    color: $color-graphite-black;
    cursor: pointer;
    display: block;
    outline: none;
    position: relative;
    text-align: left;
    vertical-align: top;
    padding: 0;
    margin: 0;
  }

  &__content {
    background-color: $color-white;
    color: $color-graphite-black;
    border: $border;
    display: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, .25);
    @include zindex(ui-top);
    @include at-least($bp-small) {
      position: absolute;
      margin-top: 10px;
      min-width: 100%;
      border-radius: $radius-button;
      transform: translateY(-10px);
      transition: opacity 50ms ease-out, transform 100ms ease-out;
    }
    @include until($bp-medium) {
      max-width: none;
      min-width: none;
      width: 100%;
      height: 0;
    }

    .is-open & {
      display: block;
    }
  }

  &__list {
    backface-visibility: hidden;
    font-size: 13px;
    line-height: 1.4;

    li {
      border-top: 1px solid $color-smoke-grey;
      text-align: left;

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

    a {
      outline: none;
      padding: $small-spacing-unit;
      position: relative;
      display: flex;
      align-items: center;
      color: $color-graphite-black;

      &:before {
        content: " ";
        position: absolute;
        left: 0;
        top: 0;
        width: 0;
        height: 100%;
        background-color: $color-telenor-blue;
        transition: width 0.15s ease-in-out;
      }

      &:hover {
        background-color: $color-paper-white;
        text-decoration: none;

        &:before {
          width: 3px;
        }
      }

      .media__icon {
        flex: 1;
        width: 25px;
        max-width: 25px;
      }

      .media__body {
        flex: 1;
        width: auto;
        max-width: 100%;
      }
    }
  }
  // .fade-enter-active,
  .fade-leave-active {
    transition: opacity 0.5s;
  }
  // .fade-enter,
  .fade-leave-to {
    opacity: 0;
  }

  &__select {
    position: relative;
    padding-right: $base-button-size + 10;
    line-height: $base-button-size + 1px;
    border: $border-form-input-focus;
    border-color: $color-smoke-grey;
    border-radius: $radius-button;
    padding: 0 10px;
    height: $base-button-size;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    &--small {
      @extend %text-size--13;
      height: $small-button-size;
      line-height: $small-button-size;
      padding-right: $small-button-size + 10;

      .dropdown__select-button:after {
        padding: 0 7px;
        line-height: $large-spacing-unit;
      }
    }

    &--disabled {
      cursor: not-allowed;
      background: #f5f5f5;
      border-color: #e8e8e8;
      .dropdown__select .dropdown__select-button {
        background: $color-paper-white;
        border-color: $color-smoke-grey;

        &:after {
          background: none;
          background-color: $color-paper-white;
          border-left-color: $color-smoke-grey;
          color: $color-steel-grey;
        }
      }
    }
  }

  &__select-button:after {
    @extend %icon-base-styles;
    @include icon-arrow-down;
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    border-left: $border-form-input;
    background-color: $color-paper-white;
    @include gradient-vertical($start-color: #fff, $end-color: #e8e8e8);
    color: $color-stone-grey;
    transition: $transition-form-all;
    font-size: 10px;
    line-height: inherit;
    width: $small-button-size;
    box-sizing: border-box;
    text-align: center;
  }

  &__placeholder {
    position: absolute;
    top: 50%;
    left: 0;
    right: $base-button-size;
    color: $color-steel-grey;
    line-height: 20px;
    height: 20px;
    max-width: 100%;
    margin-top: -10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 10px;
  }

  &__select--multiple {
    width: 100%;
    height: auto;
    line-height: normal;
    padding: 2px;
  }

  &__select-capsule {
    height: 100%;
    min-height: $base-button-size;
    width: 100%;
    & > li {
      display: inline-block;
      overflow: hidden;
      float: left;
      margin: 2px;
      padding: 2px;
      background-color: $color-silver-grey;
      border-radius: 3px;
      & > span {
        height:40px;
        min-width: 50px;
        max-width: 100px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      & > i {
        font-size: 11px;
        position: relative;
        top: -2px;
      }
    }
  }
}
