/* ============================================
   AUTOCOMPLETE TEXTINPUT STYLES
   ============================================ */

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: -1px;
}

.suggestion-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f1f3f5;
}

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

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #e9ecef;
}

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

.suggestion-count {
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Scroll personalizado para dropdown */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f8f9fa;
}

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

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 200px;
    }
    
    .suggestion-item {
        padding: 0.625rem 0.75rem;
    }
}
