/**
 * Support Agent Mobile Positioning CSS
 * Positions RAG agent above bottom nav on all mobile pages (tenant, customer, trainer)
 * @author BUILDER
 * @date 2025-01-23
 * @updated 2026-03-30 — Apply to all mobile views, not just customer; increase clearance
 */

/* Mobile positioning - above bottom navigation bar */
#support-agent-widget.support-agent-mobile-customer {
  bottom: 90px !important; /* 60px bottom nav + 30px margin for clearance */
  right: 16px !important;
  z-index: 999 !important; /* Below bottom nav z-index: 9999 */
}

/* Smaller button for mobile to avoid crowding */
#support-agent-widget.support-agent-mobile-customer .support-agent-button {
  width: 44px !important;
  height: 44px !important;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35) !important;
}

/* Ensure button stays visible and clickable */
#support-agent-widget.support-agent-mobile-customer .support-agent-button:active {
  transform: scale(0.95) !important;
}

/* Mobile window positioning */
@media (max-width: 768px) {
  #support-agent-widget.support-agent-mobile-customer {
    bottom: 90px !important;
  }

  /* When chat is open, hide the button */
  #support-agent-widget.support-agent-mobile-customer .support-agent-button.hidden {
    display: none !important;
  }
}

/* Safe area adjustments for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #support-agent-widget.support-agent-mobile-customer {
    bottom: calc(90px + env(safe-area-inset-bottom)) !important;
  }
}

/* Small mobile devices - slightly smaller button */
@media (max-width: 375px) {
  #support-agent-widget.support-agent-mobile-customer .support-agent-button {
    width: 40px !important;
    height: 40px !important;
  }

  #support-agent-widget.support-agent-mobile-customer {
    bottom: 84px !important;
    right: 12px !important;
  }
}
