.search-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  margin-right: 10px;
}

.searchbar {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  background-color: #eff3fd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.category-dropdown-container {
    position: relative;
    flex-shrink: 0;
}

.category-dropdown-button {
    display: flex;
    align-items: center;
    height: 40px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    padding-left: 1rem;
    padding-right: 0.6rem;
    margin-right: 0.6rem;
    background-color: #397dea;
    border: none;
    border-right: 1px solid #cdcdcd;
    cursor: pointer;
    font-size: 13px;
    color: #ececec;
    font-weight: 700;
    transition: background-color 0.2s;
}

.category-dropdown-button:hover {
    background-color: #1d6ae7;
}
.category-dropdown-button .MuiSvgIcon-root {
    color: #f1f0f0;
}

.category-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #ffffff;
    border: 1px solid #cdcdcd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 0;
    margin-top: 2px;
    z-index: 1001; 
    max-height: 400px;
    overflow-y: auto;
}
.category-dropdown-list li {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}
.category-dropdown-list li:hover {
    background-color: #f0f0f0;
}

.search-input {
  font-size: 14px;
  flex-grow: 1;
  outline: none;
  border: none;
  background: transparent;
  color: #212121;
  padding: 0 10px;
}

.search-input::placeholder {
  color: #878787;
}

.mic-button {
  color: #2874f0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 8px; 
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-button.listening {
  color: #ff4d4d;
  animation: pulse 1.5s infinite;
}

.search-button {
  color: #2874f0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-dropdown {
  position: absolute;
  width: 100%;
  top: calc(100% + 4px);
  left: 0;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  z-index: 1000;
  max-height: 500px;
  overflow-y: auto;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 15px;
  cursor: pointer;
  color: #212121;
  font-size: 14px;
}

.suggestion-item:hover {
  background-color: #f5f5f5;
}

.suggestion-image-container {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggestion-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.suggestion-icon {
  font-size: 24px !important;
  color: #878787;
}

.suggestion-text {
  white-space: normal;
}


.search-history-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  cursor: pointer;
  color: #555;
  font-size: 14px;
}

.search-history-item:hover {
  background-color: #f5f5f5;
}

.history-icon {
  font-size: 20px !important;
  color: #878787;
}

.history-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}