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

.searchable-select-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.searchable-select-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    background-color: white;
}

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

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

.searchable-select-icon {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    pointer-events: none;
    font-size: 1.25rem;
}

.searchable-select-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.searchable-select-clear:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.searchable-select-clear i {
    font-size: 1rem;
}

.searchable-select-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

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

.searchable-select-options {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar personalizado */
.searchable-select-options::-webkit-scrollbar {
    width: 8px;
}

.searchable-select-options::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.searchable-select-options::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

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

.searchable-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid #f3f4f6;
}

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

.searchable-select-option:hover,
.searchable-select-option.highlighted {
    background-color: #eff6ff;
    color: #1e40af;
}

.searchable-select-option.selected {
    background-color: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.searchable-select-option.selected::after {
    content: '✓';
    float: right;
    color: #3b82f6;
    font-weight: bold;
}

.searchable-select-option mark {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.searchable-select-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .searchable-select-dropdown {
        max-height: 200px;
    }
    
    .searchable-select-options {
        max-height: 200px;
    }
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    .searchable-select-input {
        background-color: #1f2937;
        border-color: #374151;
        color: #f3f4f6;
    }
    
    .searchable-select-dropdown {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .searchable-select-option {
        color: #f3f4f6;
        border-bottom-color: #374151;
    }
    
    .searchable-select-option:hover,
    .searchable-select-option.highlighted {
        background-color: #374151;
        color: #60a5fa;
    }
    
    .searchable-select-option.selected {
        background-color: #1e3a8a;
        color: #60a5fa;
    }
}
