/* Desktop conversation and composer share the same available-space formula.
   Percentages refer to the workspace, so the expanded sidebar and side preview
   are already accounted for. Narrow windows retain the existing layout. */
@media (min-width: 1100px) {
  .unifiedCreatorWorkspaceSurface {
    --ao-chat-column: min(1440px, max(896px, calc(70% + 120px)), calc(100% - 72px));
    --ao-chat-gutter: max(36px, calc((100% - var(--ao-chat-column)) / 2));
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface:not(.historyOpen):not(.historyRailOpen) > .unifiedCreatorComposerSurface {
    width: var(--ao-chat-column) !important;
    left: 50% !important;
    right: auto !important;
    margin-left: 0 !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface:not(.historyOpen):not(.historyRailOpen) .unifiedCreatorConversationSurface {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    padding-inline: var(--ao-chat-gutter) !important;
    scrollbar-gutter: stable both-edges;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface:not(.historyOpen):not(.historyRailOpen) .unifiedCreatorConversationSurface > .inlineCreativeAgentPanel.embedded {
    width: 100%;
    margin-inline: 0;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface:not(.historyOpen):not(.historyRailOpen) .inlineCreativeAgentPanel.embedded > .inlineCreativeAgentConversation {
    padding-inline: clamp(0px, calc((100% - 820px) / 2), 38px) !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface:not(.historyOpen):not(.historyRailOpen) .inlineCreativeAgentPanel.embedded > .inlineCreativeAgentConversation > :is(.inlineCreativeAgentMessage.assistant, .inlineCreativeAgentToolRun, .inlineCreativeAgentResultTurn, .exactVideoConversationTurn) {
    width: 100%;
    max-width: 100%;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface:not(.historyOpen):not(.historyRailOpen) .inlineCreativeAgentPanel.embedded .inlineCreativeAgentMessage.user {
    max-width: min(82%, 960px);
  }
}

/* Keep the existing controls and menus; only their desktop appearance changes.
   The send/stop button and menu options do not use these pill classes. */
@media (min-width: 761px) {
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill) {
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    outline: none !important;
    color: #747470 !important;
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill):is(:hover, :focus-visible, [aria-expanded="true"]):not(:disabled) {
    color: #262624 !important;
    background: #f2f2ef !important;
    border-color: #e1e1dc !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill)[aria-expanded="true"]:not(:disabled) {
    background: #efefec !important;
    border-color: #d7d7d2 !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill):active:not(:disabled) {
    color: #111111 !important;
    background: #e5e5e0 !important;
    border-color: #cfcfc8 !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill):focus-visible {
    /* Follow the pill shape for keyboard focus, without a rectangular UA ring. */
    box-shadow: inset 0 0 0 2px rgb(38 38 36 / 28%) !important;
  }
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill):disabled {
    color: #aaa9a4 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pageContent.toolMain .unifiedCreatorWorkspaceSurface .unifiedCreatorComposerSurface :is(.exactDockPill, .exactVideoPill) { transition: none !important; }
}
