/**
 * SearchableSelect Modern Component Styles
 * Biochemistry Academy - Modern Design System
 */

/* Results Dropdown Container */
.searchable-select-results {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 999999 !important;
    font-family: inherit;
    box-sizing: border-box;
    animation: searchableSelectFadeIn 0.15s ease-out;
    direction: rtl;
    text-align: right;
}

@keyframes searchableSelectFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results List */
.searchable-select-list {
    padding: 6px;
    margin: 0;
}

/* Custom Scrollbar for Results */
.searchable-select-results::-webkit-scrollbar {
    width: 6px;
}

.searchable-select-results::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}

.searchable-select-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.searchable-select-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Select Item */
.searchable-select-item {
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.searchable-select-item:last-child {
    border-bottom: none;
}

.searchable-select-item strong {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.searchable-select-item small {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.searchable-select-item:hover,
.searchable-select-item.active {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.searchable-select-item:hover strong,
.searchable-select-item.active strong {
    color: #2563eb;
}

.searchable-select-item:hover small,
.searchable-select-item.active small {
    color: #3b82f6;
}

/* Search Term Highlight */
.searchable-select-item mark {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0 3px;
    border-radius: 3px;
    font-weight: bold;
}

/* No Results State */
.searchable-select-no-results {
    padding: 18px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.searchable-select-no-results i {
    font-size: 15px;
    color: #cbd5e1;
}

/* Selected Badge */
.searchable-select-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    animation: searchableSelectFadeIn 0.2s ease-out;
}

.searchable-select-badge .selected-primary {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
}

.searchable-select-badge .selected-secondary {
    font-size: 12px;
    color: #64748b;
}

.searchable-select-badge .clear-selection {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 6px;
    line-height: 1.4;
    transition: all 0.15s ease;
}

.searchable-select-badge .clear-selection:hover {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* Utility to hide input when selected */
.hidden {
    display: none !important;
}