/**
 * Bigshopper Autocomplete Styles
 */

.bs-searchbar-new {
    position: relative;
    z-index: 199;
}

.bs-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 10001;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute !important;
    isolation: isolate;
}

.bs-autocomplete-results {
    padding: 4px 0;
}

.bs-autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-left: 3px solid transparent;
}

.bs-autocomplete-item:hover,
.bs-autocomplete-item.selected {
    background-color: #f3f4f6;
    border-left-color: #0f273a;
}

.bs-autocomplete-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-autocomplete-item:hover .bs-autocomplete-icon,
.bs-autocomplete-item.selected .bs-autocomplete-icon {
    color: #0f273a;
}

.bs-autocomplete-content {
    flex: 1;
    min-width: 0;
}

.bs-autocomplete-text {
    font-size: 14px;
    line-height: 20px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bs-autocomplete-text strong {
    font-weight: 700;
    color: #0f273a;
}

.bs-autocomplete-type {
    font-size: 12px;
    line-height: 16px;
    color: #6b7280;
    margin-top: 2px;
}

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

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

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

.bs-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #html-header,
    .container-new.white-searchbar,
    .display-mobile.search-engine-mobile,
    #search-bar,
    .bs-searchbar-new {
        position: relative;
        z-index: 10000 !important;
    }

    .bs-autocomplete-dropdown {
        max-height: 300px;
        font-size: 16px;
        z-index: 10001 !important;
        position: absolute !important;
        will-change: transform;
    }

    #content {
        position: relative;
        z-index: 1;
    }

    .bs-autocomplete-item {
        padding: 14px 16px;
    }
}

/* Animation for dropdown appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bs-autocomplete-dropdown[style*="display: block"] {
    animation: slideDown 0.15s ease-out;
}
