/**
 * Assistant IA JotForm
 * Bulle : position:fixed, au-dessus de #bottomNav (même logique que .social-floating)
 */

:root {
  --jf-agent-bottom-offset: 24px;
  --jf-agent-left-offset: 16px;
  --jf-agent-top-offset: 12px;
  --jf-agent-panel-max-height: calc(100dvh - 48px);
}

@media (max-width: 992px) {
  :root,
  html.has-bottom-nav {
    --jf-agent-bottom-offset: calc(60px + env(safe-area-inset-bottom, 0px));
    --jf-agent-left-offset: 10px;
    --jf-agent-top-offset: calc(10px + env(safe-area-inset-top, 0px));
    --jf-agent-panel-max-height: calc(
      100dvh - var(--jf-agent-bottom-offset) - var(--jf-agent-top-offset)
    );
  }
}

.ai-agent-chat-avatar-container,
.ai-agent-chat-avatar {
  position: fixed !important;
  bottom: var(--jf-agent-bottom-offset) !important;
  left: var(--jf-agent-left-offset) !important;
  top: auto !important;
  right: auto !important;
  inset: auto auto var(--jf-agent-bottom-offset) var(--jf-agent-left-offset) !important;
  transform: none !important;
  z-index: 10018 !important;
}

[id^="JotformAgent-"] .jficc,
[id^="JotformAgent-"] .embedded-agent-container {
  transform: none !important;
  filter: none !important;
}
