// Styles for the search bar and results list.

.twitter-typeahead {
  display: block !important;
  position: relative;

  &::before {
    content: '\f16c';
    display: block;
    position: absolute;
    top: 0.4rem;
    left: 0.9rem;
    z-index: 1;
    font-family: 'foundation-icons';
    font-size: 1.75rem;
    color: $primary-color;
  }
}

.tt-input,
.tt-hint {
  right: 0;
  padding-left: 3rem;
  margin-bottom: 0.5rem;
  box-shadow: none;
  border-width: 1px 0;
  font-size: 1.3rem;
  height: 3.5rem;
  font-weight: 300;

  &:hover {
    box-shadow: none;
  }

  &:focus {
    border-width: 1px 0;
  }
}

.tt-menu {
  background: white;
  width: 100%;
  border: 1px solid #ccc;
}

.tt-suggestion {
  @include clearfix;
  padding: 0.5rem;

  &:hover,
  &.tt-cursor {
    background: $primary-color;
    color: #fff;
    cursor: pointer;

    .meta {
      color: #fff;
    }
  }

  .name {
    font-weight: bold;
  }

  .meta {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: $dark-gray;
    margin-left: 0.5rem;
  }

  .desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  @include breakpoint(medium) {
    padding: 1rem;

    .name {
      float: left;
      width: 40%;
    }

    .desc {
      float: left;
      width: 60%;
    }
  }
}

.tt-empty {
  padding: 1rem;

  &:before {
    content: ':(';
    font-weight: bold;
    font-size: 2rem;
    color: #999;
    margin-left: 1rem;
    margin-right: 2rem;
  }
}
