/*********************** Custom css for Boost AI Search & Discovery  ************************/
.boost-sd__g-no-scroll #content {
  z-index: 100;
}

[id*='boost_ai_search_filter_filter_product_list'] {
  .boost-sd-container {
    --boostsd-general-page-width-desktop: 1440px;
  }
  /* Search form */
  .boost-sd__search-form-title {
    font-size: var(--main_h1);
    font-weight: var(--main_fw_h);
    line-height: var(--main_lh_h);
    letter-spacing: var(--main_ls_h);
  }
  .boost-sd__search-form-input[type='search'] {
    border-radius: 4px;
    z-index: unset !important;
  }
  button.boost-sd__button {
    min-height: auto;
    border-radius: 0;
    --boostsd-search-button-icon-fill: var(--primary_text);

    &::before {
      content: none;
    }

    &:hover {
      animation: none;
      color: var(--primary_text);
    }
  }
  .boost-sd__search-form .boost-sd__button[type='reset'] {
    right: 70px !important;
  }
  /* Toolbar */
  .boost-sd__search-result-toolbar-container {
    display: none;
  }
  .boost-sd__toolbar-item--product-count .boost-sd__product-count {
    font-weight: 700;
  }
  button.boost-sd__sorting-button {
    font-weight: 700;
  }
  button.boost-sd__sorting-button,
  button.boost-sd__sorting-option-item {
    border-radius: 0;
    min-height: auto;
    margin-bottom: 0;
    margin-right: 0;
    color: var(--primary_text);

    &::before {
      content: none;
    }

    &:hover {
      animation: none;
      color: var(--primary_text);
    }
  }
  .boost-sd__sorting-list {
    padding-inline: 0;
    box-shadow: 0 2px 2px #0000000f;
    border-radius: 4px;
    border: none;
  }
  .boost-sd__sorting-option-item {
    padding: 14px 16px;

    &::after {
      content: '';
      display: block;
      overflow: hidden;
      position: absolute;
      inset: 0;
      z-index: -1;
      transition: none;
    }
  }
  .boost-sd__sorting-option:hover .boost-sd__sorting-option-item,
  .boost-sd__sorting-option--active .boost-sd__sorting-option-item {
    text-decoration: none;
    color: var(--secondary_bg);

    &::after {
      background-color: var(--custom_input_fg);
      opacity: 0.05;
    }
  }
  /* Mobile Toolbar */
  @media only screen and (max-width: 760px) {
    .boost-sd__toolbar-content {
      border-bottom: 0;
    }
    .boost-sd__toolbar {
      justify-content: flex-start;
    }
    .boost-sd__toolbar-item {
      flex-basis: auto;
      padding-left: 0;
      width: 100%;
      padding-bottom: 10px;
    }
  }
  .boost-sd__toolbar-top-mobile {
    border-top: 0;
    gap: 12px;
    padding-bottom: 16px;
    justify-content: space-between;
  }
  .boost-sd__toolbar-top-mobile .boost-sd__sorting {
    padding: 0;
    border: 0;
    flex: auto;
  }
  .boost-sd__toolbar-top-mobile button.boost-sd__sorting-button {
    font-size: 0;
    width: auto;
    justify-content: start;
    min-width: auto;
    text-align: left;

    @media only screen and (max-width: 760px) {
      border: 1px solid var(--custom_input_bd);
      padding: 8px 16px;
    }
  }
  .boost-sd__toolbar-top-mobile .boost-sd__sorting-value {
    font-size: var(--main_fz);
    padding: 0;
    width: auto;
  }
  button.boost-sd__filter-tree-toggle-button {
    border: 1px solid var(--custom_input_bd);
    background-color: var(--secondary_bg_btn) !important;
    min-height: auto;
    flex-direction: row-reverse;
    justify-content: start;
    gap: 8px;
    font-weight: 700;
    flex: none;
    min-width: auto;
    padding: 6px 16px;

    &::before {
      content: none;
    }

    &:hover {
      animation: none;
    }
    .boost-sd__filter-tree-toggle-button-icon svg path {
      fill: #fff;
    }
    .boost-sd__filter-tree-toggle-button-text {
      color: #fff;
    }
  }
  .boost-sd__filter-tree-toggle-button-icon svg {
    width: 14px;
  }
  /* Filters */
  button.boost-sd__refine-by-vertical-refine-by-item {
    color: var(--primary_text);
    min-height: auto;
    border-radius: 0;

    &::before {
      content: none;
    }

    &:hover {
      animation: none;
      color: var(--primary_text);
    }
  }
  .boost-sd__filter-option-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;

    &::before {
      content: none;
    }

    .boost-sd__filter-option-icon {
      display: block;
      right: 0;

      .boost-sd__filter-option-label--collapsed & {
        transform: rotate(90deg);
      }
    }
  }
  .boost-sd__filter-option-heading {
    font-weight: 700;
  }
  .boost-sd__filter-option-content-inner--scrollbar {
    padding: 0 8px 0 0;
  }
  .boost-sd__filter-option-item {
    margin-bottom: 0;
  }
  button.boost-sd__filter-option-item-button {
    color: var(--primary_text);
    padding-left: 28px;
    margin-bottom: 8px;

    &:hover {
      animation: none;
      color: var(--primary_text);

      &::before {
        border-color: var(--secondary_bg);
        border-width: 1px;
      }
    }

    &::after {
      top: 6.7px;
      left: 4.7px;
      --boostsd-filter-option-item-button-checkmark-color: #fff;
    }

    &::before {
      width: 18px;
      height: 18px;
      border-radius: 4px;
      border-color: var(--custom_input_bd);
      background-color: #fff;
    }

    &.boost-sd__filter-option-item-button--selected::before {
      border-color: var(--secondary_bg);
      background-color: var(--secondary_bg);
    }
  }
  .boost-sd__filter-option-item-label {
    font-weight: 700;
  }
  .boost-sd__filter-option-item-amount {
    padding-right: 0;
  }
  .boost-sd__filter-option-range-slider-input-wrapper {
    border-radius: 4px;
  }
  /* Grid */
  .boost-sd__product-image-wrapper {
    background-color: var(--multiply_bg_product);
    border-radius: 4px;
  }
  .boost-sd__product-image-img {
    mix-blend-mode: multiply;
  }
  .boost-sd__product-image-wrapper--has-second-image:hover .boost-sd__product-image-img--main {
    opacity: 0;
  }
  .boost-sd__product-label {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: var(--sale_label_fz);
    font-weight: var(--main_fw_strong);
    line-height: var(--main_lh_h);
  }
  .boost-sd__product-vendor {
    order: -1;
    font-weight: var(--main_fw);
    font-size: var(--main_fz_small);
    text-transform: none;
    opacity: 0.53;
    color: var(--primary_text_h);
  }
  .boost-sd__product-title,
  .boost-sd__product-price--sale,
  .boost-sd__product-price--default {
    font-weight: 700;
  }
  .boost-sd__product-price {
    order: 1;
  }
  .boost-sd__product-item .boost-sd__inventory-status {
    margin-bottom: 0;
    color: var(--alert_valid);
  }
  .boost-sd__button.boost-sd__button--result {
    background: #005fbe !important;
    color: #ffffff;
  }
}
