/* =============================================
   LIVE-SEARCH / AUTOCOMPLETE - ERWEITERTES STYLING
   ============================================= */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 480px;
    overflow-y: auto;
    display: none;
}

.autocomplete-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    border-top: 1px solid #f0f0f0;
}

.autocomplete-group:first-child {
    border-top: none;
}

.autocomplete-group .icon-xs {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease;
    cursor: pointer;
}

.autocomplete-item:hover,
.autocomplete-item-active {
    background: #f5f8ff;
}

.autocomplete-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

.autocomplete-item-icon .icon-sm {
    width: 18px;
    height: 18px;
}

.autocomplete-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
}

.autocomplete-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.autocomplete-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-text mark {
    background: #fff3cd;
    color: #222;
    padding: 0 1px;
    border-radius: 2px;
}

.autocomplete-subtitle {
    font-size: 0.78rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-arrow {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: #ccc;
    transition: color 0.15s;
}

.autocomplete-item:hover .autocomplete-arrow {
    color: #F5A623;
}

.autocomplete-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: #F5A623;
    font-weight: 600;
    font-size: 0.88rem;
    border-top: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.autocomplete-all:hover {
    background: #fffaf0;
}

.autocomplete-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    color: #999;
    font-size: 0.88rem;
}

/* Scrollbar Styling für Autocomplete */
.autocomplete-results::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: transparent;
}

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

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Responsive */
@media (max-width: 768px) {
    .autocomplete-results {
        max-height: 60vh;
    }
    
    .autocomplete-item {
        padding: 8px 12px;
        gap: 10px;
    }
    
    .autocomplete-item-icon {
        width: 34px;
        height: 34px;
    }
    
    .autocomplete-thumb {
        width: 34px;
        height: 34px;
    }
}
