/* API Suggestions Dropdown Styles */

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: -1px;
    min-width: 100%;
    max-height: 400px;
    overflow-y: auto;
}

.suggestions-list {
    padding: 8px 0;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f9fafb;
}

.suggestion-item:active {
    background-color: #f3f4f6;
}

.suggestion-title {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
    word-break: break-word;
}

.suggestion-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.suggestion-authors {
    font-size: 12px;
    color: #6b7280;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-source {
    font-size: 11px;
    color: #9ca3af;
    background-color: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 500;
}

/* Scrollbar styling for suggestions dropdown */
.suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}

.suggestions-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.suggestions-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Loading state (optional) */
.suggestion-loading {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* Error state (optional) */
.suggestion-error {
    padding: 16px;
    color: #dc2626;
    font-size: 13px;
    background-color: #fee2e2;
    border-radius: 4px;
    margin: 8px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .suggestions-dropdown {
        min-width: 100%;
        max-height: 300px;
    }

    .suggestion-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .suggestion-authors {
        width: 100%;
    }
}

