/**
 * The geosuggest module
 */
.geosuggest {
  position: relative;
  width: 100%;
  font-size: 16px;
  text-align: left;

  &__input {
    width: 100%;
    padding: 7px 12px 5px;
    border: 2px solid $brand-grey-medium;
    border-radius: 4px;
    -webkit-transition: border 0.2s, box-shadow 0.2s;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: Arial, sans-serif;
  }

  &__input:focus {
    border: 2px solid $brand-tertiary;
    box-shadow: 0 0 0 transparent;
  }

  &__suggests {
    font-family: Arial, sans-serif;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 25em;
    padding: 0;
    padding-top: 5px;
    margin-top: -2px;
    background: #fff;
    border: 2px solid $brand-tertiary;
    border-top: 0px none;
    border-radius: 0px 0px 4px 4px;
    overflow-x: hidden;
    overflow-y: auto;
    list-style: none;
    z-index: 5;
  }

  &__suggests--hidden {
    max-height: 0;
    overflow: hidden;
    border-width: 0;
    visibility: hidden;
  }
}

/**
 * A geosuggest item
 */
.geosuggest-item {
  font-size: 16px;
  padding: 10px 30px 10px 12px;
  cursor: pointer;
  position: relative;

  &--disabled {
    cursor: auto !important;
  }
}

.geosuggest-item--active::after{
  width: 13px;
  height: 13px;
  position: absolute;
  top: 50%;
  right: 13px;
  margin-top: -6.5px;
  background-color: $brand-secondary;
  border-radius:50%;
  content: " "
}

.geosuggest-item--active {
  background-color: #f5f5f5;
}

.geosuggest-item:hover,
.geosuggest-item:focus {
  background: #f5f5f5;
}

.cr-geosuggest-wrapper {
  position: relative;
}

.geosuggest.glyphicon:before {
  position: absolute;
  right: 5px;
  top: 50%;
  margin-top: -9px;
  font-size: 18px;
  color: $brand-grey-medium;
}

.cr-geosuggest-wrapper--active .geosuggest.glyphicon:before {
  color: $brand-primary;
}

.cr-geosuggest-wrapper--dropdown .geosuggest__input {
  border-radius: 4px 4px 0px 0px;
}

@keyframes cruk-brand {
  0%   {background-color: #2E008B;}
  33%  {background-color: #EC008C;}
  66%  {background-color: #00B6ED;}
}

@keyframes cruk-brand2 {
  0%   {background-color: #2E008B;}
  12.5%  {background-color: #EC008C;}
  50%  {background-color: #00B6ED;}
  87.5% {background-color: #2E008B;}
  100% {background-color: #2E008B;}
}

@keyframes cruk-bounce {
  0%   {bottom: 11px;}
  40% {height:13px;}
  50% {bottom:2px;height: 6px;}
  60% {height:13px;}
  100% {bottom: 11px;}
}

.geoSuggestLoader {
  width: 13px;
  height: 13px;
  position: absolute;
  bottom: 2px;
  right: 13px;
  background-color: #2E008B;
  border-radius:50%;
  animation: cruk-bounce 0.75s ease-in-out infinite, cruk-brand2 2.25s step-end infinite;
  transition: opacity 0.2s ease-in;
  opacity: 0;
}

.geoSuggestLoader.activated {
  opacity: 1;
}