/* Toggle visibility for dropdown */
.nav-search-box.show {
    display: block !important;
}

/* Form and input styling */
.nav-search-box form {
    display: block; /* Override d-inline if needed */
}

.nav-search-box .form-control {
    padding: 10px 40px 10px 15px; /* Space for potential close icon */
    border-radius: 6px;
    font-size: 14px;
}

.nav-search-box .form-group {
    margin-bottom: 0;
}

/* Suggestions container */
.search-suggestions {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid #ddd; /* Seamless connection to input */
    margin-top: 2px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    width: 100%;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #e9ecef;
    text-decoration: none;
    color: #333;
}

.suggestion-item img {
    width: 60px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid #ccc;
}

.suggestion-item .d-flex {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

.suggestion-item .fw-semibold {
    color: #1e1e1e;
    /* font-weight: 600; */
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item .text-muted {
    font-size: 12px;
    color: #707070;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* Info text styling */
.nav-search-box .lqd-module-search-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
}

/* Custom scrollbar for suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 8px 8px 0;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .nav-search-box {
        min-width: calc(70vw) !important;
        left: 0;
        right: auto;
        width: 90vw;
    }

    .suggestion-item img {
        width: 50px;
        height: 40px;
    }

    .suggestion-item {
        padding: 8px 10px;
    }

    .suggestion-item img {
        margin-right: 10px;
    }

    .nav-search-box .form-control {
        font-size: 16px; /* Better mobile input */
    }
}