/* SearchableSelect Component Styles */
/* Premium SaaS design - matching Notion/Linear aesthetic */

.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 36px;
    padding: 8px 12px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.searchable-select-trigger:hover {
    border-color: #cbd5e1;
}

.searchable-select-trigger.active,
.searchable-select-trigger:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.searchable-select-value {
    flex: 1;
    text-align: left;
    color: var(--color-text-primary);
}

.searchable-select-value:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.searchable-select-arrow {
    font-size: 10px;
    color: #64748b;
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 8px;
}

.searchable-select-trigger.active .searchable-select-arrow {
    transform: rotate(180deg);
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.searchable-select-search {
    padding: 8px;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border);
}

.searchable-select-search-input {
    width: 100%;
    height: 32px;
    padding: 6px 12px;
    border: none;
    background: var(--color-white);
    border-radius: 4px;
    font-size: 14px;
    color: var(--color-text-primary);
    outline: none;
}

.searchable-select-search-input::placeholder {
    color: #94a3b8;
}

.searchable-select-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.searchable-select-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.searchable-select-option {
    height: 36px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--color-text-primary);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 100ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.searchable-select-option:hover,
.searchable-select-option.keyboard-selected {
    background-color: #f1f5f9;
}

.searchable-select-option.selected {
    background-color: #eff6ff;
    color: #1e40af;
    font-weight: 500;
}

.searchable-select-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #64748b;
    font-size: 14px;
    gap: 8px;
}

.searchable-select-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.searchable-select-no-results {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* Error state */
.searchable-select-trigger.error {
    border-color: #ef4444;
}

.searchable-select-trigger.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Disabled state */
.searchable-select-trigger:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Scrollbar styling */
.searchable-select-options::-webkit-scrollbar {
    width: 6px;
}

.searchable-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.searchable-select-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.searchable-select-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
