:host {
  display: inline-block;
  position: relative;
  --hb-select-font-size: 14px;
  --hb-select-height: 32px;
  --hb-select-border-color: var(--hb-border-color, #dcdfe6);
  --hb-select-border-color-hover: var(--hb-color-primary);
  --hb-select-bg-color: var(--hb-color-white, #ffffff);
  --hb-select-text-color: var(--hb-color-text-regular, #606266);
  --hb-select-placeholder-color: var(--hb-color-text-placeholder, #c0c4cc);
}

.hb-select {
  display: inline-block;
  position: relative;
  width: 240px;
}

.hb-select__input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  cursor: pointer;
}

.hb-select__input {
  display: inline-block;
  width: 100%;
  height: var(--hb-select-height);
  line-height: var(--hb-select-height);
  padding: 0 30px 0 15px;
  font-size: var(--hb-select-font-size);
  color: var(--hb-select-text-color);
  background-color: var(--hb-select-bg-color);
  border: 1px solid var(--hb-select-border-color);
  border-radius: 4px;
  box-sizing: border-box;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.hb-select__input::placeholder {
  color: var(--hb-select-placeholder-color);
}

.hb-select__input:hover:not(:disabled) {
  border-color: var(--hb-select-border-color-hover);
}

.hb-select__input:focus {
  border-color: var(--hb-select-border-color-hover);
}

.hb-select__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 30px 0 5px;
  min-height: var(--hb-select-height);
  border: 1px solid var(--hb-select-border-color);
  border-radius: 4px;
  background-color: var(--hb-select-bg-color);
}

.hb-select__tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  margin: 2px 0 2px 6px;
  background-color: var(--hb-fill-color-light, #f0f2f5);
  border: 1px solid var(--hb-border-color-lighter, #e4e7ed);
  border-radius: 4px;
  font-size: 12px;
  color: var(--hb-color-text-regular, #606266);
}

.hb-select__tag-text {
  margin-right: 4px;
}

.hb-select__tag-close {
  cursor: pointer;
  font-size: 14px;
  color: var(--hb-color-text-placeholder, #c0c4cc);
  transition: color 0.2s;
}

.hb-select__tag-close:hover {
  color: var(--hb-color-text-regular, #606266);
}

.hb-select__suffix {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  color: var(--hb-select-text-color);
}

.hb-select__clear {
  margin-right: 8px;
  cursor: pointer;
  font-size: 16px;
  color: var(--hb-select-placeholder-color);
  transition: color 0.2s;
}

.hb-select__clear:hover {
  color: var(--hb-select-text-color);
}

.hb-select__arrow {
  font-size: 12px;
  transition: transform 0.3s;
}

.hb-select--open .hb-select__arrow {
  transform: rotate(180deg);
}

.hb-select__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background-color: var(--hb-select-bg-color);
  border: 1px solid var(--hb-select-border-color);
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

.hb-select__menu {
  margin: 0;
  padding: 6px 0;
  list-style: none;
}

.hb-select__menu-item {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  font-size: var(--hb-select-font-size);
  color: var(--hb-select-text-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.hb-select__menu-item:hover:not(.hb-select__menu-item--disabled):not(.hb-select__menu-item--divided) {
  background-color: var(--hb-fill-color-light, #f5f7fa);
}

.hb-select__menu-item--selected {
  color: var(--hb-color-primary);
  font-weight: 600;
}

.hb-select__menu-item--disabled {
  color: var(--hb-color-text-disabled, #c0c4cc);
  cursor: not-allowed;
}

.hb-select__menu-item--divided {
  border-top: 1px solid var(--hb-border-color-lighter, #e4e7ed);
  margin-top: 6px;
  padding-top: 6px;
}

.hb-select__menu-item--empty {
  color: var(--hb-select-placeholder-color);
  cursor: default;
}

.hb-select__menu-item-checkbox {
  margin-right: 8px;
  width: 14px;
  text-align: center;
}

.hb-select__menu-item-label {
  flex: 1;
}

.hb-select--small {
  font-size: 12px;
}

.hb-select--small .hb-select__input {
  height: 24px;
  line-height: 24px;
  font-size: 12px;
  padding: 0 25px 0 12px;
}

.hb-select--large {
  font-size: 16px;
}

.hb-select--large .hb-select__input {
  height: 40px;
  line-height: 40px;
  font-size: 16px;
  padding: 0 35px 0 18px;
}

.hb-select--disabled {
  cursor: not-allowed;
}

.hb-select--disabled .hb-select__input {
  background-color: var(--hb-fill-color-light, #f5f7fa);
  border-color: var(--hb-select-border-color);
  color: var(--hb-color-text-disabled, #c0c4cc);
  cursor: not-allowed;
}

