.search-container {
      position: relative;
      width: 100%; /* Match filter container width */
    }

    #search-input {
      width: 100%;
      padding: 8px;
      box-sizing: border-box;
    }

    /* Global highlighted class - kept for backward compatibility */
    .highlighted {
      background: #d0d0ff;
    }

    /* Highlighting for search term matches in badges */
    .search-highlight {
      font-weight: 900;
      text-shadow: 0 0 1px rgba(0,0,0,0.3);
      text-decoration: underline;
      text-decoration-thickness: 2px;
    }

    /* General styles for the suggestion list */
#suggestion-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 400px; /* Fixed wider width instead of 100% */
  min-width: 100%; /* Ensure it's at least as wide as the input */
  margin-top: 4px;
  padding: 0;
  list-style-type: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 400px; /* Increased from 200px to 400px */
  overflow-y: auto;
  z-index: 1000;
  
  /* Custom scrollbar for better UX */
  scrollbar-width: thin;
  scrollbar-color: #ccc #f0f0f0;
}

/* Webkit scrollbar styling */
#suggestion-list::-webkit-scrollbar {
  width: 8px;
}

#suggestion-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

#suggestion-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  transition: background 0.2s;
}

#suggestion-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  #suggestion-list {
    width: 300px; /* Smaller width on mobile but still wider than input */
    max-height: 300px; /* Slightly smaller on mobile */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }
  
  .suggestion-item {
    padding: 8px; /* More padding for touch targets */
  }
}

/* For very small screens */
@media (max-width: 480px) {
  #suggestion-list {
    width: 250px; /* Even smaller on very small screens */
    left: -50px; /* Offset to center better on small screens */
  }
}

/* Ensure suggestion list doesn't overflow viewport */
@media (max-height: 600px) {
  #suggestion-list {
    max-height: 250px;
  }
}

/* Handle potential right edge overflow */
@media (max-width: 450px) {
  #suggestion-list {
    left: 0;
    right: 10px;
    width: auto; /* Let it fit within viewport */
  }
}

/* Styles for individual suggestion items */
.suggestion-item {
  padding: 6px 8px; /* Slightly reduced padding for more compact look */
  border-bottom: 1px solid #eee; /* Light separator between suggestions */
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative; /* allow absolute row icon */
}

/* Hover effect for suggestions */
.suggestion-item:hover {
  background-color: #f8f9fa; /* Slightly lighter hover color */
}

/* Active/highlighted suggestion - more specific selector */
#suggestion-list .suggestion-item.highlighted {
  background-color: #e3f2fd !important;
  border-left: 3px solid #2196f3;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

/* Focus state for accessibility */
#suggestion-list .suggestion-item:focus {
  outline: 2px solid #2196f3;
  outline-offset: -2px;
}

/* Grouping content inside each suggestion */
.suggestion-content {
  display: flex; /* Align chips in a row */
  flex-wrap: wrap; /* Allow chips to wrap if they overflow */
  gap: 6px; /* Add spacing between chips */
}

/* Base styles for chips */
.suggestion-chip {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s, opacity 0.2s;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
}
.suggestion-chip:hover {
  opacity: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Icon for selecting entire row */
.select-all-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.select-all-icon:hover {
  opacity: 1;
}

/* Icon inside each suggestion chip */
.suggestion-chip .chip-icon {
  margin-left: 4px;
  font-size: 0.9em;
}
.suggestion-chip .chip-icon:hover {
  color: #000;
}

/* Chip styles */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background-color: #eee;
  border-radius: 16px;
  font-size: 0.9em;
  font-weight: bold;
  gap: 6px;
}

/* Chip text */
.chip span {
  margin-right: 4px;
  color: #333;
}

.chip-brandname {
  background-color: #F58B8D; 
  color: #fff !important;
}

/* Search name chip */
.chip-search_name {
  background-color: #BCBA90; 
  color: #fff !important;
}

/* Distillery chip */
.chip-distillery {
  background-color: #65C18C; 
  color: #fff !important;
}

/* Age chip */
.chip-age {
  background-color: #A56f5A; 
  color: #fff !important;
}

/* Bottled year chip */
.chip-bottled_year {
  background-color: #783E1B; 
  color: #fff !important;
}

/* Distilled year chip */
.chip-distilled_year {
  background-color: #B99471; 
  color: #fff !important;
}

/* Bottler chip */
.chip-bottler_label {
  background-color: #7997AB; /* Dark Blue */
  color: #fff !important;
}

/* Series chip */
.chip-series {
  background-color: #858A7E; /* Grayish Green */
  color: #fff !important;
}

/* Content quantity chip */
.chip-content_quantity {
  background-color: #f0ded3; /* Light Beige */
  color: #fff !important;
}

/* Alcohol strength chip */
.chip-alcohol_strength {
  background-color: #d32f2f; /* Dark Red */
  color: #fff !important;
}

/* Leftover chip */
.chip-leftover {
  background-color: #9e9e9e; /* Gray */
}

/* Add extra space for the last item */
.suggestion-item:last-child {
  border-bottom: none;
}

/* Container for the chip-based input */
.chip-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  gap: 4px;
  background-color: #fff;
  box-sizing: border-box;
  width: 100%;
  min-height: 36px; /* Ensure consistent height */
}

/* The input inside the chip container */
.chip-input-container input {
  border: none;
  outline: none;
  flex-grow: 1;
  padding: 2px 4px;
  font-size: 0.9em;
  min-width: 50px;
}



/* Remove icon for the chip */
.chip .chip-remove {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: #ff6f61;
  border-radius: 50%;
  color: #fff;
  font-size: 0.8em;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
}

/* Visual indicator styles */
.suggestion-chip {
  cursor: pointer;
  transition: box-shadow 0.2s, opacity 0.2s;
  opacity: 0.9;
}
.suggestion-chip:hover {
  opacity: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.suggestion-hint {
  padding: 4px 8px;
  font-style: italic;
  font-size: 0.85em;
  color: #666;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  cursor: default;
  font-weight: 500;
}