/* Wrapper layout */
.buffersusa-product-search-wrapper{
  max-width: 520px;
  position: relative;
}

/* Make Select2 look like a clean input */
.buffersusa-product-search-wrapper .select2-container{
  width: 100% !important;
}



/* Ensure clear (X) button sits ABOVE Select2 input (avoid being hidden behind) */
.buffersusa-product-search-wrapper .select2-container{
  position: relative;
  z-index: 1;
}
.buffersusa-product-search-wrapper .select2-container--default .select2-selection--single{
  position: relative;
  z-index: 1;
}
.buffersusa-product-search-wrapper .buffersusa-clear-btn{
  z-index: 99999;
}
.buffersusa-product-search-wrapper .select2-container--default .select2-selection--single{
  height: 44px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
    padding-right: 44px; /* space for clear button */
  padding-left: 40px;   /* space for magnifier */
  box-shadow: none;
  outline: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 0px !important;
  font-size: 18px;
  font-family: 'Square721BT', sans-serif;
}
.select2-container--open .select2-dropdown--above,
.select2-search--dropdown {
    display: block;
    padding: 5px 8px;
    border-bottom: 1px solid #e5e7eb;
}
.select2-dropdown {
  border-color:  #e5e7eb !important;
}

.buffersusa-product-search-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height: 44px;
  padding-left: 0;
  color: #111827;
}

.buffersusa-product-search-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder{
  color: #6b7280;
}

.buffersusa-product-search-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow{
  display: none; /* remove dropdown arrow */
}

/* Magnifier icon inside input (left) */
.buffersusa-product-search-wrapper::before{
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.65;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 5;
}


/* Clear (stop searching) button - shown while typing */
.buffersusa-product-search-wrapper .buffersusa-clear-btn{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #0b5bd3;
  cursor: pointer;
  display: none;
  padding: 0;
  z-index: 999 !important;
}

.buffersusa-product-search-wrapper .buffersusa-clear-btn::before{
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.buffersusa-product-search-wrapper.buffersusa-has-term .buffersusa-clear-btn{
  display: block;
  z-index: 9999 !important;
}

/* Dropdown results styling */
.select2-container--default .select2-results__option{
  padding: 5px;
  font-family: 'Square721BT', sans-serif;
  font-size: 18px;
}
