/* Keep Hermes thinking, turn activity, and tool-stage rows visible on web —
   the same Pensando pulse, reasoning accordion, and Cursor-style stages
   (Editing / Terminal / …) the desktop app shows while a turn is running.
   Do not hide aui_thinking-disclosure, tool-block, or aui_turn-activity. */

/* The web app has no native titlebar. Remove the inherited 34px desktop band
   and start navigation at the top edge. */
html[data-megan-ai='2.2'] [data-slot='sidebar-wrapper'] {
  --titlebar-height: 0px !important;
}

html[data-megan-ai='2.2'] div[class*='h-[34px]'][class*='shrink-0'][class*='items-center'][class*='bg-(--ui-sidebar-surface-background)'] {
  display: none !important;
}

html[data-megan-ai='2.2'] [data-slot='sidebar'] [data-slot='sidebar-group']:first-child {
  padding-top: 0.35rem !important;
}

/* Keep Ctrl+N functional, but never display its keyboard badge. */
html[data-megan-ai='2.2'] [data-slot='sidebar'] kbd {
  display: none !important;
}

/* Session search is an unobtrusive line, never a white focus rectangle. */
html[data-megan-ai='2.2'] input[aria-label='Buscar sessões'],
html[data-megan-ai='2.2'] input[aria-label='Buscar sessões']:focus {
  outline: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-megan-ai='2.2'] input[aria-label='Buscar sessões']::selection {
  background: rgb(255 255 255 / 0.18);
}

/* The desktop drag affordance paints a carbon-like hatch over the composer on
   hover. It is decorative only and must not cover the message box on web. */
html[data-megan-ai='2.2'] [data-slot='composer-drag-region'],
html[data-megan-ai='2.2'] [data-slot='composer-drag-region']:hover,
html[data-megan-ai='2.2'] [data-slot='composer-drag-region'][data-dragging] {
  background-image: none !important;
  opacity: 0 !important;
}

/* The composer deliberately narrows itself to 56rem on wide screens. Thread
   content is otherwise full-width, so constrain each rendered turn to that
   exact dock rule instead of using the broader --composer-width variable. */
html[data-megan-ai='2.2'] [data-slot='aui_thread-content'] {
  --megan-conversation-column: min(56rem, calc(100% - clamp(1rem, 3vw, 3rem)));
}

html[data-megan-ai='2.2'] [data-slot='aui_thread-content'] [data-slot='aui_turn-pair'],
html[data-megan-ai='2.2'] [data-slot='aui_thread-content'] > [data-slot='aui_assistant-message-root'],
html[data-megan-ai='2.2'] [data-slot='aui_thread-content'] > [data-slot='aui_user-message-root'] {
  width: var(--megan-conversation-column) !important;
  max-width: var(--megan-conversation-column) !important;
  align-self: center !important;
  margin-inline: auto !important;
}

/* The desktop user-message shell intentionally bleeds by one padding unit.
   In the web transcript that makes the bubble overshoot the composer, so keep
   it inside the same centered turn column. */
html[data-megan-ai='2.2'] [data-slot='aui_turn-pair'] [data-slot='aui_user-message-root'] {
  width: 100% !important;
  margin-inline: 0 !important;
}

/* Voice transcription inherits the generic muted token, which can resolve to
   blue in the upstream interface. Keep this live status surface neutral black
   and let only the spinner communicate activity. */
html[data-megan-ai='2.2'] div[role='status'][aria-live='polite'].bg-muted\/55 {
  background: #050505 !important;
  background-image: none !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
  color: #d8d8d8 !important;
}

html[data-megan-ai='2.2'] div[role='status'][aria-live='polite'].bg-muted\/55 .bg-primary\/10,
html[data-megan-ai='2.2'] div[role='status'][aria-live='polite'].bg-muted\/55 .bg-primary\/15 {
  background: #1a1a1a !important;
  color: #fff !important;
}
