/* PRH YTJ - Autocomplete Styles */

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

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #f5f5f5;
}

.autocomplete-item strong {
    color: #0066cc;
    font-weight: 600;
}

.autocomplete-item small {
    display: block;
    color: #666;
    font-size: 0.875rem;
    margin-top: 2px;
}

/* Loading state */
.autocomplete-loading {
    padding: 10px 12px;
    text-align: center;
    color: #999;
    font-size: 0.875rem;
}

.autocomplete-loading:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* Empty state */
.autocomplete-empty {
    padding: 10px 12px;
    text-align: center;
    color: #999;
    font-size: 0.875rem;
}

/* Focus state for input */
.autocomplete-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Scrollbar styling */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 4px 0;
}

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 200px;
        font-size: 14px;
    }
    
    .autocomplete-item {
        padding: 8px 10px;
    }
}

/* Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

