/* Center the modal content */
.custom-ajax-search-form {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
  backdrop-filter: blur(8px);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.custom-ajax-search-form.active {
  visibility: visible;
  opacity: 1;
}

/* Style the form container */
#custom-ajax-search-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px;
}

/* Style the input container */
#custom-ajax-search-form > .js-form-item {
  width: 768px;
  max-width: 100%;
  position: relative;
}

/* Style the input field */
#custom-ajax-search-input {
  width: 100%;
  padding: 15px 46px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  box-shadow: none;
}

/* Style the search results container */
#custom-ajax-search-results {

  background: var(--white);
  border-radius: 4px;
  margin-top: 10px;
  padding: 10px;
  display: none; 
  position: absolute;
  top: 48px;
  max-height: 200px;
  overflow: auto;
  width: 100%;
}

/* Show the results container when it has content */
#custom-ajax-search-results:not(:empty) {
  display: block;
}

/* Style individual search result items */
#custom-ajax-search-results > div {
  background-color: var(--white);
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid #f5f5f5;
}

#custom-ajax-search-results > div:last-child {
  border-bottom: none; /* Remove border from the last item */
}

#custom-ajax-search-results > div > a:hover {
  color: var(--color-primary);
}

/* Style the close button */
.search-form-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 36px;
  cursor: pointer;
  color: var(--white);
  /* background: rgba(0, 0, 0, 0.7); */
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
div#custom-ajax-search-wrapper {
  position: relative;
  width: 768px;
  max-width: 100%;
}


/* Style the input field */
#custom-ajax-search-input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  background: url('https://abdfoundation.sprintart.com/themes/abdullah_foundation/images/search-icon.svg') no-repeat 10px center;
  background-size: 20px 20px; /* Adjust size as needed */
  box-sizing: border-box; /* Ensures padding doesn't affect overall width */
  background-color: var(--white);
}

