/* Modern Search Results Dropdown */
#id_lead_search_results {
    max-height: calc(100vh - 140px) !important; /* Dynamic height based on viewport */
    overflow-y: auto;
    min-width: 400px !important; /* Make dropdown wider than input */
    width: 400px !important; /* Fixed width wider than sidebar input (sidebar is 256px) */
    left: 0 !important; /* Align to left edge of search input */
    position: absolute !important; /* Ensure absolute positioning */
    z-index: 1001 !important; /* Above sidebar (z-index: 1000) */
}

#id_lead_search_results a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

#id_lead_search_results a:last-child {
    border-bottom: none;
}

#id_lead_search_results a:hover,
#id_lead_search_results a:focus {
    background-color: #f3f4f6;
    outline: none;
}

#id_lead_search_results a span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

#id_lead_search_results a span.name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937 !important; /* Dark gray for better contrast */
    margin-bottom: 4px;
}

#id_lead_search_results a span.status {
    float: right;
    font-size: 11px;
    font-weight: 500;
    text-align: right;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #e5e7eb;
    color: #374151 !important; /* Darker gray for better contrast */
    margin-left: 8px;
}

#id_lead_search_results a span.phone,
#id_lead_search_results a span.email {
    font-size: 13px;
    color: #374151 !important; /* Dark gray instead of light gray for better readability */
    line-height: 1.4;
}

#id_lead_search_results a:hover span.name,
#id_lead_search_results a:focus span.name {
    color: var(--color-primary, #D34108) !important;
}

#id_lead_search_results a:hover span.phone,
#id_lead_search_results a:hover span.email,
#id_lead_search_results a:focus span.phone,
#id_lead_search_results a:focus span.email {
    color: #1f2937 !important; /* Even darker on hover for better contrast */
}

#id_lead_search_results .empty {
    padding: 16px;
    text-align: center;
    color: #374151; /* Darker gray for better readability */
    font-size: 13px;
}

/* Remove alternating background colors */
#id_lead_search_results a.even,
#id_lead_search_results a.odd {
    background-color: transparent;
}

#id_lead_search_results a.even:hover,
#id_lead_search_results a.odd:hover,
#id_lead_search_results a.even:focus,
#id_lead_search_results a.odd:focus {
    background-color: #f3f4f6;
}

