Add Max-Width to AI Tooltip
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3576702. -->
Reported by: [bbruno](https://www.drupal.org/user/3691195)
Related to !1267
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>[One-line issue summary for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>We introduced a tooltip in <a href="https://www.drupal.org/project/ai/issues/3569770">https://www.drupal.org/project/ai/issues/3569770</a>. Although functionality works as expected, we did not test cases where the content would be very long - currently having a few sentences of text causes an ultra wide tooltip that reaches the end of the screen.</p>
<p><img src="https://www.drupal.org/files/issues/2026-03-03/long-tooltip.png" width="500" alt="Ui interface"></p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Use the `data-ai-tooltip="Lorem Ipsum"` attribute on any element to turn it into a tooltip, replace "Lorem Ipsum" with some long text and observe the width of the tooltip.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add a max-width to the .ai-tooltip popup</p>
<p>[ ] AI Assisted Issue<br>
This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
<p>[ ] AI Assisted Code<br>
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p>
<p>[ ] AI Generated Code<br>
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p>
<p>[ ] Vibe Coded<br>
This code was generated by an AI and has only been functionally tested.</p>
issue