/* Searchable Select component */
.searchable-select {
  position: relative;
}

.searchable-select input {
  cursor: default;
}

.searchable-select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280; /* gray-500 */
  transition: transform 0.15s ease;
}

.searchable-select.open .searchable-select-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.searchable-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  background: white;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 4px 0;
}

.searchable-select-dropdown.open {
  display: block;
}

.searchable-select-option {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #111827; /* gray-900 */
}

.searchable-select-option.active,
.searchable-select-option:hover {
  background-color: #eff6ff; /* blue-50 */
  color: #1d4ed8; /* blue-700 */
}

.searchable-select-option.selected {
  font-weight: 500;
  color: #2563eb; /* blue-600 */
}

.searchable-select-placeholder {
  color: #6b7280; /* gray-500 */
  font-style: italic;
}

.searchable-select-no-results {
  padding: 8px 16px;
  font-size: 0.875rem;
  color: #6b7280; /* gray-500 */
  font-style: italic;
}

/* Multi Select component (chips / tags) */
.multi-select {
  position: relative;
}

.multi-select-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding-right: 32px; /* room for chevron */
  cursor: text;
}

.multi-select.open .multi-select-control,
.multi-select-control:focus-within {
  outline: none;
  border-color: #3b82f6; /* blue-500 */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.multi-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 1px 4px 1px 8px;
  background: #eff6ff; /* blue-50 */
  color: #1d4ed8; /* blue-700 */
  border: 1px solid #bfdbfe; /* blue-200 */
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1.25rem;
}

.multi-select-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-chip-remove {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #3b82f6; /* blue-500 */
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.multi-select-chip-remove:hover {
  color: #1e3a8a; /* blue-900 */
}

.multi-select-input {
  flex: 1 1 60px;
  min-width: 60px;
  padding: 2px 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  color: #111827; /* gray-900 */
}

.multi-select-input::placeholder {
  color: #6b7280; /* gray-500 */
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.multi-select-check {
  display: inline-flex;
  width: 16px;
  flex: none;
  color: #2563eb; /* blue-600 */
}
