/* MODX MANAGER SEARCH */

#modx-manager-search {
  padding: 10px 10px 5px;
  height: 38px;
  min-width: 100px;
  background: $searchResultsBg;
  border-radius: $borderRadius $borderRadius 0 0;

  .x-form-text {
    background: none;
  }
}

#modx-manager-search .x-form-field-wrap {
  background-image: none;
  color: #565353;
  font-size: 12px;
  outline: none !important;

  .x-form-text {
    color: $searchResultsColor;
    letter-spacing: 0;
    text-shadow: none;
    font-weight: normal;
  }

  .x-form-empty-field {
    color: #6a747a;
  }

  .x-form-trigger {
    display: none;
  }
}

/* this is an .x-combo-list element with special styles */
.modx-manager-search-results {
  background: $subnavBorder;
  border-radius: 0 0 $borderRadius $borderRadius;
  border: 1px solid $subnavBorder;
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  width: 402px !important;
  height: auto !important;
  box-sizing: border-box;

  .loading-indicator {
    background: none;
    color: $searchResultsColor;
    font-size: 14px;
    margin: 10px 0;
    text-align: center;

    &:before {
      @extend %pseudo-font;
      @extend .#{$fa-css-prefix}-spin;
      content: fa-content($fa-var-spinner);
      margin-right: 5px;
    }
  }

  .x-combo-list-inner {
    background: $searchResultsBg;
    border: 0;
    margin: 0;
    overflow: auto;
    width: 100% !important;

    @include grid-media($desktop) {
      height: auto !important;
      line-height: 4em;

      .section {
        >* {
          padding-top: .5em;
          padding-bottom: .5em;
        }
      }
    }
  }

  .section {
    border-left: 1px solid darken($searchResultsBg, 7%);
    font-size: 12px;
    line-height: 12px;
    margin-left: 100px;
    position: relative;
    width: auto; /* change to 100% to enable scrollable overflow */
  }

  h3,
  .x-combo-list-item {
    color: $searchResultsColor;
    line-height: 18px;
    margin: 0;
    padding: 4px 6px;
  }

  h3 {
    color: $searchResultsHeadingColor;
    font-size: 11px;
    line-height: 11px;
    font-weight: normal;
    left: -108px;
    position: absolute;
    text-align: right;
    top: 0;
    width: 95px;
  }

  a {
    cursor: pointer;
    display: inline-block;
    padding-left: 20px;
    position: relative;
    color: inherit;
    text-decoration: none;
  }

  i {
    color: $colorSplash;
    left: 0;
    position: absolute;
    top: 4px;
  }

  em {
    font-style: normal;
    opacity: .7;
  }

  /* we need the parent selector to override default combobox styles */
  .x-combo-list-item {
    overflow: visible;
    white-space: normal; /* allow wrapping for longer entries */

    a {
      display: block;
    }

    &.x-combo-selected,
    &:hover {
      border: 0;
      background-color: $searchResultsBgHover;
      margin-left: 0;
      z-index: 10;

      h3 {
        left: 0;
      }

      p {
        border-left-color: transparent;
      }

      a {
        color: $searchResultsColor;
      }
    }
  }

  .icon-user {
    background-image: none !important;
  }
}
