/* 
  Styles for integrating the default autocomplete styles into your storefront.
  The provided implementation below targets the standard RefArch storefront.
*/

.cio-autocomplete {
  padding: 0px;
  height: auto;
}


.cio-autocomplete .cio-submit-btn {
  right: 26px;
  top: 0px !important;
  bottom: 0px !important;
}

.cio-autocomplete .cio-clear-btn {
  right: 57px;
  top: 0px !important;
  bottom: 0px !important;
}

.cio-form {
  width: inherit !important;
  display: flex;
}


#cio-autocomplete-0-label {
  margin: 0px
}

.cio-results {
  padding: 20px !important;
  border: rgb(224, 224, 224) solid 1px;
  border-top: none;
}

.cio-section-items {
  column-gap: 15px;
  display: flex;
  flex-wrap: wrap;
}

.cio-autocomplete .products .cio-item .cio-product-image {
  max-width: unset !important;
  max-height: unset !important;
}


/* Only desktop rules */
@media screen and (min-width: 601px) {
  .cio-autocomplete > ul {
    position: absolute;
    background-color: white;
    z-index: 9999;
    list-style: none;
    display: flex;
    min-width: 750px;
    right: 0;
  }

  .cio-section-search-suggestions {
    flex: 1 1 0%;
  }

  .cio-autocomplete .cio-input {
    padding: 6px 40px;
    padding-left: 50px;
    padding-right: 75px;
  }

  .cio-autocomplete .products .cio-item {
    height: inherit !important;
    padding: 5px;
  }

  .cio-autocomplete .cio-item-Products {
    width: calc(33% - 10px) !important;
    flex: none;
  }
}

/* Mobile Rules */
@media screen and (max-width: 600px) {
	.search {
    display: block !important;
  }

  .pull-right {
    display: flex;
    flex-direction: column-reverse;
    align-items: end;
  }
  
  .pull-right .site-search {
    position: absolute;
    z-index: 9999;
    width: 100%;
    left: 0;
    padding: 0 10px;
  }

	.search-mobile .site-search {
    display: none !important;
  }

  .header.container {
    padding-bottom: 50px !important;
  }

  #cio-autocomplete-0-label {
    display: block;
    height: 100%;
    width: 100%;
  }

  .cio-autocomplete {
    height: 40px;
  }

  .cio-results {
    flex-direction: column !important;
  }

  .cio-autocomplete .cio-submit-btn {
    right: 0px;
  }

  .cio-autocomplete .cio-clear-btn {
    right: 33px;
  }

  .cio-autocomplete .products .cio-item {
    width: calc(50% - 10px);
    height: inherit;
    padding: 5px;
  }

  .cio-autocomplete .cio-section-search-suggestions .cio-item {
    align-items: start;
  }
}