/* Autocomplete styles */

/* Autocomplete results container */
.autocomplete-results {
  background-color: white;
  z-index: 2147483647 !important; /* Maximum possible z-index */
  border-color: rgb(229 231 235);
}

.dark .autocomplete-results {
  background-color: rgb(31 41 55);
  border-color: rgb(75 85 99);
}

/* Autocomplete item text colors */
.autocomplete-item {
  color: rgb(17 24 39);
}

.dark .autocomplete-item {
  color: rgb(243 244 246);
}

.autocomplete-item span:first-child {
  color: rgb(17 24 39);
}

.dark .autocomplete-item span:first-child {
  color: rgb(243 244 246);
}

.autocomplete-item span:last-child {
  color: rgb(107 114 128);
}

.dark .autocomplete-item span:last-child {
  color: rgb(156 163 175);
}

/* Highlight selected item during keyboard navigation */
[role="listbox"] [role="option"][aria-selected="true"] {
  background-color: rgb(239 246 255); /* bg-blue-50 */
}

.dark [role="listbox"] [role="option"][aria-selected="true"] {
  background-color: rgb(55 65 81); /* bg-gray-700 */
}

/* Hover state */
[role="listbox"] [role="option"]:hover {
  background-color: rgb(249 250 251); /* bg-gray-50 */
}

.dark [role="listbox"] [role="option"]:hover {
  background-color: rgb(75 85 99); /* bg-gray-600 */
}

/* Combined hover and selected state */
[role="listbox"] [role="option"][aria-selected="true"]:hover {
  background-color: rgb(219 234 254); /* bg-blue-100 */
}

.dark [role="listbox"] [role="option"][aria-selected="true"]:hover {
  background-color: rgb(55 65 81); /* bg-gray-700 */
}

/* Smooth transitions */
[role="listbox"] [role="option"] {
  transition: background-color 0.15s ease;
}

/* Mark highlighting for search matches */
[role="listbox"] [role="option"] mark {
  background-color: rgb(254 240 138); /* bg-yellow-200 */
  color: inherit;
  font-weight: 600;
  padding: 0;
}

.dark [role="listbox"] [role="option"] mark {
  background-color: rgb(161 98 7); /* bg-yellow-700 */
  color: inherit;
}

