/**
 * Contact FAB + Chatbot positioning — single source of truth.
 * Load after styles.css. Do not duplicate these rules elsewhere.
 */

#contact-hub,
#contact-hub.contact-hub {
  position: fixed;
  top: auto;
  right: 10px;
  bottom: 10px;
  left: auto;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: none;
  translate: none;
  z-index: 99999;
  pointer-events: auto;
  box-sizing: border-box;
}

#contact-hub .contact-hub-anchor {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-direction: column;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: auto;
}

#contact-hub .contact-hub-menu {
  right: 0;
  left: auto;
  transform-origin: bottom right;
}

#sf-chatbot {
  position: fixed;
  top: auto;
  right: 10px;
  bottom: 5.5rem;
  left: auto;
  z-index: 99998;
}

@media (max-width: 768px) {
  #contact-hub,
  #contact-hub.contact-hub {
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  #contact-hub .contact-hub-fab {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }

  #contact-hub .contact-hub-menu,
  #contact-hub .contact-hub-action {
    min-width: min(260px, calc(100vw - 1.5rem));
  }

  #contact-hub .contact-hub-label {
    display: none;
  }

  #sf-chatbot {
    right: max(10px, env(safe-area-inset-right, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 7rem - env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 769px) {
  #contact-hub,
  #contact-hub.contact-hub {
    right: 10px;
    bottom: 10px;
  }
}
