search-popup-padding = 1rem;
search-input-height = 2rem;
search-input-margin = 1rem;
search-assist-height = 2rem;

.search {
  &-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: $z-index2;
    width: 100%;
    height: 100%;
    background-color: alpha(#333, .7);
  }

  &-popup {
    display: none;
    position: fixed;
    top: 10%;
    left: 50%;
    z-index: $z-index2;
    margin-left: -350px;
    border-radius: 5px;
    padding: search-popup-padding;
    width: 700px;
    max-height: 80%;
    font-size: $font-size-base + 2px;
    color: var(--color-gray-700);
    background-color: var(--color-gray-250);
  }

  &-input {
    margin: search-input-margin 0;

    input {
      border: 2px solid alpha($blue-light, .5);
      border-radius: 2rem;
      padding: .2rem .8rem;
      height: search-input-height;
      line-height: search-input-height;
      color: var(--color-gray-950);
      background-color: var(--color-gray-200);
      outline: 0;
      transition: border-color .3s;

      &:hover,
      &:focus {
        border-color: $blue-light;
      }
    }

    input::placeholder {
      color: var(--color-gray-500);
    }
  }

  &-close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 1rem;
    height: 1rem;
    font-size: 1.25em;
    color: var(--color-gray-700);
    cursor: pointer;

    &::before,
    &::after {
      content: '';
      display: block;
      position: absolute;
      top: 50%;
      margin-top: -.1rem;
      width: 1rem;
      height: .2rem;
      background-color: var(--color-gray-700);
    }

    @extend .anime-close;
  }

  &-results {
    overflow: auto;
    max-height: 16rem;

    em {
      font-style: normal;
      background-color: $yellow-light;
    }
  }

  &-btns {
    height: search-assist-height;
    text-align: center;

    &-item {
      margin: 0 5px;
      border-radius: 5px;
      padding: 3px 5px;
      line-height: search-assist-height;
      color: #fff;
      background-color: $blue-lighter;
      cursor: pointer;

      i {
        margin: 0 3px;
      }
    }
  }
}
