/* Autocomplete Dropdown Styles */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
}

.ui-menu-item {
    border-bottom: 1px solid #f5f5f5;
    margin: 0;
}

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

.ui-menu-item-wrapper {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    border: none;
    width: 100%;
    text-align: left;
}

.ui-menu-item-wrapper:hover,
.ui-menu-item-wrapper.ui-state-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: 4px solid #4e73df;
    transform: translateX(2px);
}

.ui-menu-item-wrapper:hover img,
.ui-menu-item-wrapper.ui-state-active img {
    filter: brightness(0) invert(1);
}

/* SMALLER IMAGES */
.ui-menu-item-wrapper img {
    width: 20px;  /* Reduced from 24px */
    height: 20px; /* Reduced from 24px */
    object-fit: contain;
    margin-right: 10px; /* Reduced from 12px */
    border-radius: 3px; /* Reduced from 4px */
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.autocomplete-item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.autocomplete-main-text {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-sub-text {
    font-size: 11px; /* Slightly smaller */
    color: #666;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ui-menu-item-wrapper:hover .autocomplete-sub-text,
.ui-menu-item-wrapper.ui-state-active .autocomplete-sub-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Scrollbar styling for autocomplete */
.ui-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.ui-autocomplete::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

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

.ui-autocomplete::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Even more compact version for very dense layouts */
.ui-autocomplete.compact .ui-menu-item-wrapper {
    padding: 6px 10px;
}

.ui-autocomplete.compact .ui-menu-item-wrapper img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.ui-autocomplete.compact .autocomplete-main-text {
    font-size: 13px;
}

.ui-autocomplete.compact .autocomplete-sub-text {
    font-size: 10px;
}