.base-dropdown {
  position: relative;
  border-radius: 12px;
  padding: 6px 16px;
  border: 1px solid;
  border-color: #fff;
  display: grid;
  grid-template-columns: 16px 1fr 16px;
  gap: 8px;
  align-items: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: #fff;
}

.base-dropdown:focus-within {
  color: #212b36;
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.base-dropdown:focus-within .base-dropdown__input,
.base-dropdown:focus-within .base-dropdown__input::placeholder {
  color: #212b36;
}

.base-dropdown__input {
  width: 100%;
  background-color: transparent;
  border: unset;
  color: #fff;
  transition: background-color 0.3s ease;
}

.base-dropdown__input::placeholder {
  color: #2F1489;
  transition: color 0.3s ease;
}

.base-dropdown__icon-close {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

.base-dropdown__icon-close.visible {
  opacity: 1;
  visibility: visible;
}

.base-dropdown__list {
  position: absolute;
  width: 100%;
    min-width: 500px;
    
  max-height: 0;
  overflow-y: auto;
  border: none;
  background: white;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  top: calc(100% + 5px);
  left: 50%;
  right: 50%;
  transform: translate(-50%, 0);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #1c1c1e;

}

.base-dropdown__list.base-dropdown__show {
  max-height: calc(80vh - 110px);
  opacity: 1;
  visibility: visible;


}

.base-dropdown__list-item {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #1c1c1e;
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.base-dropdown__list-item:hover {
  background-color: #f5f5f5;
}

.base-dropdown__item-content {
  width: 100%;
}

.base-dropdown__no-results {
  padding: 10px;
  color: #999;
  font-style: italic;
}

.base-dropdown__item-buy {
  padding: 8px;
  border-radius: 100%;
  background-color: #3a19a8;
  color: white;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.base-dropdown__item-buy:hover {
  background-color: #2f1489;
}

/* Модальное окно для мобильных */
.modal-search {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1001;
  padding: 16px;
  box-sizing: border-box;
}

.modal-search.active {
  display: block;
}

.modal-search__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-search__close {
  cursor: pointer;
  font-size: 24px;
}

@media (max-width: 768px) {
  .base-dropdown {
    cursor: pointer;
  }
}
