.autocomplete-content{
    overflow-x: hidden !important;
}

.chipsInput{
    min-width: 60%;
}

.chip{
    background-color: #a7a6a6 !important;
}

/* Navbar search: size the field (Figma-like) */
.chips.search {
  margin: 0 auto !important;
  align-self: center;
  box-sizing: border-box;
  isolation: isolate;

  width: 502px;
  height: 41px !important;
  min-height: 41px !important;
  padding: 0 14px !important;
  display: flex;
  align-items: center;
  border-radius: 20px;
  border: 1px solid #000 !important;     /* force true 1px */
  box-shadow: none !important;
  outline: none !important;
  background: #E2A24C !important;        /* TODO: replace with exact button orange if needed */
}

.chips.search input.input {
  width: 100% !important;
  height: 100%;
  line-height: 41px;
  margin: 0;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0;
  background: transparent !important;
}

/* Navbar search: remove Materialize input-field underline (prevents "double border") */
.chips.search.input-field::before,
.chips.search.input-field::after {
  display: none !important;
  content: none !important;
}

.chips.search:focus-within {
  background: #E5E5E5 !important;        /* selected state */
}

/* Also make sure input itself never draws an extra line */
.chips.search input.input:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Navbar search: dropdown appearance (Figma-like) */
.chips.search .autocomplete-content.dropdown-content {
  background: rgba(229, 229, 229, 0.75) !important; /* translucent */
  border: 1px solid #000 !important;
  border-radius: 20px !important;
  border-color: #111 !important;
  box-shadow: none !important;

  padding: 8px 0; /* space inside the container */
}

/* Each suggestion row */
.chips.search .autocomplete-content.dropdown-content li {
  min-height: 0 !important;
  padding: 8px 16px !important;
}

/* Remove Materialize hover background block */
.chips.search .autocomplete-content.dropdown-content li:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* Keep highlight readable (optional, small) */
.chips.search .autocomplete-content .highlight {
  font-weight: 700;
}

/* Hide dropdown container when there are no suggestions */
.chips.search .autocomplete-content.dropdown-content:empty {
  display: none !important;
}

/* Navbar search: dropdown under pill, same width, flat top */
.chips.search {
  position: relative;
  z-index: 2 !important; /* pill above */
}

.chips.search .autocomplete-content.dropdown-content {
  top: calc(100% + 12px) !important;   /* pulls dropdown up slightly */
  left: 0 !important;
  width: 100% !important;

  border-radius: 20px !important;
  padding-top: 18px; /* visually starts below pill */
}

/* Navbar search: chip layout (text + close icon) */
.chips.search .chip {
  height: 29px;
  line-height: 29px;
  display: inline-flex;
  align-items: center;

  flex: 0 0 auto;        /* don’t shrink chips */
  min-width: 0;          /* allow ellipsis to work */

  padding: 0 10px 0 12px; /* leave room for the close icon */
  gap: 8px;

  border-radius: 16px;
  margin: 0 8px 0 0;

  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  background-color: rgba(0, 0, 0, 0.18) !important;
}

/* Make the X visible and clickable */
.chips.search .chip i.close.material-icons {
  position: relative !important;
  transform: translateX(-4px);
  right: auto !important;
  top: auto !important;
  float: none !important;

  display: inline-block !important;
  margin: 0 !important;
  margin-left: -12px !important;

  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 18px;

  opacity: 0.9;
  cursor: pointer;
}

.chips.search .chip:hover .close.material-icons {
  opacity: 1;
}

/* Navbar Tagify tokens: translucent, fully rounded pills. */
.chips.search.chips--tagify .tagify__tag {
  --tag-bg: rgba(255, 255, 255, 0.62);
  --tag-hover: rgba(255, 255, 255, 0.72);
  --tag-text-color: #000;
  --tag-remove-btn-color: #000;
  border-radius: 999px !important;
}

.chips.search.chips--tagify .tagify__tag > div,
.chips.search.chips--tagify .tagify__tag > div::before {
  border-radius: 999px !important;
}

/* Tagify appends the search suggestions dynamically. Keep this panel scoped
   with the custom class configured in navbar.js so add-story tags are unchanged. */
.chips.search.chips--tagify > .tagify__dropdown.searchSuggestions {
  --tagify-dd-color-primary: #000;
  position: absolute !important;
  top: calc(100% + 11px) !important;
  left: -1px !important;
  width: 502px !important;
  min-width: 502px !important;
  max-width: 502px !important;
  color: #000;
  font-family: var(--panel-font-family);
  font-size: 16px;
  line-height: normal;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  z-index: 10;
}

.chips.search .tagify__dropdown.searchSuggestions .tagify__dropdown__wrapper {
  box-sizing: border-box;
  width: 100%;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0;
  background: rgba(229, 229, 229, 0.62);
  border: 1px solid #000 !important;
  border-top-color: #000 !important;
  border-radius: 20px;
  outline: 0 !important;
  box-shadow: none !important;
}

.chips.search .tagify__dropdown.searchSuggestions .tagify__dropdown__item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 43px;
  max-height: none;
  margin: 0;
  padding: 0 16px;
  color: #000;
  background: transparent;
  border-radius: 0;
}

.chips.search .tagify__dropdown.searchSuggestions .tagify__dropdown__item--active,
.chips.search .tagify__dropdown.searchSuggestions .tagify__dropdown__item:hover {
  color: #000;
  background: rgba(0, 0, 0, 0.06);
}

.chips.search .tagify__dropdown.searchSuggestions .tagify__dropdown__item strong {
  font-weight: 400;
}
