#swiftype-modal {
  display: none;
  background-color: #fefefe;
  left: 50%;
  top: 90px;
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 1000;
  border-radius: $border-radius-base;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  padding: 10px;
  font-size: 1rem;

  @media (max-width: map-get($breakpoints, medium)) {
    width: 100%;
  }

  @media not (max-width: map-get($breakpoints, medium)) {
    width: 60%;
  }

  &-content {
    display: flex;
    align-items: center;
    font-size: 1rem;
    flex-direction: row;

    #swiftype-search-form-modal {
      flex: 1;
      flex-shrink: 1;
    }

    #swiftype-search-close {

      flex: 0;
      position: relative;
      top: -15px;

      &-button {
        display: inline;
        vertical-align: text-top;
        font-size: 1.5rem;
        margin: 0 .5rem 0 .75rem;
        margin-bottom: auto;
      }
    }

    .input-group {
      margin: 1rem;
      min-width: 10px;
    }

    input {
      border: 1px solid $border-dark;
    }

    #swiftype-search-form-modal-input{
      border-right: none;
      padding: 2px;
    }

    #swiftype-search-form-modal-input-clear {
      background: none;
      border-left: none;
      padding: 0 10px;
      margin-right: 5px;
    }

  }
}

#swiftype-lower-container {
  overflow-y: hidden;
  padding-bottom: 10px;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;

  #swiftype-content-container{
    margin: 0 1rem 1rem 0;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;

    #swiftype-container-left-sidebar {
      padding-top: 1rem;
      flex-grow: 0;

      #swiftype-filters-heading{
        border-bottom: 1px solid $border-dark;
        padding: 10px 0;
      }

      #swiftype-filters-title {
        font-size: 1.2rem;
        font-weight: 700;
      }

      #swiftype-clear-all-filters {
        margin-top: 10px;
      }

      #swiftype-product-filters{
        border-bottom: 1px solid $border-dark;
        padding: 20px 0;

        select {
          width: 100%;
          max-width: 120px;
          border: 1px solid $border-dark;
          height: 2rem;
          border-radius: $border-radius-base;
        }
      }

      #search-facet-product {
        font-size: 1.2rem;
        font-weight: 600;
      }

      #swiftype-version-filters {
        border-bottom: 1px solid $border-dark;
        padding: 20px 0;
        display: none;

        .swiftype-product-versions {
          display: none;
        }
      }

      .search-facet-versions {
        display: none;
        margin: 0 0 1rem 1.5rem;
      }
    }

    #swiftype-results-container{
      display: flex;
      flex-direction: column;
      overflow-y: hidden;
      height: 100%;
      flex-grow: 1;
      padding-top: 16px;

      #swiftype-results-heading {
        flex-grow: 0;
        font-size: 1.5rem;
        font-weight: 600;
      }
      #swiftype-search-results {
        overflow-y: scroll;
        flex-direction: column;
        padding-right: 10px;
        width: 100%;
        flex: 1 1 auto;
        margin: 0;

        li {
          padding: 10px 0;
          border-bottom: 1px solid $border-dark;
          a {
            padding: .5rem 0;

            display: block;
            text-decoration: none;
            width: 100%;
            >span {
              display: inherit;
              overflow: hidden;

              &.st-result-detail-body, &.st-result-sections {
                @media (max-width: map-get($breakpoints, medium)) {
                  display: none;
                }
              }

              &.st-result-title {
                font-size: 1.25rem;
                font-weight: 500;
                line-height: 1.2;
              }
              &.detail {
                color: $charcoal;
                padding: 2px 0;

                em {
                  font-weight: 500;

                }
              }
              &.st-result-highlight-product{
                display: none;
              }
            }
          }
        }

        >.st-page {

          >a {
            position: relative;
            border-bottom: none;
            width: auto;
            margin-top: 5px;
            padding: 5px 0;
            font-size: 1rem;
            &.st-prev {
              float: left;
            }
            &.st-next {
              float: right;
            }
          }
        }
        > div.st-spelling-suggestion {
          > a {
            display: inline;
            border-bottom: none;
          }
        }
      }
    }
  }
}

///////
// Swiftype Search
///////

#swiftype-search {
  &-top-container {
    &-input {
      width: 80%;
    }
    &-form {
      border-radius: $border-radius-base;
      outline: none;

      &-input {
        padding: 10px;
        font-size: 1rem;
        width: 90%;
        border: 1px solid $border-dark;
        border-right: none;
        height: 2.5rem;

        &-clear {

          font-size: 1rem;
          padding: 10px;
          border-left: none;
          border-right: 1px solid $border-dark;
          border-top: 1px solid $border-dark;
          border-bottom: 1px solid $border-dark;

          margin-right: 10px;
          background-color: $white;

          &:hover {
            color: $white;
            background-color: $body-font-color;
          }

        }
      }
    }
  }
  #swiftype-lower-container {
    #swiftype-custom-facets{
      .swiftype-custom-facet-content {
        @media (max-width: map-get($breakpoints, mediumlarge)) {
          display: none;
        }
      }
    }
  }
}
