﻿.select-input {
  display: inline-block;
  border: none;
  max-width: 37.5rem;
  border-bottom: 1px solid transparent;
  .select-input__select__wrapper {
    display: flex;
    position: relative;
    .select-input__select {
      color: $input-text-color;
      display: inline-block;
      outline: 0;
      border: none;
      width: 100%;
      max-height: 100px;
      appearance: none;
      padding: 7px 10px 5px 5px;
      background-color: transparent;
    }
    span.select-input__select {
      min-height: calc(1rem + 13px);
    }
    .select-input__placeholder {
      position: absolute;
      left: 5px;
      top: 5px;
      color: $input-label-color;
      font-size: 18px;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
  }
  &.input__base.multiple {
    select:focus ~ label,
    .filled ~ label {
      bottom: 4px;
      top: initial;
      font-size: 18px;
    }
    select.filled:focus ~ label {
      color: $primary-color !important;
    }
    .filled ~ label {
      color: $input-label-color !important;
    }
    // When placeholder is present, keep label floating
    select:focus ~ label.label--focused,
    select ~ label.label--focused {
      top: -1rem;
      bottom: initial;
      font-size: 14px;
      color: $primary-color;
    }
  }
  &:not(.readonly) {
    border-bottom: 1px solid $input-border-color;
    .select-input__select__wrapper {
      &::after {
        position: absolute;
        bottom: 15px;
        right: 10px;
        /* Styling the down arrow */
        width: 0;
        height: 0;
        padding: 0;
        content: '';
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 6px solid $input-text-color;
        pointer-events: none;
      }
    }
  }
  .select-input__selectedValue {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px 5px 5px;
  }
  .select-input__selectedValue__wrapper {
    display: flex;
    flex-wrap: wrap;
  }
}
