/* ARUS Header Search Autocomplete Styles */
/* Override default autocomplete styles to match ARUS header design */

/* Override autocomplete library's default input styles to preserve Tailwind design */
#autoComplete {
  /* Explicitly set all sizes to match Tailwind classes */
  position: relative !important;
  /* w-full = width: 100% */
  width: 100% !important;
  /* h-11 = height: 2.75rem (44px) */
  height: 2.75rem !important;
  /* px-4 = padding-left: 1rem, pr-10 = padding-right: 2.5rem */
  padding-left: 1rem !important;
  padding-right: 2.5rem !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  /* text-sm = font-size: 0.875rem */
  font-size: 0.875rem !important;
  /* rounded-md = border-radius: 0.375rem */
  border-radius: 0.375rem !important;
  /* border border-gray-200 = border: 1px solid #e5e7eb */
  border: 1px solid #e5e7eb !important;
  /* bg-gray-50 = background-color: #f9fafb */
  background-color: #f9fafb !important;
  outline: none !important;
  caret-color: inherit !important;
  color: inherit !important;
  transition: all 0.2s ease !important;
  text-overflow: ellipsis !important;
}

#autoComplete:focus {
  /* Match Tailwind focus:border-orange-300 and focus:bg-white */
  border-color: #fdba74 !important;
  background-color: #ffffff !important;
}

#autoComplete::placeholder {
  color: inherit !important;
  opacity: inherit !important;
  transition: inherit !important;
}

#autoComplete:hover::placeholder {
  color: inherit !important;
  transition: inherit !important;
}

#autoComplete:focus::placeholder {
  padding: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
  transition: inherit !important;
}

#autoComplete::selection {
  color: inherit !important;
  background-color: inherit !important;
}

#autoComplete:focus::selection {
  color: inherit !important;
  background-color: inherit !important;
}

/* Autocomplete results list - positioned relative to search container */
#autoComplete_results_list {
  position: absolute !important;
  top: calc(100% + 0.25rem) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-height: 20rem !important;
  overflow-y: auto !important;
  z-index: 1000 !important;
  padding: 0.5rem 0 !important;
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  margin: 0 !important;
}

#autoComplete_results_list.d-none {
  display: none !important;
}

/* Ensure list is visible when not hidden */
#autoComplete_results_list:not(.d-none) {
  display: block !important;
}

/* Autocomplete result items - white background with gray hover */
.autoComplete_result {
  margin: 0 !important;
  padding: 0.75rem 1rem !important;
  max-width: 100% !important;
  border: 0 !important;
  border-bottom: 1px solid #f3f4f6 !important;
  list-style: none !important;
  text-align: left !important;
  font-size: 0.875rem !important;
  transition: all 0.15s ease-in-out !important;
  background-color: #ffffff !important;
  color: #374151 !important;
  cursor: pointer !important;
}

.autoComplete_result:first-child {
  border-top-left-radius: 0.375rem !important;
  border-top-right-radius: 0.375rem !important;
}

.autoComplete_result:last-child {
  border-bottom-left-radius: 0.375rem !important;
  border-bottom-right-radius: 0.375rem !important;
  border-bottom: 0 !important;
}

.autoComplete_result:hover,
.autoComplete_result:focus {
  cursor: pointer !important;
  background-color: #f9fafb !important;
  outline: none !important;
}

.autoComplete_highlighted {
  color: #ea580c !important;
  font-weight: 600 !important;
}

.no_result.autoComplete_result {
  color: #6b7280 !important;
  font-style: italic !important;
  text-align: center !important;
  padding: 1rem !important;
  background-color: #ffffff !important;
}

.no_result.autoComplete_result:hover {
  background-color: #f9fafb !important;
  color: #6b7280 !important;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  #autoComplete_results_list {
    max-height: 16rem !important;
  }
  
  .autoComplete_result {
    padding: 0.625rem 0.875rem !important;
    font-size: 0.8125rem !important;
  }
}


