/* Fix for search results area scrollbar visibility */

/* Ensure search results container has proper scrollbar */
.search-results {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent; /* Firefox */
}

/* Custom scrollbar styling for WebKit browsers */
.search-results::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}

.search-results::-webkit-scrollbar-track {
    background-color: rgba(31, 41, 55, 0.3);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.5);
}

/* Ensure parent containers don't hide the scrollbar */
#active-searchTab,
#searchTab,
#searchTabPostCall {
    overflow: visible !important;
}

/* Traditional and agentic results specific */
.traditional-results,
.agentic-results {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

/* Ensure proper height for flex-grow elements */
.search-results.flex-grow {
    min-height: 0; /* Allow shrinking */
    flex: 1 1 auto;
}

/* Fix any conflicting overflow-hidden that might be inherited */
.right-tab-content .search-results {
    overflow-y: auto !important;
}

/* Ensure scrollbar is visible even with padding */
.search-results.p-4 {
    padding-right: 12px !important; /* Make room for scrollbar */
}

/* For search tabs with subtabs */
.search-subtab-content .search-results {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

/* Ensure the search results header doesn't interfere */
.search-results-header {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

/* Fix for any parent containers that might be hiding overflow */
.search-section + .search-results,
.search-section ~ .search-results {
    overflow-y: auto !important;
    scrollbar-width: thin !important;
}