/* Calendly popup, shared by every landing page. Link it right after Calendly's
   widget.css. Matches the popup on ongraph.com (theme custom.css).

   Calendly only shows its two-column layout when its iframe is wider than
   ~1110px, but widget.css caps the popup at 1000px, so it would otherwise show
   the stacked mobile layout on desktop. The iframe is transparent, so the extra
   width doesn't show and the card stays centred.

   widget.css keeps max-height:700px !important at every width. */
.openCalendly { cursor: pointer; }

.calendly-overlay {
  background-color: rgba(31, 31, 31, .8) !important;
}

.calendly-overlay .calendly-popup {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

/* widget.css pins the popup 50px from the top here. Take that 50px off the
   height or the bottom of the calendar is cut off on short phones. */
@media (max-width: 975px) {
  .calendly-overlay .calendly-popup {
    height: calc(100% - 50px) !important;
  }
}

/* Desktop: the booking page scrolls inside Calendly's iframe, which draws its own
   scrollbar (another site's page, so it cannot be restyled). Make the iframe one
   scrollbar wider than the popup and clip it, so the bar sits out of view;
   scrolling still works. */
@media (min-width: 976px) {
  .calendly-overlay .calendly-popup-content { overflow: hidden !important; }
  .calendly-overlay .calendly-popup-content iframe { width: calc(100% + 17px) !important; max-width: none !important; }
}
