/* Searchable Dropdown Styles */
.searchable-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.searchable-dropdown-trigger {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.3s;
}

.searchable-dropdown-trigger:hover {
  border-color: #0056b3;
}

.searchable-dropdown-trigger.active {
  border-color: #0056b3;
}

.dropdown-caret {
  font-size: 12px;
  transition: transform 0.3s;
}

.searchable-dropdown-trigger.active .dropdown-caret {
  transform: rotate(180deg);
}

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

.searchable-dropdown-menu.active {
  display: block;
}

.dropdown-search-input {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 10px;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  box-sizing: border-box;
  font-size: 14px;
  background: white;
  z-index: 10;
}

.dropdown-search-input::placeholder {
  color: #999;
}

.dropdown-search-input:focus {
  outline: none;
  background: #f9f9f9;
}

.dropdown-options {
  max-height: 250px;
  overflow-y: auto;
}

.dropdown-option {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  font-size: 14px;
}

.dropdown-option:hover {
  background-color: #f0f0f0;
}

.dropdown-option.selected {
  background-color: #007bff;
  color: white;
}

.dropdown-option.highlighted {
  background-color: #e8f4f8;
}

.dropdown-option-label {
  font-weight: 500;
  margin-bottom: 2px;
}

.dropdown-option-badge {
  font-size: 12px;
  margin-left: 8px;
  padding: 2px 6px;
  background: #f0f0f0;
  border-radius: 12px;
  color: #666;
}

.dropdown-option.selected .dropdown-option-badge {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.dropdown-no-results {
  padding: 15px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* Scrollbar styling */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Input state for modal forms (candidates.html) */
.modal-form-input {
  width: 100%;
  margin-top: 6px;
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .searchable-dropdown-menu {
    max-height: 250px;
  }

  .dropdown-options {
    max-height: 200px;
  }
}
