/* Modern Search Suggestions Dropdown */
.search-suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
    max-height: 500px;
    overflow-x: hidden;
    overflow-y: hidden;
    z-index: 1000;
    display: none;
}

.search-suggestions-container.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-suggestions-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-suggestions-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-suggestions-count {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.search-suggestions-category {
    padding: 8px 0;
}

.search-suggestions-category:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
}

/* Category Items Container - Grid Layout for Large Screens */
.search-category-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    width: 100%;
}

/* Two columns on large screens */
@media (min-width: 1200px) {
    .search-category-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .search-suggestion-item {
        border-right: 1px solid #f5f5f5;
    }
    
    .search-suggestion-item:nth-child(2n) {
        border-right: none;
    }
    
    /* Add bottom border for all except last row */
    .search-suggestion-item:not(:nth-last-child(-n+2)) {
        border-bottom: 1px solid #f5f5f5;
    }
}

/* Single column on medium screens */
@media (max-width: 1199px) {
    .search-suggestion-item:not(:last-child) {
        border-bottom: 1px solid #f5f5f5;
    }
}

.search-category-title {
    padding: 12px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-category-title i {
    font-size: 14px;
}

.search-suggestion-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.search-suggestion-item:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

.search-suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.search-suggestion-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-suggestion-icon i {
    font-size: 18px;
    color: var(--bs-primary);
}

.search-suggestion-content {
    flex: 1;
    min-width: 0;
}

.search-suggestion-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    word-break: break-all;
}

.search-suggestion-description {
    font-size: 12px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em; /* 2 lines * 1.4 line-height */
    word-break: break-word;
}

.search-suggestion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-suggestion-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #ffa500;
}

.search-suggestion-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e3f2fd;
    color: var(--bs-primary);
    font-weight: 600;
}

.search-suggestion-verified {
    color: #28a745;
    font-size: 14px;
}

.search-suggestions-loading {
    padding: 24px;
    text-align: center;
    color: #999;
}

.search-suggestions-loading .spinner-border {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.search-suggestions-empty {
    padding: 32px 24px;
    text-align: center;
    color: #999;
}

.search-suggestions-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    color: #ddd;
}

.search-suggestions-empty p {
    margin: 0;
    font-size: 14px;
}

/* Highlight matching text */
.search-highlight {
    background: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Scrollbar styling for content area and sidebar */
.search-suggestions-content::-webkit-scrollbar,
.search-suggestions-sidebar::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions-content::-webkit-scrollbar-track,
.search-suggestions-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-suggestions-content::-webkit-scrollbar-thumb,
.search-suggestions-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.search-suggestions-content::-webkit-scrollbar-thumb:hover,
.search-suggestions-sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-suggestions-container {
        max-height: 400px;
    }

    .search-suggestion-item {
        padding: 10px 12px;
    }

    .search-suggestion-icon {
        width: 36px;
        height: 36px;
    }

    .search-suggestions-sidebar {
        display: none;
    }
}

/* Search Suggestions Sidebar */
.search-suggestions-sidebar {
    width: 280px;
    border-left: 1px solid #f0f0f0;
    background: #fafbfc;
    padding: 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 500px;
    overflow-y: auto;
}

/* Suggestions content area - scrollable */
.search-suggestions-content {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.search-sidebar-header {
    margin-bottom: 16px;
}

.search-sidebar-header h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.search-sidebar-header i {
    color: var(--bs-primary);
    font-size: 14px;
}

/* Quick Links */
.search-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.search-quick-link:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--bs-primary);
}

.search-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-quick-icon i {
    font-size: 18px;
}

.search-quick-content {
    flex: 1;
    min-width: 0;
}

.search-quick-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.search-quick-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

.search-quick-arrow {
    font-size: 12px;
    color: #999;
    transition: all 0.3s ease;
}

.search-quick-link:hover .search-quick-arrow {
    color: var(--bs-primary);
    transform: translateX(2px);
}

/* Featured Banner */
.search-featured-banner {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0056b3 100%);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.search-featured-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.search-featured-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.search-featured-icon i {
    font-size: 18px;
    color: #ffd700;
}

.search-featured-content {
    position: relative;
    z-index: 1;
}

.search-featured-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.search-featured-desc {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 8px;
}

.search-featured-banner .btn {
    background: white;
    color: var(--bs-primary);
    border: none;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.search-featured-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Subtle background patterns */
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1) !important;
}