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

.dropdown-selected {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 42px;
}

.dropdown-selected:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-dropdown.active .dropdown-selected {
    border-color: #3b82f6;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.selected-text {
    color: #111827;
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-selected.placeholder .selected-text {
    color: #9ca3af;
}

.dropdown-selected i.fa-chevron-down {
    color: #3b82f6;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.custom-dropdown.active .dropdown-selected i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #3b82f6;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}

.custom-dropdown.active .dropdown-menu {
    max-height: 320px;
    opacity: 1;
}

/* Search Box */
.dropdown-search {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 1;
}

.dropdown-search i {
    color: #6b7280;
    font-size: 0.875rem;
}

.search-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    outline: none;
    background: white;
    font-size: 0.875rem;
    color: #111827;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Options */
.dropdown-options {
    max-height: 240px;
    overflow-y: auto;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f3f4f6;
}

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

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

.dropdown-option {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #374151;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: #eff6ff;
    color: #1e40af;
}

.dropdown-option.selected {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}

.dropdown-option.focused {
    background: #eff6ff;
    color: #1e40af;
}

.dropdown-option.hidden {
    display: none;
}

.dropdown-option i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* No Results */
.no-results {
    padding: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    display: none;
}

.no-results.show {
    display: block;
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.5;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-dropdown.active .dropdown-option {
    animation: slideDown 0.2s ease forwards;
}

/* Disabled State */
.custom-dropdown.disabled .dropdown-selected {
    background: #f9fafb;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-dropdown.disabled .dropdown-selected:hover {
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Loading State */
.dropdown-loading {
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.dropdown-loading i {
    margin-right: 0.5rem;
}
