@import 'neat/neat';
@import './mixins/mediaQuery';
@import './mixins/default_display_properties';
$max-width: 1200px;
$grid-columns: 10;
$gutter: 0;
$page-width: 1000px;
.CoveoSearchInterface {
  min-width: 300px;
  > * {
    display: none;
    visibility: hidden;
  }
  &.coveo-waiting-for-query {
    .coveo-search-section {
      display: block;
      visibility: visible;
      margin-top: 20%;
      .CoveoSettings {
        display: none;
      }
    }
  }
  .coveo-search-section {
    max-width: $medium_screen_width + unquote('px');
    margin: 54px auto 47px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    @include smallScreenWidth {
      padding: 20px 10px;
      margin: 0 auto;
      width: 100%;
      max-width: none;
    }
  }
  .coveo-main-section {
    @include outer-container;
    position: relative;
  }
  .coveo-facet-column {
    @include span-columns(3);
    margin-right: 0;
    padding: 13px 10px 5px;
    &.coveo-no-results {
      display: none;
    }
  }
  .coveo-results-column {
    overflow: hidden;
    padding: 10px 10px 10px 15px;
    &.coveo-no-results {
      max-width: 75%;
      margin: auto;
      text-align: center;
    }
    @include mediumScreenWidth() {
      &.coveo-no-results {
        max-width: 100%;
      }
    }
    @include smallScreenWidth() {
      padding: 0;
    }
  }
  &.coveo-during-initialization {
    .coveo-results-header {
      * {
        display: none;
      }
      height: 35px;
    }
    .CoveoLogo,
    .CoveoResultsPerPage {
      display: none;
    }
  }
  .coveo-results-footer {
    &,
    .coveo-results-footer-left,
    .coveo-results-footer-right {
      display: flex;
      align-items: center;
    }
    .coveo-results-footer-left {
      flex-grow: 1;
    }
  }
}

.coveo-after-initialization {
  > * {
    display: inherit;
    visibility: inherit;
  }
  @include default-display-properties;
}

.coveo-results-header {
  @include display(flex);
  @include justify-content(space-between);
  padding-top: 10px;
  min-height: 35px;
  overflow: hidden;
  box-shadow: 0 -1px 0 0 $color-light-grey inset;
  &.coveo-no-results {
    box-shadow: none;
  }
  &.coveo-query-error {
    box-shadow: none;
  }
}

.coveo-summary-section {
  display: inline-block;
  font-size: $font-size-smaller;
  margin-right: auto;
  @include flex(auto);
}

.coveo-result-layout-section {
  @include display(flex);
  @include flex-shrink(0);
  &.coveo-result-layout-hidden {
    display: none;
  }
}

.coveo-sort-section {
  @include display(flex);
  @include flex-shrink(0);
}

.coveo-results-header > *:not(:first-child) {
  padding-right: 10px;
  margin-left: 10px;
  border-right: 1px solid $color-light-grey;
}

.coveo-results-header > *:last-child {
  padding-right: 0;
  border-right: none;
}

@include mediumScreenWidth() {
  .coveo-results-header {
    padding-right: 10px;
  }
}

@include smallScreenWidth() {
  .coveo-results-header {
    padding-left: 10px;
    @include flex-wrap(wrap);
  }
  .coveo-sort-section {
    span:first-child {
      padding-left: 0;
    }
  }
  .coveo-list-layout {
    .CoveoResult {
      margin: 0;
      padding: 15px 10px 15px 15px;
    }
  }
  .CoveoResultList {
    margin-bottom: 15px;
  }
  .coveo-summary-section {
    width: 100%;
    margin-bottom: 10px;
  }
  .coveo-results-header > *:not(:first-child) {
    border-right: none;
    margin-left: 0;
    padding: 0;
  }
  .coveo-results-header > *:last-child {
    margin-left: 0;
    margin-bottom: 0;
  }
}
