.als-container {
  position: relative;
  min-width: 50vw;
  max-width: 800px;
  margin: 1rem 0;
}

.als-input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.als-input:focus {
  border-width: 2px;
  border-color: #7a53e2 ;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.12);
}

.als-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
}

.als-suggestion-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

.als-suggestion-item:hover,
.als-suggestion-item.active {
  background: #e8f4ff;
}

.als-suggestion-item .chi {
  font-size: 0.92rem;
  color: #555;
  display: block;
  margin-top: 0.2rem;
}

/* add more styles as needed */


.input-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  font-size: 1.2rem;
  pointer-events: none;     /* so clicks go through to input */
  z-index: 1;
}

.als-input {
  flex: 1;
  padding: 0.9rem 2.8rem 0.9rem 2.8rem;   /* left + right padding for icons */
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.05rem;
  box-sizing: border-box;
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  color: #888;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, color 0.2s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.clear-btn:hover {
  color: #333;
  background: rgba(0,0,0,0.08);
}

.clear-btn svg {
  width: 18px;
  height: 18px;
  /* Optional: make it bolder on hover */
  transition: stroke-width 0.15s;
}

.clear-btn:hover svg {
  stroke-width: 3;
}

/* Optional: darker when input is focused */
.als-input:focus ~ .clear-btn {
  color: #555;
}

.als-input:focus + .search-icon,
.als-input:not(:placeholder-shown) + .search-icon {
  color: #7a53e2 ;           /* optional: highlight when typing or focused */
}
.als-suggestion-item.active,
.als-suggestion-item:hover {
  background-color: #e3f2fd;
  /* or any color that stands out well */
  /* optional: */
  /* border-left: 4px solid #7a53e2 ; */
}