/* stylelint-disable property-no-vendor-prefix, at-rule-no-vendor-prefix, selector-max-id */
div#ccm-intelligent-search-results {
  background-color: #fff;
  border-bottom: 1px solid;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-color: #ccc;
  border-left: 1px solid;
  border-right: 1px solid;
  display: none;
  padding: 0 0 0 40px;
  position: fixed;
  right: 120px;
  text-align: left;
  top: $ccm-toolbar-height;
  width: 251px;
  z-index: $index-level-intelligent-search;

  span {
    display: none;
  }

  div.ccm-intelligent-search-results-module-offsite {
    display: block;
  }

  div.ccm-intelligent-search-results-module-onsite {
    display: none;
  }

  div.ccm-intelligent-search-results-module {
    margin-top: -1px;
    min-height: 60px;
    padding-bottom: 20px;
    padding-top: 20px;
    position: relative;

    h1 {
      border-bottom: 1px solid #e3e4e4;
      color: #09f;
      font-size: $font-size-sm;
      font-weight: normal;
      line-height: $line-height-sm;
      margin: 0;
      padding: 0;
      text-align: left;
    }

    ul {
      font-size: $font-size-sm;
      margin-bottom: 0 !important;
      margin-left: 0;
      margin-top: 3px !important;
      padding: 0;
    }

    li {
      list-style-type: none;
      margin-left: -15px;
    }

    &.ccm-intelligent-search-results-module-loaded {
      .loader {
        display: none;
      }
    }

    .loader {
      display: block;
      font-size: $font-size-lg;
      height: 1em;
      margin: 20px 0;
      position: relative;
      width: 4em;
    }

    .dot {
      -webkit-animation-duration: 0.5s;
      animation-duration: 0.5s;
      -webkit-animation-iteration-count: infinite;
      animation-iteration-count: infinite;
      -webkit-animation-timing-function: ease;
      animation-timing-function: ease;
      background: #09f;
      border-radius: 0.25em;
      height: 0.4em;
      position: absolute;
      width: 0.4em;
    }

    .dot1,
    .dot2 {
      left: 0;
    }

    .dot3 {
      left: 1.5em;
    }

    .dot4 {
      left: 3em;
    }

    .dot1 {
      -webkit-animation-name: loader-reveal;
      animation-name: loader-reveal;
    }

    .dot2,
    .dot3 {
      -webkit-animation-name: loader-slide;
      animation-name: loader-slide;
    }

    .dot4 {
      animation-direction: reverse; /* thx @HugoGiraudel */
      animation-name: loader-reveal;
    }

  }

  ul#ccm-intelligent-search-results-list-marketplace {
    li {
      a {
        img {
          float: left;
          height: 16px;
          margin-right: 8px;
          margin-top: 1px;
          width: 16px;
        }
      }
    }
  }

  li {
    a {
      border-color: transparent;
      color: #888;
      display: inline-block;
      padding: 1px 15px;
      text-decoration: none;
      white-space: pre-wrap;
    }

    a:hover {
      color: #09f;
      text-decoration: none;
    }

    a.ccm-intelligent-search-result-selected {
      color: #09f;
    }
  }
}

@keyframes loader-reveal {
  from {
    -webkit-transform: scale(0.001);
    transform: scale(0.001);
  }

  to {
    -webkit-transform: scale(1);
  }
}

@keyframes loader-slide {
  to {
    -webkit-transform: translateX(1.5 em);
    transform: translateX(1.5em);
  }
}

@-webkit-keyframes loader-reveal {
  from {
    -webkit-transform: scale(0.001);
    transform: scale(0.001);
  }

  to {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@-webkit-keyframes loader-slide {
  to {
    -webkit-transform: translateX(1.5em);
    transform: translateX(1.5em);
  }
}

@include color-mode(dark) {
  div#ccm-intelligent-search-results {
    background-color: $gray-900;
    border-color: $gray-800;
  }
}
