/****************
Search
******************/
.searchbox-wrap {
  margin: 0;
  border-radius: 999px;
  border: 2px solid #ff7a00 !important;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.searchbox-wrap:focus-within {
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2) !important;
}

/* Hide the Select2-generated closed-state UI — we use the dummy input instead. */
/* Invisible Select2 container behind the pill — it drives the dropdown position.
   Must stay at left:0/width:100% (NOT off-screen) or the dropdown renders off-screen. */
.searchbox-wrap > .select2-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 1;
}

.searchbox-wrap input,
.searchbox-wrap button,
.searchbox-wrap select {
  box-shadow: none !important;
}

.sbuy-search-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.sbuy-search-row input#dummy-searchbox {
  flex: 1 1 auto !important;
  width: auto !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 14px 22px !important;
  font-size: 15px !important;
  color: #333 !important;
  cursor: text;
}

.sbuy-search-row input#dummy-searchbox::placeholder {
  color: #888 !important;
  opacity: 1;
}

.sbuy-search-row .sbuy-search-trigger {
  flex: 0 0 auto;
  width: 56px;
  background: #ff7a00;
  color: #fff;
  border: none;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sbuy-search-row .sbuy-search-trigger:hover,
.sbuy-search-row .sbuy-search-trigger:focus {
  background: #e86c00;
  outline: none;
}

.select2-container--focus,
.select2-container--focus .select2-selection {
  outline: none !important;
}

.select2-container--default .select2-results > .select2-results__options {
  border-top: none !important;
}

.select2-selection__arrow {
  display: none;
}

.select2-selection__rendered {
  box-sizing: border-box;
  padding: 12px 12px 0 !important;
}

.select2-container--open .select2-dropdown.select2-dropdown--below {
  margin-top: 0;
}

.select2-results {
  margin: 0 0 0 0;
  padding: 0 0 0 0;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .05), 0 6px 20px 0 rgba(0, 0, 0, .1);
}

.select2-selection.select2-selection--single {
  border-radius: 0;
  cursor: auto !important;
  background: none !important;
  border: none !important;
  height: auto !important;
}

.select2-results__option.select2-results__message {
  display: none;
}

.select2-container .select2-selection--single {
  height: 36px;
  border: 1px solid rgb(225, 225, 225);
  background: linear-gradient(
                  #fff 20%,
                  #f6f6f6 50%,
                  #eee 52%,
                  #f4f4f4 100%
  );
}

.select2-container--default
.select2-selection--single
.select2-selection__arrow {
  height: 36px;
}

.select2-results__option {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgb(100, 100, 100);
  overflow: auto;
}

.select2-container--default .select2-results__option--selectable {
  font-size: 14px;
  padding: 4px 5px;
  font-weight: 700;
  margin: 0;
}

.select2-container--default
.select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--sb-color-0, $primary-color);
  color: #ffffff;
}

input.select2-search__field {
  border-radius: 0;
}

.select2-search.select2-search--dropdown {
  padding: 12px 12px 12px 12px;
}

.select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
  border: 1px solid rgb(225, 225, 225);
  background: linear-gradient(
                  #fff 20%,
                  #f6f6f6 50%,
                  #eee 52%,
                  #f4f4f4 100%
  );
}

input#dummy-searchbox {
  width: 100% !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 15px !important;
  color: #333 !important;
  padding: 2px 4px !important;
}

input#dummy-searchbox::placeholder {
  color: #888 !important;
  opacity: 1;
}

/* Dropdown search field (Select2) keeps its own prominent box */
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 2px solid #ccc !important;
  border-radius: 4px !important;
  padding: 10px 12px !important;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
  color: #888 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #ff7a00 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2) !important;
}

.select2-container--open .select2-dropdown {
  // border-color: rgb(225, 225, 225);
  border: none;
}

.select2-container--default .select2-results > .select2-results__options {
  border-top: 1px solid var(--sb-color-2, $border-color);
  margin: 0;
  padding-left: 0;
  padding-bottom: 0;
}

.select2-container .selection .select2-selection__rendered:focus-visible,
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single:focus-visible,
.select2-container .select2-selection--single:focus-visible {
  outline: none;
}