.wrapper {
  position: relative;
}

.inputWrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--field-height);
  padding: 0 var(--field-padding-x);
  background-color: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.inputWrapOpen,
.inputWrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb) / 0.12);
}

.inputWrapDisabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.searchIcon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.input {
  flex: 1;
  min-width: 0;
  padding: var(--field-padding-y) 0;
  font-size: var(--field-font-size);
  font-family: var(--font-ui);
  line-height: 1.4;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
}

.input::placeholder {
  font-family: var(--font-ui);
  color: var(--text-muted);
  opacity: 1;
}

.input:disabled {
  cursor: not-allowed;
}

.clearBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.clearBtn:hover {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
}

.chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.chevronOpen {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--elevated-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow);
  z-index: 20;
  list-style: none;
  padding: 6px;
  margin: 0;
}

.option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  font-size: var(--field-font-size);
  font-family: var(--font-ui);
  text-align: start;
  color: var(--text-primary);
  border-radius: 8px;
  transition: background 0.15s;
}

.option:hover {
  background: rgba(var(--primary-rgb) / 0.08);
}

.optionSelected {
  background: rgba(var(--primary-rgb) / 0.12);
  color: var(--primary);
  font-weight: 500;
}

.noResults {
  padding: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
