/* 
  QrDrive - AutoComplete.js Custom Styling
  Matches the premium dark/glassmorphism aesthetic.
*/

.autoComplete_wrapper {
  display: flex;
  flex: 1;
  position: relative;
  width: 100%;
}

.autoComplete_wrapper > input {
  width: 100%;
}

.autoComplete_list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  padding: 0.5rem;
  background: var(--color-surface-2, #181818);
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  list-style: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInDropdown 0.2s ease-out;
  /* Scrollbar styles */
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

@keyframes fadeInDropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.autoComplete_list::-webkit-scrollbar {
  width: 6px;
}

.autoComplete_list::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: 10px;
}

.autoComplete_result {
  padding: 0.7rem 1rem;
  margin-bottom: 2px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary, #a0a0a0);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.autoComplete_result:last-child {
  margin-bottom: 0;
}

/* Highlight the matching part (autoComplete.js adds <mark> tag) */
.autoComplete_result mark {
  background: transparent;
  color: var(--color-primary, #e85d04);
  font-weight: 800;
}

/* Hover and active states */
.autoComplete_result:hover,
.autoComplete_result[aria-selected="true"] {
  background: var(--color-surface-3, #222);
  color: var(--color-text, #fff);
}

/* Icons for car results */
.autoComplete_result::before {
  content: 'directions_car';
  font-family: 'Material Icons Round';
  font-size: 16px;
  color: var(--color-text-muted, #707070);
  transition: color 0.15s;
}

.autoComplete_result:hover::before,
.autoComplete_result[aria-selected="true"]::before {
  color: var(--color-primary, #e85d04);
}

/* Empty state */
.autoComplete_no_result {
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted, #707070);
}
