.cb-wrapper {
  position: relative;
  width: 100%;
}

.cb-wrapper.has-selection .cb-input {
  border-left: 3px solid #28a745;
}

.cb-input {
  width: 100%;
  box-sizing: border-box;
}

/* Input group for search button mode */
.cb-input-group {
  display: flex;
  width: 100%;
}

.cb-input-group .cb-input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.cb-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #007bff;
  color: #fff;
  border: 1px solid #007bff;
  border-left: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.cb-search-btn:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.cb-search-btn:active {
  background: #004494;
}


.cb-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 10000;
  display: none;
  margin-top: 1px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.cb-dropdown.is-open {
  display: block;
  opacity: 1;
}

.cb-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  line-height: 1.4;
  font-size: 14px;
}

.cb-item:last-child {
  border-bottom: none;
}

.cb-item:hover,
.cb-item.is-active {
  background-color: #e6f7ff;
  color: #0056b3;
}

.cb-row-title {
  display: block;
  font-weight: 600;
}

.cb-row-meta {
  display: block;
  font-size: 0.85em;
  color: #777;
  margin-top: 2px;
}

.cb-icon {
  margin-right: 6px;
  opacity: 0.7;
}

.cb-status {
  padding: 12px;
  text-align: center;
  color: #666;
  font-style: italic;
  font-size: 0.9em;
  background: #fafafa;
  cursor: default;
}

.cb-loading {
  color: #007bff;
}

.cb-error {
  color: #dc3545;
  background: #fff8f8;
}

.cb-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 8px;
  padding: 0;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  vertical-align: middle;
  transition: background 0.15s;
}

.cb-retry-btn:hover {
  background: #c82333;
}

.cb-wrapper.is-busy .cb-search-btn {
  pointer-events: none;
}

.cb-wrapper.is-busy .cb-search-btn .fa-search {
  display: none;
}

.cb-wrapper.is-busy .cb-search-btn::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cb-spin 0.6s linear infinite;
}

@keyframes cb-spin {
  to {
    transform: rotate(360deg);
  }
}

.combobox-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.combobox-item-primary {
  font-weight: 600;
  color: #333;
}

.combobox-item-secondary {
  font-size: 0.9em;
  color: #666;
}

.combobox-item-tertiary {
  font-size: 0.85em;
  color: #999;
}
