/* AI footer bar — fixed above page chrome, offset past UnifiedSidebar */
.ai-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

@media (min-width: 1024px) {
  .ai-footer-bar {
    left: var(--sidebar-width-expanded, 240px);
  }

  .unified-sidebar.collapsed ~ .content-container .ai-footer-bar,
  .main-content-wrapper:has(.unified-sidebar.collapsed) .ai-footer-bar {
    left: var(--sidebar-width-collapsed, 64px);
  }
}

/* Event overview pages add an inner nav (Pro In-House / Pro Independent) */
.ai-footer-host--event-overview {
  --ai-footer-extra-left: 210px;
}

@media (min-width: 1024px) {
  .ai-footer-host--event-overview .ai-footer-bar {
    left: calc(var(--sidebar-width-expanded, 240px) + var(--ai-footer-extra-left, 210px));
  }

  .main-content-wrapper:has(.unified-sidebar.collapsed) .ai-footer-host--event-overview .ai-footer-bar {
    left: calc(var(--sidebar-width-collapsed, 64px) + var(--ai-footer-extra-left, 210px));
  }
}

/* Chat panel sits above footer bar but below image lightbox */
.ai-chat-panel {
  position: fixed;
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  bottom: 80px;
  right: 20px;
  width: min(570px, calc(100vw - 40px));
  height: 70vh;
  max-height: calc(100vh - 140px);
  border-radius: 16px;
  border: 1px solid var(--n-200);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

@media (min-width: 1024px) {
  .ai-footer-host--event-overview .ai-chat-panel {
    right: max(20px, calc((100vw - var(--sidebar-width-expanded, 240px) - var(--ai-footer-extra-left, 210px) - 570px) / 2));
  }
}
