.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown .select2-container {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  min-height: 36px;
  padding: 2px 6px;
}

.custom-dropdown.has-error .select2-container {
  border: 1px solid red !important;
}

.custom-dropdown .select2-choices {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.custom-dropdown .select2-search-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 5px 3px 8px;
  margin: 3px;
  border-radius: 3px;
  background-color: #e9ecef;
  border: 1px solid #ddd;
}

.custom-dropdown .select2-search-field {
  list-style: none;
  flex-grow: 1;
}

.custom-dropdown .select2-input {
  border: none;
  outline: none;
  padding: 4px;
  width: 100%;
  min-width: 80px;
  font-size: 14px;
}

.custom-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  width: 100%;
}

.custom-dropdown .dropdown-search {
  padding: 8px;
  background-color: #f8f9fa;
  position: sticky;
  z-index: 1;
  border-bottom: 1px solid #eee;
}

.custom-dropdown .dropdown-search-input {
  width: 100%;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.custom-dropdown .dropdown-header {
  padding: 8px 12px;
  font-size: 12px;
  color: #555;
  font-weight: bold;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  margin: 0;
}

.custom-dropdown .dropdown-item {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.custom-dropdown .dropdown-item:hover,
.custom-dropdown .dropdown-item.active {
  background-color: #f5f5f5;
}

.custom-dropdown .dropdown-divider {
  height: 1px;
  margin: 0;
  overflow: hidden;
  background-color: #e9ecef;
}

.custom-dropdown .mac-address {
  color: #666;
  font-size: 13px;
  display: block;
}

.custom-dropdown .select2-search-choice {
  display: flex;
  align-items: center;
  background-color: #e4e4e4;
  border: 1px solid #aaa;
  border-radius: 4px;
  margin: 3px;
  padding: 3px 5px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.custom-dropdown .select2-search-choice div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 15px;
}

.input-with-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-with-dropdown .tag-input-field {
  flex: 1;
  min-width: 0;
}

.input-with-dropdown .select2-container {
  flex: 1;
  min-width: 0;
}