/* breakpoints */

.container {
  max-width: 1251px;
}

.search {
  font-family: Open Sans;
}

.search__search-box {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-top: 3rem;
  margin-bottom: 0;
  padding-left: 0;
}

@media only screen and (min-width: 992px) {
  .search__search-box {
    margin-top: 5rem;
    padding-right: 0;
    margin-left: 0;
  }
}

.search__search-box--sitewide {
  margin-bottom: 4rem;
  margin-top: 0;
}

.search__search-box input {
  font-family: Open Sans;
  font-size: 1.6rem;
  border-width: 0;
  width: 100%;
  padding-left: 5rem;
  border-bottom: 1px solid #ced4da;
  height: 6.5rem;
}

.search__search-box input:focus {
  outline: 1px solid #4d90fe !important;
}

.search__search-box:before {
  font-family: FontAwesome;
  font-size: 1.875rem;
  cursor: pointer;
  position: absolute;
  content: '\f002';
  left: 2rem;
  z-index: 999;
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .search__search-box:before {
    /* IE10+ CSS styles go here */
    top: 2.6rem;
  }
}

.search__filter-toggle-btn {
  border-style: none;
  border-radius: 0.25rem;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.8);;
  position: relative;
  border-radius: 0.48rem;
  padding: 2.25rem;
  background: rgba(0, 0, 0, 0.2);
}

.search__filter-toggle-btn .icon-filter:before {
  font-family: FontAwesome;
  font-size: 2.25rem;
  cursor: pointer;
  font-style: normal;
  content: '\f1de';
}

@media only screen and (min-width: 992px) {
  .search__filter-toggle-btn .icon-filter:before {
    margin-right: 2rem;
  }
}

.search__filter-toggle-btn:hover {
  background-color: e2e2e2;
  border-color: dcdbdb;
}

.search__filter-toggle-btn.active {
  --text-opacity: 1;
  color: #fff;
  color: rgba(255, 255, 255, var(--text-opacity));
  --bg-opacity: 1;
  background-color: #004987;
  background-color: rgba(0, 73, 135, var(--bg-opacity));
  box-shadow: 0 0 0 0.2rem rgba(245, 245, 245, 0.5);
}

.search__filter-toggle-btn.active:before {
  position: absolute;
  margin: 0;
  right: -webkit-calc(50%);
  right: calc(50%);
  border-left: 1.3rem solid transparent;
  content: '';
  bottom: -1.3rem;
  border-top: 1.3rem solid #51626f;
  width: 2rem;
}

.search__filter-toggle-btn.active:after {
  position: absolute;
  margin: 0;
  right: -webkit-calc(50% - 13px);
  right: calc(50% - 13px);
  border-right: 1.3rem solid transparent;
  content: '';
  bottom: -1.3rem;
  border-top: 1.3rem solid #51626f;
}

.search__filter-toggle-btn span {
  font-family: Open Sans;
  font-size: 2rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  font-weight: 700;
}

.search-suggestions {
  position: relative;
  width: 100%;
}

.search-suggestions__container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-suggestions__item {
  padding: 10px 15px;
  cursor: pointer;
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #eee;
}

.search-suggestions__item:last-child {
  border-bottom: none;
}

.search-suggestions__item:hover {
  background-color: #f5f5f5;
}

/* Scrollbar styling for webkit browsers */

.search-suggestions__container::-webkit-scrollbar {
  width: 8px;
}

.search-suggestions__container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 4px 4px 0;
}

.search-suggestions__container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.search-suggestions__container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Ensure the suggestions container doesn't go below other elements */

.search-suggestions__container {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Mobile optimizations */

@media (max-width: 768px) {
  .search-suggestions__container {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    max-height: 50vh;
    border: none;
    border-top: 1px solid #ddd;
    border-radius: 0;
  }

  .search-suggestions__item {
    padding: 12px 15px;
    font-size: 16px;
  }
}
